Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.automation.client.model
Class StringBlob

java.lang.Object
  extended by org.nuxeo.ecm.automation.client.model.Blob
      extended by org.nuxeo.ecm.automation.client.model.StringBlob
All Implemented Interfaces:
Serializable, OperationInput

public class StringBlob
extends Blob

An in memory bob containing a string.

Author:
bstefanescu
See Also:
Serialized Form

Constructor Summary
StringBlob(String content)
           
StringBlob(String fileName, String content)
          Creates a StringBlob that is used in the Blob.Attach call
StringBlob(String fileName, String content, String mimeType)
          Creates a StringBlob that is used in the Blob.Attach call
 
Method Summary
 String getCharset()
           
 InputStream getStream()
           
 void setCharset(String charset)
          Set the charset to be used when to transform the content into a byte stream.
 String toString()
           
 
Methods inherited from class org.nuxeo.ecm.automation.client.model.Blob
fromBase64String, fromBase64String, getFileName, getInputRef, getInputType, getLength, getMimeType, isBinary, setFileName, setMimeType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringBlob

public StringBlob(String content)

StringBlob

public StringBlob(String fileName,
                  String content)
Creates a StringBlob that is used in the Blob.Attach call

Parameters:
fileName - Name that is used to save the file as
content - Base64 encoded content

StringBlob

public StringBlob(String fileName,
                  String content,
                  String mimeType)
Creates a StringBlob that is used in the Blob.Attach call

Parameters:
fileName - Name that is used to save the file as
content - Base64 encoded content
mimeType - Mime type to use for this content
Method Detail

setCharset

public void setCharset(String charset)
Set the charset to be used when to transform the content into a byte stream. If npt specified the default charset will be used.

Parameters:
charset -

getCharset

public String getCharset()

getStream

public InputStream getStream()
                      throws IOException
Specified by:
getStream in class Blob
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Blob

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.