org.bson.io
Class PoolOutputBuffer

java.lang.Object
  extended by org.bson.io.OutputBuffer
      extended by org.bson.io.PoolOutputBuffer

public class PoolOutputBuffer
extends OutputBuffer


Field Summary
static int BUF_SIZE
           
 
Constructor Summary
PoolOutputBuffer()
           
 
Method Summary
 java.lang.String asString()
           
 java.lang.String asString(java.lang.String encoding)
           
 int getPosition()
           
 int pipe(java.io.OutputStream out)
           
 void reset()
           
 void seekEnd()
           
 void seekStart()
           
 void setPosition(int position)
           
 int size()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class org.bson.io.OutputBuffer
hex, md5, toByteArray, toString, writeDouble, writeInt, writeInt, writeLong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BUF_SIZE

public static final int BUF_SIZE
See Also:
Constant Field Values
Constructor Detail

PoolOutputBuffer

public PoolOutputBuffer()
Method Detail

reset

public void reset()

getPosition

public int getPosition()
Specified by:
getPosition in class OutputBuffer

setPosition

public void setPosition(int position)
Specified by:
setPosition in class OutputBuffer

seekEnd

public void seekEnd()
Specified by:
seekEnd in class OutputBuffer

seekStart

public void seekStart()
Specified by:
seekStart in class OutputBuffer

size

public int size()
Specified by:
size in class OutputBuffer
Returns:
size of data so far

write

public void write(byte[] b)
Specified by:
write in class OutputBuffer

write

public void write(byte[] b,
                  int off,
                  int len)
Specified by:
write in class OutputBuffer

write

public void write(int b)
Specified by:
write in class OutputBuffer

pipe

public int pipe(java.io.OutputStream out)
         throws java.io.IOException
Specified by:
pipe in class OutputBuffer
Returns:
bytes written
Throws:
java.io.IOException

asString

public java.lang.String asString()
Overrides:
asString in class OutputBuffer

asString

public java.lang.String asString(java.lang.String encoding)
                          throws java.io.UnsupportedEncodingException
Overrides:
asString in class OutputBuffer
Throws:
java.io.UnsupportedEncodingException