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, getInputStreampublic ByteSourceArray(String fileName, byte[] bytes)
public ByteSourceArray(byte[] bytes)
public InputStream getInputStream()
getInputStream in class ByteSourcepublic byte[] getBlock(long startLong,
int length)
throws IOException
getBlock in class ByteSourceIOExceptionpublic long getLength()
ByteSourcegetLength in class ByteSourcepublic byte[] getAll()
throws IOException
getAll in class ByteSourceIOExceptionpublic String getDescription()
getDescription in class ByteSourceCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.