Add OutPacket interface and ByteBuf implementation

Replacement for LittleEndianWriter, GenericLittleEndianWriter,
and MaplePacketLittleEndianWriter.
This commit is contained in:
P0nk
2021-06-20 20:40:23 +02:00
parent 00abbb4acd
commit f3faee2e16
5 changed files with 107 additions and 8 deletions

View File

@@ -1,4 +1,20 @@
package net.packet;
import java.awt.*;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
public interface OutPacket extends Packet {
Charset STRING_CHARSET = StandardCharsets.US_ASCII;
void writeByte(byte value);
void writeByte(int value);
void writeBytes(byte[] value);
void writeShort(short value);
void writeInt(int value);
void writeLong(long value);
void writeBoolean(boolean value);
void writeString(String value);
void writePoint(Point value);
void skip(int numberOfBytes);
}