类 ByteArrayRandomAccessData
- java.lang.Object
 - org.springframework.boot.loader.data.ByteArrayRandomAccessData
 
- 所有已实现的接口:
 RandomAccessData
public class ByteArrayRandomAccessData extends Object implements RandomAccessData
RandomAccessDataimplementation backed by a byte array.
嵌套类概要
从接口继承的嵌套类/接口 org.springframework.boot.loader.data.RandomAccessData
RandomAccessData.ResourceAccess
构造器概要
构造器 构造器 说明 ByteArrayRandomAccessData(byte[] bytes)ByteArrayRandomAccessData(byte[] bytes, long offset, long length)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 InputStreamgetInputStream(RandomAccessData.ResourceAccess access)Returns anInputStreamthat can be used to read the underlying data.longgetSize()Returns the size of the data.RandomAccessDatagetSubsection(long offset, long length)Returns a newRandomAccessDatafor 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)
从接口复制的说明:RandomAccessDataReturns anInputStreamthat 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)
从接口复制的说明:RandomAccessDataReturns a newRandomAccessDatafor 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()
从接口复制的说明:RandomAccessDataReturns the size of the data.- 指定者:
 getSize在接口中RandomAccessData- 返回:
 - the size