char getCard8() { try { byte i = buf.readByte(); return (char)(i & 0xff); } catch (Exception e) { throw new IOException(IOException.IoException, e); } }
char getCard8() { try { byte i = buf.readByte(); return (char)(i & 0xff); } catch (Exception e) { throw new IOException(IOException.IoException, e); } }
private boolean isAfmFile(RandomAccessFileOrArray raf) throws java.io.IOException { StringBuilder builder = new StringBuilder(AFM_HEADER.length()); for (int i = 0; i < AFM_HEADER.length(); i++) { try { builder.append((char)raf.readByte()); } catch (EOFException e) { raf.seek(0); return false; } } raf.seek(0); return AFM_HEADER.equals(builder.toString()); } }
private boolean isAfmFile(RandomAccessFileOrArray raf) throws java.io.IOException { StringBuilder builder = new StringBuilder(AFM_HEADER.length()); for (int i = 0; i < AFM_HEADER.length(); i++) { try { builder.append((char)raf.readByte()); } catch (EOFException e) { raf.seek(0); return false; } } raf.seek(0); return AFM_HEADER.equals(builder.toString()); } }
@Override public void emit(byte[] buffer) { //System.err.println("range emit offset "+offset+" size="+length); try { buf.seek(offset); for (int i=myOffset; i<myOffset+length; i++) buffer[i] = buf.readByte(); } catch (java.io.IOException e) { throw new IOException(IOException.IoException, e); } //System.err.println("finished range emit"); } }
@Override public void emit(byte[] buffer) { //System.err.println("range emit offset "+offset+" size="+length); try { buf.seek(offset); for (int i=myOffset; i<myOffset+length; i++) buffer[i] = buf.readByte(); } catch (java.io.IOException e) { throw new IOException(IOException.IoException, e); } //System.err.println("finished range emit"); } }