public class Binary extends NamedResource implements File
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
__logger
The binary's logger
|
protected String |
_hash
the binary's hash
|
protected String |
_path
The path of the resource in the repository
|
_filename_buffer, _encoding, _lastModificationDate, _mimeType, _repositoryData, _tmpFile| Constructor and Description |
|---|
Binary()
Default constructor
|
Binary(RepositoryData repositoryData,
String hash)
Constructor to use when reading the binary from the repository
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeOutputStream(ByteArrayOutputStream outputStream)
Closes the given
OutputStream |
String |
getHash()
Retrieves the hash of the resource's data
|
String |
getName()
Retrieves the file's name
|
String |
getPath()
Returns the path of this resource in its hierarchy (which is a subset of the whole repository).
|
getFilename, setFilenamegetEncoding, getInputStream, getLastModificationDate, getLength, getMimeType, getOutputStream, setEncoding, setInputStream, setLastModificationDate, setMimeTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInputStream, getLastModificationDate, getLength, getMimeType, setLastModificationDate, setMimeTypepublic Binary()
public Binary(RepositoryData repositoryData, String hash)
repositoryData - the repository data containing the resource's datahash - the hash of the resource's dataprotected void closeOutputStream(ByteArrayOutputStream outputStream) throws IOException
ResourceOutputStreamcloseOutputStream in class ResourceoutputStream - the OutputStream to closeIOException - if an error occurs while registering the streampublic String getHash()