public final class GridGgfsHadoopInputStream extends InputStream implements org.apache.hadoop.fs.Seekable, org.apache.hadoop.fs.PositionedReadable, GridGgfsHadoopStreamEventListener
| Constructor and Description |
|---|
GridGgfsHadoopInputStream(GridGgfsHadoopStreamDelegate delegate,
long limit,
int bufSize,
org.apache.commons.logging.Log log,
GridGgfsHadoopLogger clientLog,
long logStreamId)
Creates input stream.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
long |
getPos() |
void |
mark(int readLimit) |
boolean |
markSupported() |
void |
onClose()
Callback invoked when the stream is being closed.
|
void |
onError(String errMsg)
Callback invoked when remote error occurs.
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
int |
read(long position,
byte[] buf,
int off,
int len) |
void |
readFully(long position,
byte[] buf) |
void |
readFully(long position,
byte[] buf,
int off,
int len) |
void |
reset() |
void |
seek(long pos) |
boolean |
seekToNewSource(long targetPos) |
long |
skip(long n) |
readpublic GridGgfsHadoopInputStream(GridGgfsHadoopStreamDelegate delegate, long limit, int bufSize, org.apache.commons.logging.Log log, GridGgfsHadoopLogger clientLog, long logStreamId)
delegate - Server stream delegate.limit - Read limit.bufSize - Buffer size.log - Log.clientLog - Client logger.public int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(@NotNull
byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic void mark(int readLimit)
mark in class InputStreampublic void reset()
throws IOException
reset in class InputStreamIOExceptionpublic boolean markSupported()
markSupported in class InputStreampublic int read(long position,
byte[] buf,
int off,
int len)
throws IOException
read in interface org.apache.hadoop.fs.PositionedReadableIOExceptionpublic void readFully(long position,
byte[] buf,
int off,
int len)
throws IOException
readFully in interface org.apache.hadoop.fs.PositionedReadableIOExceptionpublic void readFully(long position,
byte[] buf)
throws IOException
readFully in interface org.apache.hadoop.fs.PositionedReadableIOExceptionpublic void seek(long pos)
throws IOException
seek in interface org.apache.hadoop.fs.SeekableIOExceptionpublic long getPos()
getPos in interface org.apache.hadoop.fs.Seekablepublic boolean seekToNewSource(long targetPos)
seekToNewSource in interface org.apache.hadoop.fs.Seekablepublic void onClose()
onClose in interface GridGgfsHadoopStreamEventListenerpublic void onError(String errMsg)
onError in interface GridGgfsHadoopStreamEventListenererrMsg - Error message.Copyright © 2014. All rights reserved.