ModeShape Distribution 3.0.0.Beta4

org.modeshape.jcr.value.binary
Class StoredBinaryValue

java.lang.Object
  extended by org.modeshape.jcr.value.binary.AbstractBinary
      extended by org.modeshape.jcr.value.binary.StoredBinaryValue
All Implemented Interfaces:
Serializable, Comparable<BinaryValue>, Binary, BinaryValue

@Immutable
public class StoredBinaryValue
extends AbstractBinary

A BinaryValue implementation that gets the content from the BinaryStore.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.modeshape.jcr.value.binary.AbstractBinary
EMPTY_CONTENT
 
Constructor Summary
StoredBinaryValue(BinaryStore store, BinaryKey key, long size)
           
 
Method Summary
 String getMimeType()
           
 String getMimeType(String name)
           
 long getSize()
          Get the length of this binary data.
 InputStream getStream()
           
 
Methods inherited from class org.modeshape.jcr.value.binary.AbstractBinary
compareTo, dispose, equals, getHash, getHexHash, getKey, getReadableSize, hashCode, keyFor, read, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StoredBinaryValue

public StoredBinaryValue(BinaryStore store,
                         BinaryKey key,
                         long size)
Method Detail

getSize

public long getSize()
Description copied from interface: BinaryValue
Get the length of this binary data.

Note that this method, unlike the standard Binary.getSize() method, does not throw an exception.

Returns:
the number of bytes in this binary data

getStream

public InputStream getStream()
                      throws BinaryStoreException
Throws:
BinaryStoreException

getMimeType

public String getMimeType()
                   throws IOException,
                          RepositoryException
Throws:
IOException
RepositoryException

getMimeType

public String getMimeType(String name)
                   throws IOException,
                          RepositoryException
Throws:
IOException
RepositoryException

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.