org.elasticsearch.common.io.stream
Class HandlesStreamOutput

java.lang.Object
  extended by java.io.OutputStream
      extended by org.elasticsearch.common.io.stream.StreamOutput
          extended by org.elasticsearch.common.io.stream.HandlesStreamOutput
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class HandlesStreamOutput
extends StreamOutput


Constructor Summary
HandlesStreamOutput(StreamOutput out)
           
HandlesStreamOutput(StreamOutput out, int identityThreshold)
           
 
Method Summary
 void cleanHandles()
           
 void close()
          Closes this stream to further operations.
 void flush()
          Forces any buffered output to be written.
 void reset()
           
 void reset(StreamOutput out)
           
 StreamOutput wrappedOut()
           
 void writeByte(byte b)
          Writes a single byte.
 void writeBytes(byte[] b, int offset, int length)
          Writes an array of bytes.
 void writeUTF(java.lang.String s)
          Writes a string.
 
Methods inherited from class org.elasticsearch.common.io.stream.StreamOutput
write, write, writeBoolean, writeBytes, writeBytes, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeVInt, writeVLong
 
Methods inherited from class java.io.OutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandlesStreamOutput

public HandlesStreamOutput(StreamOutput out)

HandlesStreamOutput

public HandlesStreamOutput(StreamOutput out,
                           int identityThreshold)
Method Detail

writeUTF

public void writeUTF(java.lang.String s)
              throws java.io.IOException
Description copied from class: StreamOutput
Writes a string.

Overrides:
writeUTF in class StreamOutput
Throws:
java.io.IOException

writeByte

public void writeByte(byte b)
               throws java.io.IOException
Description copied from class: StreamOutput
Writes a single byte.

Specified by:
writeByte in class StreamOutput
Throws:
java.io.IOException

writeBytes

public void writeBytes(byte[] b,
                       int offset,
                       int length)
                throws java.io.IOException
Description copied from class: StreamOutput
Writes an array of bytes.

Specified by:
writeBytes in class StreamOutput
Parameters:
b - the bytes to write
offset - the offset in the byte array
length - the number of bytes to write
Throws:
java.io.IOException

cleanHandles

public void cleanHandles()

reset

public void reset()
           throws java.io.IOException
Specified by:
reset in class StreamOutput
Throws:
java.io.IOException

reset

public void reset(StreamOutput out)
           throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Description copied from class: StreamOutput
Forces any buffered output to be written.

Specified by:
flush in interface java.io.Flushable
Specified by:
flush in class StreamOutput
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Description copied from class: StreamOutput
Closes this stream to further operations.

Specified by:
close in interface java.io.Closeable
Specified by:
close in class StreamOutput
Throws:
java.io.IOException

wrappedOut

public StreamOutput wrappedOut()