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