lcm.lcm
Class LCMDataOutputStream

java.lang.Object
  extended by lcm.lcm.LCMDataOutputStream
All Implemented Interfaces:
java.io.DataOutput

public final class LCMDataOutputStream
extends java.lang.Object
implements java.io.DataOutput


Constructor Summary
LCMDataOutputStream()
           
LCMDataOutputStream(byte[] buf)
           
LCMDataOutputStream(int sz)
           
 
Method Summary
 byte[] getBuffer()
          Returns the internal buffer, which may be longer than the buffer that has been written to so far.
 void reset()
           
 int size()
          Get the number of bytes that have been written to the buffer.
 byte[] toByteArray()
          Makes a copy of the internal buffer.
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 void writeBoolean(boolean v)
           
 void writeByte(int v)
           
 void writeBytes(java.lang.String s)
           
 void writeChar(int v)
           
 void writeChars(java.lang.String s)
           
 void writeCharsAsBytes(char[] c)
          Writes one byte per char
 void writeDouble(double v)
           
 void writeFloat(float v)
           
 void writeInt(int v)
           
 void writeLong(long v)
           
 void writeShort(int v)
           
 void writeStringZ(java.lang.String s)
          Write a zero-terminated string consisting of 8 bit characters.
 void writeUTF(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LCMDataOutputStream

public LCMDataOutputStream()

LCMDataOutputStream

public LCMDataOutputStream(int sz)

LCMDataOutputStream

public LCMDataOutputStream(byte[] buf)
Method Detail

reset

public void reset()

write

public void write(byte[] b)
Specified by:
write in interface java.io.DataOutput

write

public void write(byte[] b,
                  int off,
                  int len)
Specified by:
write in interface java.io.DataOutput

writeCharsAsBytes

public void writeCharsAsBytes(char[] c)
Writes one byte per char


write

public void write(int b)
Specified by:
write in interface java.io.DataOutput

writeBoolean

public void writeBoolean(boolean v)
Specified by:
writeBoolean in interface java.io.DataOutput

writeByte

public void writeByte(int v)
Specified by:
writeByte in interface java.io.DataOutput

writeBytes

public void writeBytes(java.lang.String s)
Specified by:
writeBytes in interface java.io.DataOutput

writeChar

public void writeChar(int v)
Specified by:
writeChar in interface java.io.DataOutput

writeChars

public void writeChars(java.lang.String s)
Specified by:
writeChars in interface java.io.DataOutput

writeStringZ

public void writeStringZ(java.lang.String s)
Write a zero-terminated string consisting of 8 bit characters.


writeDouble

public void writeDouble(double v)
Specified by:
writeDouble in interface java.io.DataOutput

writeFloat

public void writeFloat(float v)
Specified by:
writeFloat in interface java.io.DataOutput

writeInt

public void writeInt(int v)
Specified by:
writeInt in interface java.io.DataOutput

writeLong

public void writeLong(long v)
Specified by:
writeLong in interface java.io.DataOutput

writeShort

public void writeShort(int v)
Specified by:
writeShort in interface java.io.DataOutput

writeUTF

public void writeUTF(java.lang.String s)
Specified by:
writeUTF in interface java.io.DataOutput

toByteArray

public byte[] toByteArray()
Makes a copy of the internal buffer.


getBuffer

public byte[] getBuffer()
Returns the internal buffer, which may be longer than the buffer that has been written to so far.


size

public int size()
Get the number of bytes that have been written to the buffer.