@Override public void readPlain(byte[] buf, int off, int len) { readFully(buf, off, len); } }
@Override public void readFully(byte[] buf) { readFully(buf, 0, buf.length); }
is.readFully(buff); handleRecord(recordId, buff); } else {
@Override public void readPlain(byte[] buf, int off, int len) { readFully(buf, off, len); } }
@Override public void readFully(byte[] buf) { readFully(buf, 0, buf.length); }
public void readFully(byte[] buf) { readFully(buf, 0, buf.length); }
public void readFully(byte[] buf) { readFully(buf, 0, buf.length); }
@Override public int init(LittleEndianInputStream leis, long recordSize, int recordFunction) throws IOException { stringLength = leis.readShort(); rawTextBytes = IOUtils.safelyAllocate(stringLength+(stringLength&1), MAX_RECORD_LENGTH); leis.readFully(rawTextBytes); yStart = leis.readShort(); xStart = leis.readShort(); return 3*LittleEndianConsts.SHORT_SIZE+rawTextBytes.length; }
is.readFully(buff); handleRecord(recordId, buff); } else {
@Override public long init(LittleEndianInputStream leis, long recordId, long recordSize) throws IOException { long dataSize = leis.readUInt(); recordSize -= LittleEndian.INT_SIZE; byte[] optionalCommentIndentifierBuffer = new byte[4]; leis.readFully(optionalCommentIndentifierBuffer); dataSize = dataSize-LittleEndian.INT_SIZE; //size minus the first int which could be a comment identifier recordSize -= LittleEndian.INT_SIZE; long optionalCommentIdentifier = LittleEndian.getInt(optionalCommentIndentifierBuffer) & 0x00FFFFFFFFL; if (optionalCommentIdentifier == COMMENT_EMFSPOOL) { comment = new HemfCommentEMFSpool(readToByteArray(leis, dataSize, recordSize)); } else if (optionalCommentIdentifier == COMMENT_EMFPLUS) { comment = new HemfCommentEMFPlus(readToByteArray(leis, dataSize, recordSize)); } else if (optionalCommentIdentifier == COMMENT_PUBLIC) { comment = CommentPublicParser.parse(readToByteArray(leis, dataSize, recordSize)); } else { comment = new HemfComment(readToByteArray(optionalCommentIndentifierBuffer, leis, dataSize, recordSize)); } return recordSize; }
leis.readFully(rawTextBytes); size += rawTextBytes.length;