类 ByteArrayRandomAccessData
- java.lang.Object
- org.springframework.boot.loader.data.ByteArrayRandomAccessData
- 所有已实现的接口:
RandomAccessData
public class ByteArrayRandomAccessData extends Object implements RandomAccessData
RandomAccessData
implementation backed by a byte array.
嵌套类概要
从接口继承的嵌套类/接口 org.springframework.boot.loader.data.RandomAccessData
RandomAccessData.ResourceAccess
构造器概要
构造器 构造器 说明 ByteArrayRandomAccessData(byte[] bytes)
ByteArrayRandomAccessData(byte[] bytes, long offset, long length)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 InputStream
getInputStream(RandomAccessData.ResourceAccess access)
Returns anInputStream
that can be used to read the underlying data.long
getSize()
Returns the size of the data.RandomAccessData
getSubsection(long offset, long length)
Returns a newRandomAccessData
for a specific subsection of this data.
构造器详细资料
ByteArrayRandomAccessData
public ByteArrayRandomAccessData(byte[] bytes)
ByteArrayRandomAccessData
public ByteArrayRandomAccessData(byte[] bytes, long offset, long length)
方法详细资料
getInputStream
public InputStream getInputStream(RandomAccessData.ResourceAccess access)
从接口复制的说明:RandomAccessData
Returns anInputStream
that can be used to read the underlying data. The caller is responsible close the underlying stream.- 指定者:
getInputStream
在接口中RandomAccessData
- 参数:
access
- hint indicating how the underlying data should be accessed- 返回:
- a new input stream that can be used to read the underlying data.
getSubsection
public RandomAccessData getSubsection(long offset, long length)
从接口复制的说明:RandomAccessData
Returns a newRandomAccessData
for a specific subsection of this data.- 指定者:
getSubsection
在接口中RandomAccessData
- 参数:
offset
- the offset of the subsectionlength
- the length of the subsection- 返回:
- the subsection data
getSize
public long getSize()
从接口复制的说明:RandomAccessData
Returns the size of the data.- 指定者:
getSize
在接口中RandomAccessData
- 返回:
- the size