3 package com.pixelmed.codec.jpeg;
5 import java.io.InputStream;
6 import java.io.IOException;
15 private static final String identString =
"@(#) $Header: /userland/cvs/codec/com/pixelmed/codec/jpeg/Utilities.java,v 1.1 2014/03/21 15:28:07 dclunie Exp $";
19 StringBuffer sb =
new StringBuffer();
21 String s=Integer.toHexString(i);
23 while(ls++ < length) {
31 StringBuffer sb =
new StringBuffer();
33 String s=Long.toHexString(i);
35 while(ls++ < length) {
42 public static final int extract8(
byte[] b,
int offset) {
43 return b[offset]&0xff;
47 return ((b[offset]&0xff)<<8) + (b[offset+1]&0xff);
51 return ((b[offset]&0xff)<<16) + ((b[offset+1]&0xff)<<8) + (b[offset+2]&0xff);
55 return ((b[offset]&0xff)<<24) + ((b[offset+1]&0xff)<<16) + ((b[offset+2]&0xff)<<8) + (b[offset+3]&0xff);
58 public static final int read16be(InputStream in)
throws IOException {
61 byte b[] =
new byte[2];
62 int count = in.read(b,0,2);