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