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

public final Class FileSharingRecord

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

Stores the encrypted readonly for a workbook (write protect).

This functionality is accessed from the options dialog box available when performing 'Save As'.

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public FileSharingRecord
protected int
public Map<String, Supplier<?>>
public HSSFRecordTypes
public short

Returns:

password hashed with hashPassword() (very lame)
getPassword
()

public short

Returns:

short representing if this is read only (1 = true)
getReadOnly
()

get the readonly

public short
getSid()

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

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

public String

Returns:

username of the user that created the file
getUsername
()

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
setPassword(short
hashed password
password
)

public void
setReadOnly(short
1 for true, not 1 for false
readonly
)

set the readonly flag

public void
setUsername(String
of the user that created the file
username
)

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

Field Detail

field_1_readonlyback to summary
private short field_1_readonly
field_2_passwordback to summary
private short field_2_password
field_3_username_unicode_optionsback to summary
private byte field_3_username_unicode_options
field_3_username_valueback to summary
private String field_3_username_value
sidback to summary
public static final short sid

Constructor Detail

FileSharingRecordback to summary
public FileSharingRecord()
FileSharingRecordback to summary
public FileSharingRecord(FileSharingRecord other)
FileSharingRecordback to summary
public FileSharingRecord(RecordInputStream in)

Method Detail

copyback to summary
public FileSharingRecord copy()

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

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

Returns:FileSharingRecord

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.

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
getPasswordback to summary
public short getPassword()
Returns:short

password hashed with hashPassword() (very lame)

getReadOnlyback to summary
public short getReadOnly()

get the readonly

Returns:short

short representing if this is read only (1 = true)

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

getUsernameback to summary
public String getUsername()
Returns:String

username of the user that created the file

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

setPasswordback to summary
public void setPassword(short password)
Parameters
password:short

hashed password

setReadOnlyback to summary
public void setReadOnly(short readonly)

set the readonly flag

Parameters
readonly:short

1 for true, not 1 for false

setUsernameback to summary
public void setUsername(String username)
Parameters
username:String

of the user that created the file