public abstract class AbstractFileDataElement extends AbstractDataElement implements FileDataElement
Constructor and Description |
---|
AbstractFileDataElement() |
Modifier and Type | Method and Description |
---|---|
long |
getSize()
Returns the number of bytes of data in this data element.
|
java.io.InputStream |
read()
Provides access to the data as an InputStream.
|
long |
write(java.io.InputStream data,
boolean append)
Writes new data into the data element.
|
delete, deleteAttributes, getAttribute, getAttributes, getType, listAttributes, read, setAttributes, setType, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFile
delete, deleteAttribute, deleteAttributes, getAttribute, getAttributes, getDigitalObject, getName, getType, listAttributes, read, setAttribute, setAttributes, setType, write
public java.io.InputStream read() throws RepositoryException
DataElement
read
in interface DataElement
RepositoryException
public long write(java.io.InputStream data, boolean append) throws java.io.IOException, RepositoryException
DataElement
write
in interface DataElement
data
- an InputStream streaming the new dataappend
- whether to append the new data to the existing datajava.io.IOException
RepositoryException
public long getSize() throws RepositoryException
DataElement
getSize
in interface DataElement
RepositoryException