Example usage for org.apache.poi.hssf.record RecordInputStream readRemainder

List of usage examples for org.apache.poi.hssf.record RecordInputStream readRemainder

Introduction

In this page you can find the example usage for org.apache.poi.hssf.record RecordInputStream readRemainder.

Prototype

public byte[] readRemainder() 

Source Link

Document

Returns the remaining bytes for the current record.

Usage

From source file:org.ddt.listener.records.DConRefRecord.java

License:Apache License

/**
 * Read Constructor./* w w  w.  jav a  2 s  .c  o  m*/
 *
 * @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();
    // ^ might need to check that the first bit only is set?
    // byteLength depends on whether we are using single- or double-byte chars.
    int byteLength = charCount * (charType + 1);

    path = new byte[byteLength];
    inStream.readFully(path);

    if (path[0] == 0x02)
        _unused = inStream.readRemainder();

}