public class NSFFileItem extends NSFObjectItem
NSFItem
represents items of type TYPE_OBJECT
, specifically
those that are file attachments.Constructor and Description |
---|
NSFFileItem(NSFItem existing) |
NSFFileItem(NSFNote parent,
String name,
BLOCKID itemBlockId,
ValueType dataType,
BLOCKID valueBlockId,
int valueLen) |
Modifier and Type | Method and Description |
---|---|
void |
extractFile(File file) |
void |
extractFile(String filePath)
Extracts the file to the path indicated by
file . |
String |
getFileName() |
FILEOBJECT |
getFileObject() |
InputStream |
getInputStream()
Returns an
InputStream for the raw data represented by this object. |
OBJECT_DESCRIPTOR |
getObjectDescriptor() |
NSFTempFileInputStream |
getTempFileInputStream()
Returns an
InputStream for the raw data represented by this object, extracted as a temporary file
on the filesystem. |
addFlag, doFree, getDupItemId, getFlags, getItemBlockId, getName, getParent, getSeqByte, getType, getValue, getValue, getValueBlockId, getValueLen, isRefValid, removeFlag, setFlags, toString
_checkRefValidity, addChild, addChildStruct, debugPrintChildHierarchy, finalize, free, free, free, getAPI, getChildObjectCount, getChildObjectCount, getChildStructCount, isFreed, isTraceCreation, removeChild, removeChildStruct, removeFromParent, retain, setNeedsFree, setTraceCreation
public NSFFileItem(NSFNote parent, String name, BLOCKID itemBlockId, ValueType dataType, BLOCKID valueBlockId, int valueLen)
parent
- name
- itemBlockId
- dataType
- valueBlockId
- valueLen
- public NSFFileItem(NSFItem existing)
public FILEOBJECT getFileObject() throws DominoException
DominoException
public OBJECT_DESCRIPTOR getObjectDescriptor() throws DominoException
getObjectDescriptor
in class NSFObjectItem
DominoException
public NSFTempFileInputStream getTempFileInputStream() throws DominoException, IOException
InputStream
for the raw data represented by this object, extracted as a temporary file
on the filesystem. When this stream is closed or on clean JVM exit, the temporary file will be deleted.InputStream
for the raw data represented by this objectDominoException
- if there is a problem retrieving the object information from the databaseIOException
- if there is a problem creating the temporary filepublic InputStream getInputStream() throws DominoException
NSFObjectItem
InputStream
for the raw data represented by this object.
Note, however, that it does not decompress the data in those objects - if the object is stored with LZ1
or Huffman coding, the data returned by this InputStream
will also be compressed.
getInputStream
in class NSFObjectItem
InputStream
for the raw data represented by this objectDominoException
- if there is a problem retrieving the object information from the databasepublic String getFileName() throws DominoException
DominoException
public void extractFile(String filePath) throws DominoException
file
.filePath
- the path and name of the file to extract toDominoException
- if there is a problem extracting the filepublic void extractFile(File file) throws DominoException
DominoException
Copyright © 2014–2018. All rights reserved.