Beispiel #1
0
 public void writeString(String s) {
   for (int i = 0; i < s.length(); i++) {
     writeByte(s.charAt(i));
   }
 }
Beispiel #2
0
 public void writeInt(int i) {
   writeByte(i >> 24);
   writeByte(i >> 16);
   writeByte(i >> 8);
   writeByte(i);
 }
Beispiel #3
0
 public void writeShort(int i) {
   writeByte(i >> 8);
   writeByte(i);
 }
Beispiel #4
0
 public void writeByte(byte[] array, int offset, int length) {
   for (int i = 0; i < length; i++) {
     writeByte(array[offset + i]);
   }
 }
Beispiel #5
0
 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]);
   }
 }