public class ByteSourceFile extends ByteSource
Constructor and Description |
---|
ByteSourceFile(File file) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getAll() |
byte[] |
getBlock(long start,
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 ByteSourceFile(File file)
public InputStream getInputStream() throws IOException
getInputStream
in class ByteSource
IOException
public byte[] getBlock(long start, 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.