1 package org.paneris.bibliomania.fti; 2 3 import java.io.IOException; 4 import java.io.OutputStream; 5 6 public class OnePacker extends Packer { 7 public static final OnePacker it = new OnePacker(); 8 9 public OnePacker() { 10 super(1, 0xFF); 11 } 12 13 public static int number_(byte[] bytes, int off) { 14 return uint(bytes[off]); 15 } 16 17 public int number(byte[] bytes, int off) { 18 return number_(bytes, off); 19 } 20 21 public Packer bigger() { 22 return TwoPacker.it; 23 } 24 25 public static void write_(OutputStream os, int number) throws IOException { 26 os.write(number); 27 } 28 29 public void write(OutputStream os, int number) throws IOException { 30 write_(os, number); 31 } 32 }