@Immutable public class InMemoryBinaryValue extends AbstractBinary
BinaryValue
that keeps the binary data in-memory.EMPTY_CONTENT
Constructor and Description |
---|
InMemoryBinaryValue(BinaryStore store,
BinaryKey key,
byte[] bytes) |
InMemoryBinaryValue(BinaryStore store,
byte[] bytes) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes() |
String |
getMimeType() |
String |
getMimeType(String name) |
long |
getSize()
Get the length of this binary data.
|
protected InputStream |
internalStream() |
compareTo, dispose, equals, getHash, getHexHash, getKey, getReadableSize, getStream, hashCode, keyFor, read, toString
public InMemoryBinaryValue(BinaryStore store, byte[] bytes)
public InMemoryBinaryValue(BinaryStore store, BinaryKey key, byte[] bytes)
public long getSize()
BinaryValue
Note that this method, unlike the standard Binary.getSize()
method, does not throw an exception.
public byte[] getBytes()
public String getMimeType() throws IOException, RepositoryException
IOException
RepositoryException
public String getMimeType(String name) throws IOException, RepositoryException
IOException
RepositoryException
protected InputStream internalStream()
internalStream
in class AbstractBinary
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.