Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.storage.sql
Class Binary

java.lang.Object
  extended by org.nuxeo.ecm.core.storage.sql.Binary
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DefaultBinaryManager.ScrambledBinary

public class Binary
extends java.lang.Object
implements java.io.Serializable

A binary object that can be read, and has a length and a digest.

Author:
Florent Guillaume, Bogdan Stefanescu
See Also:
Serialized Form

Constructor Summary
Binary(java.io.File file, java.lang.String digest)
           
Binary(java.io.File file, java.lang.String digest, java.lang.String repoName)
           
 
Method Summary
 java.lang.String getDigest()
          Gets a string representation of the hex digest of the binary.
 long getLength()
          Gets the length of the binary.
 java.io.InputStream getStream()
          Gets an input stream for the binary.
 StreamSource getStreamSource()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Binary

public Binary(java.io.File file,
              java.lang.String digest)

Binary

public Binary(java.io.File file,
              java.lang.String digest,
              java.lang.String repoName)
Method Detail

getLength

public long getLength()
Gets the length of the binary.

Returns:
the length of the binary

getDigest

public java.lang.String getDigest()
Gets a string representation of the hex digest of the binary.

Returns:
the digest, characters are in the range [0-9a-f]

getStream

public java.io.InputStream getStream()
                              throws java.io.IOException
Gets an input stream for the binary.

Returns:
the input stream
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getStreamSource

public StreamSource getStreamSource()

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.