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 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(InputStream in)
throws IOException
- Throws:
IOException
readBytes
public static byte[] readBytes(Reader reader)
throws IOException
- Throws:
IOException
readString
public static String readString(Reader reader)
throws IOException
- Throws:
IOException
getByteArray
public byte[] getByteArray()
throws IOException
- Throws:
IOException
getString
public String getString()
throws IOException
- Throws:
IOException
getReader
public Reader getReader()
throws IOException
- Throws:
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 IOException
- Throws:
IOException
asStringBlob
public StringBlob asStringBlob()
throws IOException
- Throws:
IOException
Copyright © 2011 Nuxeo SAS. All Rights Reserved.