@InterfaceAudience.Private @InterfaceStability.Unstable public class IFileInputStream extends InputStream
IFileOutputStream
.Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
IFileInputStream(InputStream in,
long len)
Create a checksum input stream that reads without readAhead.
|
IFileInputStream(InputStream in,
long len,
boolean readAhead,
int readAheadLength)
Create a checksum input stream that reads
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the input stream.
|
byte[] |
getChecksum() |
long |
getPosition() |
long |
getSize() |
int |
read() |
int |
read(byte[] b,
int off,
int len)
Read bytes from the stream.
|
int |
readWithChecksum(byte[] b,
int off,
int len)
Read bytes from the stream.
|
long |
skip(long n) |
available, mark, markSupported, read, reset
public IFileInputStream(InputStream in, long len)
in
- len
- public IFileInputStream(InputStream in, long len, boolean readAhead, int readAheadLength)
in
- The input stream to be verified for checksum.len
- The length of the input stream including checksum bytes.readAhead
- Whether to attempt readAhead for this streamreadAheadLength
- Number of bytes to readAhead if it is enabledpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public long skip(long n) throws IOException
skip
in class InputStream
IOException
public long getPosition()
public long getSize()
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public int readWithChecksum(byte[] b, int off, int len) throws IOException
IOException
public int read() throws IOException
read
in class InputStream
IOException
public byte[] getChecksum()
Copyright © 2015 Apache Software Foundation. All rights reserved.