@Override public void readFully(byte[] buf, int off, int len){ _in.readFully(buf, off, len); }
@Override public void readFully(byte[] buf, int off, int len) { readFully(buf, off, len, false); }
@Override public void readFully(byte[] buf){ _in.readFully(buf); }
@Override public void readFully(byte[] buf) { readFully(buf, 0, buf.length, false); }
public void readPlain(byte[] buf, int off, int len) { readFully(buf, 0, buf.length, true); }
public int read(byte[] b, int off, int len) { int limit = Math.min(len, remaining()); if (limit == 0) { return 0; } readFully(b, off,limit); return limit; }
public DataLabelExtensionRecord(RecordInputStream in) { rt = in.readShort(); grbitFrt = in.readShort(); in.readFully(unused); }
/** Returns the remaining bytes for the current record. * * @return The remaining bytes of the current record. */ public byte[] readRemainder() { int size = remaining(); if (size ==0) { return EMPTY_BYTE_ARRAY; } byte[] result = IOUtils.safelyAllocate(size, MAX_RECORD_LENGTH); readFully(result); return result; }
public ChartEndBlockRecord(RecordInputStream in) { rt = in.readShort(); grbitFrt = in.readShort(); iObjectKind = in.readShort(); // Often, but not always has 6 unused bytes at the end if(in.available() == 0) { unused = new byte[0]; } else { unused = new byte[6]; in.readFully(unused); } }
public ChartEndObjectRecord(RecordInputStream in) { rt = in.readShort(); grbitFrt = in.readShort(); iObjectKind = in.readShort(); // The spec says that there should be 6 bytes at the // end, which must be there and must be zero // However, sometimes Excel forgets them... reserved = new byte[6]; if(in.available() == 0) { // They've gone missing... } else { // Read the reserved bytes in.readFully(reserved); } }
public TableStylesRecord(RecordInputStream in) { rt = in.readUShort(); grbitFrt = in.readUShort(); in.readFully(unused); cts = in.readInt(); int cchDefListStyle = in.readUShort(); int cchDefPivotStyle = in.readUShort(); rgchDefListStyle = in.readUnicodeLEString(cchDefListStyle); rgchDefPivotStyle = in.readUnicodeLEString(cchDefPivotStyle); }
LittleEndian.putUShort(data, 0, nChars); LittleEndian.putByte(data, 2, is16BitFlag); in.readFully(data, 3, data.length-3); String rawValue = new String(data, StringUtil.UTF8); setUsername(rawValue.trim());
ris.readFully(IOUtils.safelyAllocate(ris.remaining(), MAX_RECORD_LENGTH));
/** * Read Constructor. * * @param inStream RecordInputStream containing a DConRefRecord structure. */ public DConRefRecord(RecordInputStream inStream) { if (inStream.getSid() != sid) throw new RecordFormatException("Wrong sid: " + inStream.getSid()); firstRow = inStream.readUShort(); lastRow = inStream.readUShort(); firstCol = inStream.readUByte(); lastCol = inStream.readUByte(); charCount = inStream.readUShort(); charType = inStream.readUByte() & 0x01; //first bit only. // byteLength depends on whether we are using single- or double-byte chars. int byteLength = charCount * (charType + 1); path = IOUtils.safelyAllocate(byteLength, MAX_RECORD_LENGTH); inStream.readFully(path); if (path[0] == 0x02) _unused = inStream.readRemainder(); }
if (len < ext_formatting_length) { ext_formatting_data = IOUtils.safelyAllocate(ext_formatting_length-len, MAX_RECORD_LENGTH); in.readFully(ext_formatting_data); if (template_param_length == 0 || template_param_length == 16) { template_params = IOUtils.safelyAllocate(template_param_length, MAX_RECORD_LENGTH); in.readFully(template_params); } else { logger.log(POILogger.WARN, "CF Rule v12 template params length should be 0 or 16, found " + template_param_length);
in.readFully(path_bytes);
@Override public void readFully(byte[] buf){ _in.readFully(buf); }
public int read(byte[] b, int off, int len) { int limit = Math.min(len, remaining()); if (limit == 0) { return 0; } readFully(b, off,limit); return limit; }
public TableStylesRecord(RecordInputStream in) { rt = in.readUShort(); grbitFrt = in.readUShort(); in.readFully(unused); cts = in.readInt(); int cchDefListStyle = in.readUShort(); int cchDefPivotStyle = in.readUShort(); rgchDefListStyle = in.readUnicodeLEString(cchDefListStyle); rgchDefPivotStyle = in.readUnicodeLEString(cchDefPivotStyle); }
public TableStylesRecord(RecordInputStream in) { rt = in.readUShort(); grbitFrt = in.readUShort(); in.readFully(unused); cts = in.readInt(); int cchDefListStyle = in.readUShort(); int cchDefPivotStyle = in.readUShort(); rgchDefListStyle = in.readUnicodeLEString(cchDefListStyle); rgchDefPivotStyle = in.readUnicodeLEString(cchDefPivotStyle); }