|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.apache.tez.runtime.library.common.sort.impl.IFileInputStream
@InterfaceAudience.Private @InterfaceStability.Unstable public class IFileInputStream
A checksum input stream, used for IFiles.
Used to validate the checksum of files created by IFileOutputStream.
| Field Summary | |
|---|---|
static org.apache.commons.logging.Log |
LOG
|
| Constructor Summary | |
|---|---|
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 |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.io.InputStream |
|---|
available, mark, markSupported, read, reset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
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 enabled| Method Detail |
|---|
public void close()
throws IOException
close in interface Closeableclose in class InputStreamIOException
public 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 InputStreamIOException
public int readWithChecksum(byte[] b,
int off,
int len)
throws IOException
IOException
public int read()
throws IOException
read in class InputStreamIOExceptionpublic byte[] getChecksum()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||