org.apache.avro.ipc
Class ByteBufferInputStream
java.lang.Object
   java.io.InputStream
java.io.InputStream
       org.apache.avro.ipc.ByteBufferInputStream
org.apache.avro.ipc.ByteBufferInputStream
- All Implemented Interfaces: 
- Closeable
- public class ByteBufferInputStream 
- extends InputStream
Utility to present ByteBuffer data as an InputStream.
 
| Method Summary | 
|  int | read()
 | 
|  int | read(byte[] b,
     int off,
     int len)
 | 
|  ByteBuffer | readBuffer(int length)Read a buffer from the input without copying, if possible.
 | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
ByteBufferInputStream
public ByteBufferInputStream(List<ByteBuffer> buffers)
read
public int read()
         throws IOException
- 
- Specified by:
- readin class- InputStream
 
- 
- Throws:
- EOFException- if EOF is reached.
- IOException
- See Also:
- InputStream.read()
 
read
public int read(byte[] b,
                int off,
                int len)
         throws IOException
- 
- Overrides:
- readin class- InputStream
 
- 
- Throws:
- EOFException- if EOF is reached before reading all the bytes.
- IOException
- See Also:
- InputStream.read(byte[], int, int)
 
readBuffer
public ByteBuffer readBuffer(int length)
                      throws IOException
- Read a buffer from the input without copying, if possible.
 
- 
- Throws:
- EOFException- if EOF is reached before reading all the bytes.
- IOException
 
Copyright © 2010 The Apache Software Foundation