Package org.apache.poi.hssf.record
Class FileSharingRecord
java.lang.Object
org.apache.poi.hssf.record.RecordBase
org.apache.poi.hssf.record.Record
org.apache.poi.hssf.record.StandardRecord
org.apache.poi.hssf.record.FileSharingRecord
- All Implemented Interfaces:
org.apache.poi.common.Duplicatable,GenericRecord
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
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptioncopy()shortshortget the readonlyshortgetSid()return the non static version of the id for this record.voidvoidsetPassword(short password) voidsetReadOnly(short readonly) set the readonly flagvoidsetUsername(String username) Methods inherited from class org.apache.poi.hssf.record.StandardRecord
getRecordSize, serializeMethods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, serialize, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren
-
Field Details
-
sid
public static final short sid- See Also:
-
-
Constructor Details
-
FileSharingRecord
public FileSharingRecord() -
FileSharingRecord
-
FileSharingRecord
-
-
Method Details
-
setReadOnly
public void setReadOnly(short readonly) set the readonly flag- Parameters:
readonly- 1 for true, not 1 for false
-
getReadOnly
public short getReadOnly()get the readonly- Returns:
- short representing if this is read only (1 = true)
-
setPassword
public void setPassword(short password) - Parameters:
password- hashed password
-
getPassword
public short getPassword()- Returns:
- password hashed with hashPassword() (very lame)
-
getUsername
- Returns:
- username of the user that created the file
-
setUsername
- Parameters:
username- of the user that created the file
-
serialize
-
getSid
public short getSid()Description copied from class:Recordreturn the non static version of the id for this record. -
copy
- Specified by:
copyin interfaceorg.apache.poi.common.Duplicatable- Specified by:
copyin classStandardRecord
-
getGenericRecordType
- Specified by:
getGenericRecordTypein interfaceGenericRecord- Specified by:
getGenericRecordTypein classRecord
-
getGenericProperties
-