Top Description Fields Constructors Methods
org.apache.poi.hssf.record

public Class DConRefRecord

extends StandardRecord
Class Inheritance
Imports
java.io.IOException, java.util.Arrays, .Map, java.util.function.Supplier, org.apache.commons.io.input.UnsynchronizedByteArrayInputStream, org.apache.poi.hssf.usermodel.HSSFWorkbook, org.apache.poi.util.GenericRecordUtil, .IOUtils, .LittleEndianOutput, .RecordFormatException, .StringUtil

DConRef records specify a range in a workbook (internal or external) that serves as a data source for pivot tables or data consolidation. Represents a DConRef Structure [MS-XLS s. 2.4.86], and the contained DConFile structure [MS-XLS s. 2.5.69]. This in turn contains a XLUnicodeStringNoCch [MS-XLS s. 2.5.296].
         _______________________________
        |          DConRef              |
(bytes) +-+-+-+-+-+-+-+-+-+-+...+-+-+-+-+
        |    ref    |cch|  stFile   | un|
        +-+-+-+-+-+-+-+-+-+-+...+-+-+-+-+
                              |
                     _________|_____________________
                    |DConFile / XLUnicodeStringNoCch|
                    +-+-+-+-+-+-+-+-+-+-+-+...+-+-+-+
             (bits) |h|   reserved  |      rgb      |
                    +-+-+-+-+-+-+-+-+-+-+-+...+-+-+-+
 
Where At the moment this class is read-only.

Field Summary

Modifier and TypeField and Description
private byte[]
_unused

unused bits at the end, must be set to 0.

private final int
charCount

the number of chars in the link

private final int
charType

the type of characters (single or double byte)

private final int
private final int
firstRow

A RefU structure specifying the range of cells if this record is part of an SXTBL.

private final int
private final int
private final byte[]
path

The link's path string.

public static final short
sid

The id of the record type, sid =

Constructor Summary

AccessConstructor and Description
public
public
DConRefRecord(byte[]
byte array containing a DConRef Record, including the header.
data
)

Read constructor.

public
DConRefRecord(RecordInputStream
RecordInputStream containing a DConRefRecord structure.
inStream
)

Read Constructor.

Method Summary

Modifier and TypeMethod and Description
private static RecordInputStream
bytesToRIStream(byte[] data)

public DConRefRecord
protected int
public int

Returns:

The first column of the range.
getFirstColumn
()

public int

Returns:

The first row of the range.
getFirstRow
()

public Map<String, Supplier<?>>
public HSSFRecordTypes
public int

Returns:

The last column of the range.
getLastColumn
()

public int

Returns:

The last row of the range.
getLastRow
()

public byte[]

Returns:

raw path byte array.
getPath
()

public String

Returns:

the link's path, with the special characters stripped/replaced. May be null. See MS-XLS 2.5.277 (VirtualPath)
getReadablePath
()

public short
getSid()

Implements abstract org.apache.poi.hssf.record.Record.getSid.

return the non static version of the id for this record.

public boolean

Returns:

true iff this is an external reference.
isExternalRef
()

Checks if the data source in this reference record is external to this sheet or internal.

protected void
serialize(LittleEndianOutput
the output object
out
)

Implements abstract org.apache.poi.hssf.record.StandardRecord.serialize.

Write the data content of this BIFF record.

Inherited from org.apache.poi.hssf.record.StandardRecord:
getRecordSizeserialize

Field Detail

_unusedback to summary
private byte[] _unused

unused bits at the end, must be set to 0.

charCountback to summary
private final int charCount

the number of chars in the link

charTypeback to summary
private final int charType

the type of characters (single or double byte)

firstColback to summary
private final int firstCol
firstRowback to summary
private final int firstRow

A RefU structure specifying the range of cells if this record is part of an SXTBL. [MS XLS s.2.5.211]

lastColback to summary
private final int lastCol
lastRowback to summary
private final int lastRow
pathback to summary
private final byte[] path

The link's path string. This is the rgb field of a XLUnicodeStringNoCch. Therefore it will contain at least one leading special character (0x01 or 0x02) and probably other ones.

See Also
DConFile [MS-XLS s. 2.5.77] and VirtualPath [MS-XLS s. 2.5.69]
sidback to summary
public static final short sid

The id of the record type, sid =

Constructor Detail

DConRefRecordback to summary
public DConRefRecord(DConRefRecord other)
DConRefRecordback to summary
public DConRefRecord(byte[] data)

Read constructor.

Parameters
data:byte[]

byte array containing a DConRef Record, including the header.

DConRefRecordback to summary
public DConRefRecord(RecordInputStream inStream)

Read Constructor.

Parameters
inStream:RecordInputStream

RecordInputStream containing a DConRefRecord structure.

Method Detail

bytesToRIStreamback to summary
private static RecordInputStream bytesToRIStream(byte[] data)
copyback to summary
public DConRefRecord copy()

Implements abstract org.apache.poi.hssf.record.StandardRecord.copy.

Implements org.apache.poi.common.Duplicatable.copy.

Returns:DConRefRecord

Doc from org.apache.poi.common.Duplicatable.copy.

a deep copy of the implementing class / instance

Annotations
@Override
getDataSizeback to summary
protected int getDataSize()

Implements abstract org.apache.poi.hssf.record.StandardRecord.getDataSize.

Annotations
@Override
getFirstColumnback to summary
public int getFirstColumn()
Returns:int

The first column of the range.

getFirstRowback to summary
public int getFirstRow()
Returns:int

The first row of the range.

getGenericPropertiesback to summary
public Map<String, Supplier<?>> getGenericProperties()

Implements org.apache.poi.common.usermodel.GenericRecord.getGenericProperties.

Annotations
@Override
getGenericRecordTypeback to summary
public HSSFRecordTypes getGenericRecordType()

Overrides default org.apache.poi.common.usermodel.GenericRecord.getGenericRecordType.

Implements abstract org.apache.poi.hssf.record.Record.getGenericRecordType.

Annotations
@Override
getLastColumnback to summary
public int getLastColumn()
Returns:int

The last column of the range.

getLastRowback to summary
public int getLastRow()
Returns:int

The last row of the range.

getPathback to summary
public byte[] getPath()
Returns:byte[]

raw path byte array.

getReadablePathback to summary
public String getReadablePath()
Returns:String

the link's path, with the special characters stripped/replaced. May be null. See MS-XLS 2.5.277 (VirtualPath)

getSidback to summary
public short getSid()

Implements abstract org.apache.poi.hssf.record.Record.getSid.

Doc from org.apache.poi.hssf.record.Record.getSid.

return the non static version of the id for this record.

Returns:short

he id for this record

Annotations
@Override
isExternalRefback to summary
public boolean isExternalRef()

Checks if the data source in this reference record is external to this sheet or internal.

Returns:boolean

true iff this is an external reference.

serializeback to summary
protected void serialize(LittleEndianOutput out)

Implements abstract org.apache.poi.hssf.record.StandardRecord.serialize.

Doc from org.apache.poi.hssf.record.StandardRecord.serialize.

Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields have already been written by the superclass.

The number of bytes written must equal the record size reported by org.apache.poi.hssf.record.Record#getRecordSize()} minus four ( record header consisting of a 'ushort sid' and 'ushort reclength' has already been written by their superclass).

Parameters
out:LittleEndianOutput

the output object

Annotations
@Override