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

public final Class NoteRecord

extends StandardRecord
Class Inheritance
Imports
java.util.Map, java.util.function.Supplier, org.apache.poi.util.GenericRecordUtil, .LittleEndianOutput, .StringUtil

Note

Comment Associated with a Cell (0x001C)

Field Summary

Modifier and TypeField and Description
private static final Byte
public static final NoteRecord[]
private int
private int
private short
private int
private boolean
private String
private Byte
field_7_padding

Saves padding byte value to reduce delta during round-trip serialization.

public static final short
NOTE_HIDDEN

Flag indicating that the comment is hidden (default)

public static final short
NOTE_VISIBLE

Flag indicating that the comment is visible

public static final short

Constructor Summary

AccessConstructor and Description
public
NoteRecord()

Construct a new NoteRecord and fill its data with the default values

public
public
NoteRecord(RecordInputStream
the RecordInputStream to read from
in
)

Read the record data from the supplied RecordInputStream

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean

Returns:

true, if author element uses multi byte
authorIsMultibyte
()

For unit testing only!

public NoteRecord
public String

Returns:

the name of the original author of the comment
getAuthor
()

Name of the original comment author

public int

Returns:

the column that contains the comment
getColumn
()

Return the column that contains the comment

protected int
public short

Returns:

the options flag
getFlags
()

Options flags.

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

Returns:

the row that contains the comment
getRow
()

Return the row that contains the comment

public int

Returns:

the Object id for OBJ record that contains the comment
getShapeId
()

Object id for OBJ record that contains the comment

public short

Returns:

id of this record.
getSid
()

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

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

public void
serialize(LittleEndianOutput
the output object
out
)

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

Write the data content of this BIFF record.

public void
setAuthor(String
the name of the original author of the comment
author
)

Name of the original comment author

public void
setColumn(int
the column that contains the comment
col
)

Specify the column that contains the comment

public void
setFlags(short
the options flag
flags
)

Options flag

public void
setRow(int
the row that contains the comment
row
)

Specify the row that contains the comment

public void
setShapeId(int
the Object id for OBJ record that contains the comment
id
)

Object id for OBJ record that contains the comment

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

Field Detail

DEFAULT_PADDINGback to summary
private static final Byte DEFAULT_PADDING
EMPTY_ARRAYback to summary
public static final NoteRecord[] EMPTY_ARRAY
field_1_rowback to summary
private int field_1_row
field_2_colback to summary
private int field_2_col
field_3_flagsback to summary
private short field_3_flags
field_4_shapeidback to summary
private int field_4_shapeid
field_5_hasMultibyteback to summary
private boolean field_5_hasMultibyte
field_6_authorback to summary
private String field_6_author
field_7_paddingback to summary
private Byte field_7_padding

Saves padding byte value to reduce delta during round-trip serialization.
The documentation is not clear about how padding should work. In any case Excel(2007) does something different.

NOTE_HIDDENback to summary
public static final short NOTE_HIDDEN

Flag indicating that the comment is hidden (default)

NOTE_VISIBLEback to summary
public static final short NOTE_VISIBLE

Flag indicating that the comment is visible

sidback to summary
public static final short sid

Constructor Detail

NoteRecordback to summary
public NoteRecord()

Construct a new NoteRecord and fill its data with the default values

NoteRecordback to summary
public NoteRecord(NoteRecord other)
NoteRecordback to summary
public NoteRecord(RecordInputStream in)

Read the record data from the supplied RecordInputStream

Parameters
in:RecordInputStream

the RecordInputStream to read from

Method Detail

authorIsMultibyteback to summary
pack-priv boolean authorIsMultibyte()

For unit testing only!

Returns:boolean

true, if author element uses multi byte

copyback to summary
public NoteRecord copy()

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

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

Returns:NoteRecord

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

a deep copy of the implementing class / instance

Annotations
@Override
getAuthorback to summary
public String getAuthor()

Name of the original comment author

Returns:String

the name of the original author of the comment

getColumnback to summary
public int getColumn()

Return the column that contains the comment

Returns:int

the column that contains the comment

getDataSizeback to summary
protected int getDataSize()

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

getFlagsback to summary
public short getFlags()

Options flags.

Returns:short

the options flag

See Also
NOTE_VISIBLE, NOTE_HIDDEN
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
getRowback to summary
public int getRow()

Return the row that contains the comment

Returns:int

the row that contains the comment

getShapeIdback to summary
public int getShapeId()

Object id for OBJ record that contains the comment

Returns:int

the Object id for OBJ record that contains the comment

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

id of this record.

serializeback to summary
public 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

setAuthorback to summary
public void setAuthor(String author)

Name of the original comment author

Parameters
author:String

the name of the original author of the comment

setColumnback to summary
public void setColumn(int col)

Specify the column that contains the comment

Parameters
col:int

the column that contains the comment

setFlagsback to summary
public void setFlags(short flags)

Options flag

Parameters
flags:short

the options flag

See Also
NOTE_VISIBLE, NOTE_HIDDEN
setRowback to summary
public void setRow(int row)

Specify the row that contains the comment

Parameters
row:int

the row that contains the comment

setShapeIdback to summary
public void setShapeId(int id)

Object id for OBJ record that contains the comment

Parameters
id:int

the Object id for OBJ record that contains the comment