org.activeio
Class PacketData

java.lang.Object
  extended by org.activeio.PacketData

public final class PacketData
extends Object

Used to write and read primitives to and from a Packet.


Constructor Summary
PacketData(Packet packet)
           
PacketData(Packet packet, boolean bigEndian)
           
 
Method Summary
 boolean readBoolean()
           
 byte readByte()
           
 char readChar()
           
 double readDouble()
           
 float readFloat()
           
 void readFully(byte[] b)
           
 void readFully(byte[] b, int off, int len)
           
 int readInt()
           
 long readLong()
           
 short readShort()
           
 int readUnsignedByte()
           
 int readUnsignedShort()
           
 int skipBytes(int n)
           
 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 writeChar(int v)
           
 void writeDouble(double v)
           
 void writeFloat(float v)
           
 void writeInt(int v)
           
 void writeLong(long v)
           
 void writeRawDouble(double v)
           
 void writeRawFloat(float v)
           
 void writeShort(int v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PacketData

public PacketData(Packet packet)

PacketData

public PacketData(Packet packet,
                  boolean bigEndian)
Method Detail

readFully

public void readFully(byte[] b)
               throws IOException
Throws:
IOException

readFully

public void readFully(byte[] b,
                      int off,
                      int len)
               throws IOException
Throws:
IOException

skipBytes

public int skipBytes(int n)
              throws IOException
Throws:
IOException

readBoolean

public boolean readBoolean()
                    throws IOException
Throws:
IOException

readByte

public byte readByte()
              throws IOException
Throws:
IOException

readUnsignedByte

public int readUnsignedByte()
                     throws IOException
Throws:
IOException

readShort

public short readShort()
                throws IOException
Throws:
IOException

readUnsignedShort

public int readUnsignedShort()
                      throws IOException
Throws:
IOException

readChar

public char readChar()
              throws IOException
Throws:
IOException

readInt

public int readInt()
            throws IOException
Throws:
IOException

readLong

public long readLong()
              throws IOException
Throws:
IOException

readDouble

public double readDouble()
                  throws IOException
Throws:
IOException

readFloat

public float readFloat()
                throws IOException
Throws:
IOException

write

public void write(int b)
           throws IOException
Throws:
IOException

write

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

write

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

writeBoolean

public void writeBoolean(boolean v)
                  throws IOException
Throws:
IOException

writeByte

public void writeByte(int v)
               throws IOException
Throws:
IOException

writeShort

public void writeShort(int v)
                throws IOException
Throws:
IOException

writeChar

public void writeChar(int v)
               throws IOException
Throws:
IOException

writeInt

public void writeInt(int v)
              throws IOException
Throws:
IOException

writeLong

public void writeLong(long v)
               throws IOException
Throws:
IOException

writeDouble

public void writeDouble(double v)
                 throws IOException
Throws:
IOException

writeFloat

public void writeFloat(float v)
                throws IOException
Throws:
IOException

writeRawDouble

public void writeRawDouble(double v)
                    throws IOException
Throws:
IOException

writeRawFloat

public void writeRawFloat(float v)
                   throws IOException
Throws:
IOException


Copyright © -2009 The ActiveIO Project. All Rights Reserved.