public class ByteSourceArray extends ByteSource
Constructor and Description |
---|
ByteSourceArray(byte[] bytes) |
ByteSourceArray(String fileName,
byte[] bytes) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getAll() |
byte[] |
getBlock(long startLong,
int length) |
String |
getDescription() |
InputStream |
getInputStream() |
long |
getLength()
This operation can be VERY expensive; for inputstream byte sources, the
entire stream must be drained to determine its length.
|
getBlock, getFileName, getInputStream
public ByteSourceArray(String fileName, byte[] bytes)
public ByteSourceArray(byte[] bytes)
public InputStream getInputStream()
getInputStream
in class ByteSource
public byte[] getBlock(long startLong, int length) throws IOException
getBlock
in class ByteSource
IOException
public long getLength()
ByteSource
getLength
in class ByteSource
public byte[] getAll() throws IOException
getAll
in class ByteSource
IOException
public String getDescription()
getDescription
in class ByteSource
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.