org.nuxeo.ecm.core.api.impl.blob
Class StreamBlob
java.lang.Object
org.nuxeo.ecm.core.api.impl.blob.AbstractBlob
org.nuxeo.ecm.core.api.impl.blob.StreamBlob
- All Implemented Interfaces:
- Blob
- Direct Known Subclasses:
- DefaultStreamBlob
public abstract class StreamBlob
- extends AbstractBlob
- Author:
- Bogdan Stefanescu
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.nuxeo.ecm.core.api.Blob |
getDigest, getEncoding, getFilename, getMimeType, getStream, isPersistent, persist, setDigest, setEncoding, setFilename, setMimeType |
StreamBlob
public StreamBlob()
readBytes
public static byte[] readBytes(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
readBytes
public static byte[] readBytes(java.io.Reader reader)
throws java.io.IOException
- Throws:
java.io.IOException
readString
public static java.lang.String readString(java.io.Reader reader)
throws java.io.IOException
- Throws:
java.io.IOException
getByteArray
public byte[] getByteArray()
throws java.io.IOException
- Throws:
java.io.IOException
getString
public java.lang.String getString()
throws java.io.IOException
- Throws:
java.io.IOException
getReader
public java.io.Reader getReader()
throws java.io.IOException
- Throws:
java.io.IOException
getLength
public long getLength()
- Description copied from interface:
Blob
- Gets the data length in bytes if known.
- Returns:
- the data length or -1 if not known
asByteArrayBlob
public ByteArrayBlob asByteArrayBlob()
throws java.io.IOException
- Throws:
java.io.IOException
asStringBlob
public StringBlob asStringBlob()
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2010 Nuxeo SAS. All Rights Reserved.