js.tinyvm.io
Class ByteWriter

java.lang.Object
  extended by js.tinyvm.io.ByteWriter
All Implemented Interfaces:
IByteWriter
Direct Known Subclasses:
BEByteWriter, LEByteWriter

public abstract class ByteWriter
extends java.lang.Object
implements IByteWriter

Basic byte writer implementation (write order independant part)


Constructor Summary
ByteWriter(java.io.OutputStream stream)
          Constructor.
 
Method Summary
 int offset()
          Current offset in file.
 void write(byte[] aBytes)
           
 void write(int aByte)
           
 void writeBoolean(boolean aBoolean)
           
 void writeByte(int aByte)
           
 void writeChar(int aChar)
           
 void writeDouble(double aDouble)
           
 void writeFloat(float aFloat)
           
 void writeInt(int aInt)
           
 void writeLong(long aLong)
           
 void writeShort(int aShort)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface js.tinyvm.io.IByteWriter
writeU1, writeU2, writeU4, writeU8
 

Constructor Detail

ByteWriter

public ByteWriter(java.io.OutputStream stream)
Constructor.

Parameters:
stream - stream to write to
Method Detail

writeBoolean

public void writeBoolean(boolean aBoolean)
                  throws java.io.IOException
Specified by:
writeBoolean in interface IByteWriter
Throws:
java.io.IOException

writeByte

public void writeByte(int aByte)
               throws java.io.IOException
Specified by:
writeByte in interface IByteWriter
Throws:
java.io.IOException

writeChar

public void writeChar(int aChar)
               throws java.io.IOException
Specified by:
writeChar in interface IByteWriter
Throws:
java.io.IOException

writeShort

public void writeShort(int aShort)
                throws java.io.IOException
Specified by:
writeShort in interface IByteWriter
Throws:
java.io.IOException

writeInt

public void writeInt(int aInt)
              throws java.io.IOException
Specified by:
writeInt in interface IByteWriter
Throws:
java.io.IOException

writeLong

public void writeLong(long aLong)
               throws java.io.IOException
Specified by:
writeLong in interface IByteWriter
Throws:
java.io.IOException

writeFloat

public void writeFloat(float aFloat)
                throws java.io.IOException
Specified by:
writeFloat in interface IByteWriter
Throws:
java.io.IOException

writeDouble

public void writeDouble(double aDouble)
                 throws java.io.IOException
Specified by:
writeDouble in interface IByteWriter
Throws:
java.io.IOException

write

public void write(byte[] aBytes)
           throws java.io.IOException
Specified by:
write in interface IByteWriter
Throws:
java.io.IOException

write

public void write(int aByte)
           throws java.io.IOException
Specified by:
write in interface IByteWriter
Throws:
java.io.IOException

offset

public int offset()
Current offset in file.

Specified by:
offset in interface IByteWriter