|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.boot.loader.data.RandomAccessDataFile
public class RandomAccessDataFile
RandomAccessData implementation backed by a RandomAccessFile.
| Constructor Summary | |
|---|---|
RandomAccessDataFile(File file)
Create a new RandomAccessDataFile backed by the specified file. |
|
RandomAccessDataFile(File file,
int concurrentReads)
Create a new RandomAccessDataFile backed by the specified file. |
|
| Method Summary | |
|---|---|
void |
close()
|
File |
getFile()
Returns the underling File. |
InputStream |
getInputStream()
Returns an InputStream that can be used to read the underling data. |
long |
getSize()
Returns the size of the data. |
RandomAccessData |
getSubsection(long offset,
long length)
Returns a new RandomAccessData for a specific subsection of this data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomAccessDataFile(File file)
RandomAccessDataFile backed by the specified file.
file - the underlying file
IllegalArgumentException - if the file is null or does not existRandomAccessDataFile(File, int)
public RandomAccessDataFile(File file,
int concurrentReads)
RandomAccessDataFile backed by the specified file.
file - the underlying fileconcurrentReads - the maximum number of concurrent reads allowed on the
underlying file before blocking
IllegalArgumentException - if the file is null or does not existRandomAccessDataFile(File)| Method Detail |
|---|
public File getFile()
public InputStream getInputStream()
RandomAccessDataInputStream that can be used to read the underling data. The
caller is responsible close the underlying stream.
getInputStream in interface RandomAccessData
public RandomAccessData getSubsection(long offset,
long length)
RandomAccessDataRandomAccessData for a specific subsection of this data.
getSubsection in interface RandomAccessDataoffset - the offset of the subsectionlength - the length of the subsection
public long getSize()
RandomAccessData
getSize in interface RandomAccessData
public void close()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||