GF4J 0.9.4 Beta

gameframe.util
Class BigEndianDataOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--gameframe.util.BigEndianDataOutputStream
All Implemented Interfaces:
java.io.DataOutput

public class BigEndianDataOutputStream
extends java.io.FilterOutputStream
implements java.io.DataOutput

Output stream filter that filters all output values to big endian format that is used e.g. by Intel processor equipped computers.

Since:
GameFrame for Java 0.9.3
Version:
GameFrame for Java 0.9.4
Author:
Pasi Keränen 18. Mar 2000

Constructor Summary
BigEndianDataOutputStream(java.io.OutputStream outputstream)
          Constructs an big endian output filter.
 
Method Summary
 void flush()
          Flushes the used output stream.
 void write(byte[] aByte, int offset, int length)
          Writes the series of bytes in big endian format.
 void write(int integer)
          Writes an integer to the used output stream in big endian format.
 void writeBoolean(boolean flag)
          Writes the given boolean value.
 void writeByte(int byteValue)
          Writes the given byte.
 void writeBytes(java.lang.String strText)
          Writes the given string as an array of bytes.
 void writeChar(int character)
          Writes the given Unicode character.
 void writeChars(java.lang.String strText)
          Writes the given string as an array of Unicode characters.
 void writeDouble(double doubleValue)
          Writes the given double value in big endian format.
 void writeFloat(float flValue)
          Writes the given floating point value in big endian format.
 void writeInt(int intValue)
          Writes the given integer value in big endian format.
 void writeLong(long longValue)
          Writes the given long value in big endian format.
 void writeShort(int shortValue)
          Writes the given short value in big endian format.
 void writeUTF(java.lang.String strText)
          Does nothing.
 
Methods inherited from class java.io.FilterOutputStream
close, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.DataOutput
write
 

Constructor Detail

BigEndianDataOutputStream

public BigEndianDataOutputStream(java.io.OutputStream outputstream)
Constructs an big endian output filter.
Parameters:
outputStream - The output stream to write to.
Method Detail

flush

public void flush()
           throws java.io.IOException
Flushes the used output stream.
Overrides:
flush in class java.io.FilterOutputStream

write

public void write(int integer)
           throws java.io.IOException
Writes an integer to the used output stream in big endian format.
Specified by:
write in interface java.io.DataOutput
Overrides:
write in class java.io.FilterOutputStream
Parameters:
integer - The integer that is written.

write

public void write(byte[] aByte,
                  int offset,
                  int length)
           throws java.io.IOException
Writes the series of bytes in big endian format.
Specified by:
write in interface java.io.DataOutput
Overrides:
write in class java.io.FilterOutputStream
Parameters:
offset - The offset into the array.
length - The length of the written array.

writeBoolean

public final void writeBoolean(boolean flag)
                        throws java.io.IOException
Writes the given boolean value.
Specified by:
writeBoolean in interface java.io.DataOutput
Parameters:
flag - The boolean value

writeByte

public final void writeByte(int byteValue)
                     throws java.io.IOException
Writes the given byte.
Specified by:
writeByte in interface java.io.DataOutput
Parameters:
byteValue - The byte to be written.

writeBytes

public final void writeBytes(java.lang.String strText)
                      throws java.io.IOException
Writes the given string as an array of bytes.
Specified by:
writeBytes in interface java.io.DataOutput
Parameters:
strText - The text to be written.

writeChar

public final void writeChar(int character)
                     throws java.io.IOException
Writes the given Unicode character.
Specified by:
writeChar in interface java.io.DataOutput
Parameters:
character - The character to be written.

writeChars

public final void writeChars(java.lang.String strText)
                      throws java.io.IOException
Writes the given string as an array of Unicode characters.
Specified by:
writeChars in interface java.io.DataOutput
Parameters:
strText - the text to be written.

writeDouble

public final void writeDouble(double doubleValue)
                       throws java.io.IOException
Writes the given double value in big endian format.
Specified by:
writeDouble in interface java.io.DataOutput

writeFloat

public final void writeFloat(float flValue)
                      throws java.io.IOException
Writes the given floating point value in big endian format.
Specified by:
writeFloat in interface java.io.DataOutput
Parameters:
floatValue - The floating point value to be written.

writeInt

public final void writeInt(int intValue)
                    throws java.io.IOException
Writes the given integer value in big endian format.
Specified by:
writeInt in interface java.io.DataOutput
Parameters:
intValue - The integer value to be written.

writeLong

public final void writeLong(long longValue)
                     throws java.io.IOException
Writes the given long value in big endian format.
Specified by:
writeLong in interface java.io.DataOutput
Parameters:
longValue - The long value to be written.

writeShort

public final void writeShort(int shortValue)
                      throws java.io.IOException
Writes the given short value in big endian format.
Specified by:
writeShort in interface java.io.DataOutput
Parameters:
shortValue - The short value to be written.

writeUTF

public final void writeUTF(java.lang.String strText)
                    throws java.io.IOException
Does nothing.
Specified by:
writeUTF in interface java.io.DataOutput
Parameters:
strText - Not used.

GF4J 0.9.4 Beta