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