org.springframework.boot.loader.data
Interface RandomAccessData

All Known Implementing Classes:
RandomAccessDataFile

public interface RandomAccessData

Interface that provides read-only random access to some underlying data. Implementations must allow concurrent reads in a thread-safe manner.

Author:
Phillip Webb

Method Summary
 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.
 

Method Detail

getInputStream

InputStream getInputStream()
Returns an InputStream that can be used to read the underling data. The caller is responsible close the underlying stream.

Returns:
a new input stream that can be used to read the underlying data.

getSubsection

RandomAccessData getSubsection(long offset,
                               long length)
Returns a new RandomAccessData for a specific subsection of this data.

Parameters:
offset - the offset of the subsection
length - the length of the subsection
Returns:
the subsection data

getSize

long getSize()
Returns the size of the data.

Returns:
the size


Copyright © 2013. All Rights Reserved.