public class ByteSourceInputStream extends ByteSource
| Constructor and Description |
|---|
ByteSourceInputStream(InputStream is,
String fileName) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getAll() |
byte[] |
getBlock(long blockStart,
int blockLength) |
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 ByteSourceInputStream(InputStream is, String fileName)
public InputStream getInputStream() throws IOException
getInputStream in class ByteSourceIOExceptionpublic byte[] getBlock(long blockStart,
int blockLength)
throws IOException
getBlock in class ByteSourceIOExceptionpublic long getLength()
throws IOException
ByteSourcegetLength in class ByteSourceIOException - if it fails to read the byte source datapublic byte[] getAll()
throws IOException
getAll in class ByteSourceIOExceptionpublic String getDescription()
getDescription in class ByteSourceCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.