protected void writeByte(long value) { long val = value % 256; if (val < 0) val += 256; writeByte((int) val); }
public void writeUXBytes(long value, int x) { for (int i = 0; i < x; i++) { writeByte(value); value >>= 8; } }
public void writeBinBuffer(BinBuffer binb, int bytes) { for (int i = 0; i < bytes; i++) writeByte(binb.readByte()); }
public BinBuffer copy(int bytes) { BinBuffer binb = new BinBuffer(); for (int i = 0; i < bytes; i++) binb.writeByte(readByte()); return binb; }
public void fillByte(int value) { for (int i = 0; i < getSizeReal(); i++) writeByte(value); }
public void writeString(String text) { writeChars(text); writeByte(0); }
public void writeChars(String text) { for (int i = 0; i < text.length(); i++) writeByte(text.charAt(i)); }