org.elasticsearch.common.io.stream
Class ByteBufferStreamInput

java.lang.Object
  extended by java.io.InputStream
      extended by org.elasticsearch.common.io.stream.StreamInput
          extended by org.elasticsearch.common.io.stream.ByteBufferStreamInput
All Implemented Interfaces:
Closeable

public class ByteBufferStreamInput
extends StreamInput


Constructor Summary
ByteBufferStreamInput(ByteBuffer buffer)
           
 
Method Summary
 int available()
           
 void close()
          Closes the stream to further operations.
 void mark(int readlimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 byte readByte()
          Reads and returns a single byte.
 void readBytes(byte[] b, int offset, int len)
          Reads a specified number of bytes into an array at the specified offset.
 void reset()
          Resets the stream.
 long skip(long n)
           
 
Methods inherited from class org.elasticsearch.common.io.stream.StreamInput
readBoolean, readBytesReference, readBytesReference, readDouble, readFloat, readFully, readGenericValue, readInt, readLong, readMap, readOptionalString, readOptionalUTF, readShort, readString, readStringArray, readText, readUTF, readVInt, readVLong
 
Methods inherited from class java.io.InputStream
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferStreamInput

public ByteBufferStreamInput(ByteBuffer buffer)
Method Detail

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

readByte

public byte readByte()
              throws IOException
Description copied from class: StreamInput
Reads and returns a single byte.

Specified by:
readByte in class StreamInput
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException

skip

public long skip(long n)
          throws IOException
Overrides:
skip in class InputStream
Throws:
IOException

readBytes

public void readBytes(byte[] b,
                      int offset,
                      int len)
               throws IOException
Description copied from class: StreamInput
Reads a specified number of bytes into an array at the specified offset.

Specified by:
readBytes in class StreamInput
Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: StreamInput
Resets the stream.

Specified by:
reset in class StreamInput
Throws:
IOException

available

public int available()
              throws IOException
Overrides:
available in class InputStream
Throws:
IOException

mark

public void mark(int readlimit)
Overrides:
mark in class InputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in class InputStream

close

public void close()
           throws IOException
Description copied from class: StreamInput
Closes the stream to further operations.

Specified by:
close in interface Closeable
Specified by:
close in class StreamInput
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.