@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,
org.apache.hadoop.conf.Configuration conf)
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, org.apache.hadoop.conf.Configuration conf)
in
- The input stream to be verified for checksum.len
- The length of the input stream including checksum bytes.public 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 © 2008–2018 Apache Software Foundation. All rights reserved.