Nuxeo ECM Projects 5.4.3-SNAPSHOT

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

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

public class Binary
extends Object
implements 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(File file, String digest)
           
Binary(File file, String digest, String repoName)
           
 
Method Summary
 String getDigest()
          Gets a string representation of the hex digest of the binary.
 long getLength()
          Gets the length of the binary.
 InputStream getStream()
          Gets an input stream for the binary.
 StreamSource getStreamSource()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Binary

public Binary(File file,
              String digest)

Binary

public Binary(File file,
              String digest,
              String repoName)
Method Detail

getLength

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

Returns:
the length of the binary

getDigest

public 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 InputStream getStream()
                      throws IOException
Gets an input stream for the binary.

Returns:
the input stream
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object

getStreamSource

public StreamSource getStreamSource()

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.