org.bson.io
Class BasicOutputBuffer

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

public class BasicOutputBuffer
extends OutputBuffer


Constructor Summary
BasicOutputBuffer()
           
 
Method Summary
 java.lang.String asString()
           
 java.lang.String asString(java.lang.String encoding)
           
 int getPosition()
           
 int pipe(java.io.OutputStream out)
           
 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
 

Constructor Detail

BasicOutputBuffer

public BasicOutputBuffer()
Method Detail

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

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

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