Class MaplePacketLittleEndianWriter

java.lang.Object
tools.data.MaplePacketLittleEndianWriter

public class MaplePacketLittleEndianWriter extends Object
Writes a maplestory-packet little-endian stream of bytes.
Since:
Revision 352
  • Constructor Details

    • MaplePacketLittleEndianWriter

      public MaplePacketLittleEndianWriter()
      Constructor - initializes this stream with a default size.
    • MaplePacketLittleEndianWriter

      public MaplePacketLittleEndianWriter(int size)
      Constructor - initializes this stream with size size.
      Parameters:
      size - The size of the underlying stream.
  • Method Details

    • getPacket

      public final byte[] getPacket()
      Gets a MaplePacket instance representing this sequence of bytes.
      Returns:
      A MaplePacket with the bytes in this stream.
    • toString

      public final String toString()
      Changes this packet into a human-readable hexadecimal stream of bytes.
      Overrides:
      toString in class Object
      Returns:
      This packet as hex digits.
    • writeZeroBytes

      public final void writeZeroBytes(int i)
      Write the number of zero bytes
      Parameters:
      i - the number of zero bytes to write.
    • write

      public final void write(byte[] b)
      Write an array of bytes to the stream.
      Parameters:
      b - The bytes to write.
    • write

      public final void write(byte b)
      Write a byte to the stream.
      Parameters:
      b - The byte to write.
    • write

      public final void write(int b)
    • writeShort

      public final void writeShort(int i)
      Write a short integer to the stream.
      Parameters:
      i - The short integer to write.
    • writeInt

      public final void writeInt(int i)
      Writes an integer to the stream.
      Parameters:
      i - The integer to write.
    • writeAsciiString

      public final void writeAsciiString(String s)
      Writes an ASCII string the the stream.
      Parameters:
      s - The ASCII string to write.
    • writeAsciiString

      public final void writeAsciiString(String s, int max)
    • writeMapleAsciiString

      public final void writeMapleAsciiString(String s)
      Writes a maple-convention ASCII string to the stream.
      Parameters:
      s - The ASCII string to use maple-convention to write.
    • writePos

      public final void writePos(Point s)
      Writes a 2D 4 byte position information
      Parameters:
      s - The Point position to write.
    • writeRect

      public final void writeRect(Rectangle s)
    • writeLong

      public final void writeLong(long l)
      Write a long integer to the stream.
      Parameters:
      l - The long integer to write.
    • writeReversedLong

      public final void writeReversedLong(long l)