public void writeString(String s) { for (int i = 0; i < s.length(); i++) { writeByte(s.charAt(i)); } }
public void writeInt(int i) { writeByte(i >> 24); writeByte(i >> 16); writeByte(i >> 8); writeByte(i); }
public void writeShort(int i) { writeByte(i >> 8); writeByte(i); }
public void writeByte(byte[] array, int offset, int length) { for (int i = 0; i < length; i++) { writeByte(array[offset + i]); } }
public void writeByte(byte[] array) { writeByte(array, 0, array.length); }
@Override public void write(Stream outStream) { for (int i = 0; i < bitfield.length; i++) { outStream.writeByte(bitfield[i]); } }