@InterfaceAudience.Private @InterfaceStability.Unstable public class IFileInputStream extends InputStream
IFileOutputStream.| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
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.
|
void |
disableChecksumValidation()
Disable checksum validation when reading the stream
|
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, resetpublic 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 Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic long getPosition()
public long getSize()
public int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic int readWithChecksum(byte[] b,
int off,
int len)
throws IOException
IOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic void disableChecksumValidation()
Copyright © 2017 Apache Software Foundation. All rights reserved.