Пример #1
0
 protected void writeByte(long value) {
   long val = value % 256;
   if (val < 0) val += 256;
   writeByte((int) val);
 }
Пример #2
0
 public void writeUXBytes(long value, int x) {
   for (int i = 0; i < x; i++) {
     writeByte(value);
     value >>= 8;
   }
 }
Пример #3
0
 public void writeBinBuffer(BinBuffer binb, int bytes) {
   for (int i = 0; i < bytes; i++) writeByte(binb.readByte());
 }
Пример #4
0
 public BinBuffer copy(int bytes) {
   BinBuffer binb = new BinBuffer();
   for (int i = 0; i < bytes; i++) binb.writeByte(readByte());
   return binb;
 }
Пример #5
0
 public void fillByte(int value) {
   for (int i = 0; i < getSizeReal(); i++) writeByte(value);
 }
Пример #6
0
 public void writeString(String text) {
   writeChars(text);
   writeByte(0);
 }
Пример #7
0
 public void writeChars(String text) {
   for (int i = 0; i < text.length(); i++) writeByte(text.charAt(i));
 }