static public byte encodeByte(final int v){
  int i=v;
  if (i < 0) {
    i=i - 0x80;
  }
 else {
    i=i + 0x80;
  }
  return (byte)(i & 0xff);
}

static public byte encodeByte ( final int v ) { int i = v ; if ( i < 0 ) { i = i - 0x80 ; } else { i = i + 0x80 ; } return ( byte ) ( i & 0xff ) ; }
converts a signed byte into an unsigned byte .
