org.exist.util
Class VariableByteOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byorg.exist.util.VariableByteOutputStream

public class VariableByteOutputStream
extends java.io.OutputStream


Field Summary
protected  ByteArray buf
           
 
Constructor Summary
VariableByteOutputStream()
           
VariableByteOutputStream(int size)
           
 
Method Summary
 void clear()
           
 void close()
           
 ByteArray data()
           
 void flush()
           
 byte[] toByteArray()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 void writeByte(byte b)
           
 void writeFixedLong(long l)
           
 void writeInt(int i)
           
 void writeLong(long l)
           
 void writeShort(int s)
           
 void writeUTF(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buf

protected ByteArray buf
Constructor Detail

VariableByteOutputStream

public VariableByteOutputStream()

VariableByteOutputStream

public VariableByteOutputStream(int size)
Method Detail

clear

public void clear()

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

toByteArray

public byte[] toByteArray()

data

public ByteArray data()

write

public void write(int b)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Throws:
java.io.IOException

writeByte

public void writeByte(byte b)

writeShort

public void writeShort(int s)

writeInt

public void writeInt(int i)

writeLong

public void writeLong(long l)

writeFixedLong

public void writeFixedLong(long l)

writeUTF

public void writeUTF(java.lang.String s)
              throws java.io.IOException
Throws:
java.io.IOException


Copyright (C) Wolfgang Meier. All rights reserved.