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

public final Class NameCommentRecord

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

Defines a comment associated with a specified name.

Field Summary

Modifier and TypeField and Description
private final short
private final short
private final long
private String
private String
public static final short

Constructor Summary

AccessConstructor and Description
public
public
NameCommentRecord(final String name, final String comment)

public
NameCommentRecord(final RecordInputStream
the RecordInputstream to read the record from
ris
)

Method Summary

Modifier and TypeMethod and Description
public NameCommentRecord
public String

Returns:

the text of the comment.
getCommentText
()

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

Returns:

the name of the NameRecord to which this comment applies.
getNameText
()

public short
public short
getSid()

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

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

public void
serialize(final LittleEndianOutput
the output object
out
)

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

Write the data content of this BIFF record.

public void
public void
setNameText(String
the new name
newName
)

Updates the name we're associated with, normally used when renaming that Name

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

Field Detail

field_1_record_typeback to summary
private final short field_1_record_type
field_2_frt_cell_ref_flagback to summary
private final short field_2_frt_cell_ref_flag
field_3_reservedback to summary
private final long field_3_reserved
field_6_name_textback to summary
private String field_6_name_text
field_7_comment_textback to summary
private String field_7_comment_text
sidback to summary
public static final short sid

Constructor Detail

NameCommentRecordback to summary
public NameCommentRecord(NameCommentRecord other)
NameCommentRecordback to summary
public NameCommentRecord(final String name, final String comment)
NameCommentRecordback to summary
public NameCommentRecord(final RecordInputStream ris)
Parameters
ris:RecordInputStream

the RecordInputstream to read the record from

Method Detail

copyback to summary
public NameCommentRecord copy()

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

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

Returns:NameCommentRecord

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

a deep copy of the implementing class / instance

Annotations
@Override
getCommentTextback to summary
public String getCommentText()
Returns:String

the text of the comment.

getDataSizeback to summary
protected int getDataSize()

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

Annotations
@Override
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
getNameTextback to summary
public String getNameText()
Returns:String

the name of the NameRecord to which this comment applies.

getRecordTypeback to summary
public short getRecordType()
getSidback to summary
public short getSid()

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

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

Returns:short

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

he id for this record

Annotations
@Override
serializeback to summary
public void serialize(final 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
setCommentTextback to summary
public void setCommentText(String comment)
setNameTextback to summary
public void setNameText(String newName)

Updates the name we're associated with, normally used when renaming that Name

Parameters
newName:String

the new name