stream.read(); // CR
stream.read(); // LF
str = new String(b);
} catch(Exception e) {
String message = JaiI18N.getString("IIPResolution7");
listener.errorOccurred(message, new ImagingException(message,e),
IIPResolutionOpImage.class, false);
// throw new RuntimeException(e.getClass()+" "+e.getMessage());
}
} else {
StringBuffer buf = new StringBuffer(16);
try {
int i;
while((i = stream.read()) != -1) {
char c = (char)(0x000000ff&i);
if(c == CR) { // if last byte was CR
stream.read(); // LF
break;
}
buf.append(c);
}
str = buf.toString();
} catch(Exception e) {
String message = JaiI18N.getString("IIPResolution7");
listener.errorOccurred(message, new ImagingException(message,e),
IIPResolutionOpImage.class, false);
// throw new RuntimeException(e.getClass()+" "+e.getMessage());
}
}