public class StringBlob extends AbstractBlob implements Serializable
| Modifier and Type | Field and Description | 
|---|---|
protected String | 
string  | 
digest, encoding, filename, mimeType, TEXT_PLAIN, UTF_8| Constructor and Description | 
|---|
StringBlob(String content)  | 
StringBlob(String string,
          String mimeType)  | 
StringBlob(String string,
          String mimeType,
          String encoding)  | 
StringBlob(String string,
          String mimeType,
          String encoding,
          String filename)  | 
| Modifier and Type | Method and Description | 
|---|---|
byte[] | 
getByteArray()  | 
long | 
getLength()
Gets the data length in bytes if known. 
 | 
InputStream | 
getStream()
Gets an  
InputStream for the data of this blob. | 
String | 
getString()  | 
equals, equalsStream, getCloseableFile, getCloseableFile, getDigest, getDigestAlgorithm, getEncoding, getFile, getFilename, getMimeType, hashCode, setDigest, setEncoding, setFilename, setMimeType, transferTo, transferTopublic StringBlob(String content)
public StringBlob(String string, String mimeType)
public StringBlob(String string, String mimeType, String encoding)
public StringBlob(String string, String mimeType, String encoding, String filename)
public long getLength()
BlobgetLength in interface BlobgetLength in class AbstractBlobpublic InputStream getStream() throws IOException
BlobInputStream for the data of this blob.
 
 The contract of Blob is that this method can be called several times and will correctly return a new
 InputStream each time. In other words, several reads of the Blob can be done.
 
 Like all InputStream, the result must be closed when done with it to avoid resource leaks.
getStream in interface BlobIOExceptionpublic byte[] getByteArray() throws IOException
getByteArray in interface BlobgetByteArray in class AbstractBlobIOExceptionCopyright © 2019 Nuxeo. All rights reserved.