public void write3bytes(long n) throws IOException {
		long b0 = n & 0xff;
		long b1 = (n & 0xff00) >> 8;
		long b2 = (n & 0xff0000) >> 16;
		if (le) {
			write(b0); write(b1); write(b2);
		} else {
			write(b2); write(b1); write(b0);
		}
	}