| Modifier and Type | Method and Description | 
|---|---|
static Blob | 
createBlob(byte[] bytes)
Creates a  
Blob backed by the given bytes array. | 
static Blob | 
createBlob(byte[] bytes,
          String mimeType)
Creates a  
Blob backed by the given bytes array. | 
static Blob | 
createBlob(byte[] bytes,
          String mimeType,
          String encoding)
Creates a  
Blob backed by the given bytes array. | 
static Blob | 
createBlob(File file)
 | 
static Blob | 
createBlob(File file,
          String mimeType)
 | 
static Blob | 
createBlob(File file,
          String mimeType,
          String encoding)
 | 
static Blob | 
createBlob(File file,
          String mimeType,
          String encoding,
          String filename)
 | 
static Blob | 
createBlob(InputStream in)
Creates a  
Blob from an InputStream, by saving it to a temporary file. | 
static Blob | 
createBlob(InputStream in,
          String mimeType)
Creates a  
Blob from an InputStream, by saving it to a temporary file. | 
static Blob | 
createBlob(InputStream in,
          String mimeType,
          String encoding)
Creates a  
Blob from an InputStream, by saving it to a temporary file. | 
static Blob | 
createBlob(InputStream in,
          String mimeType,
          String encoding,
          File tmpDir)
Creates a  
Blob from an InputStream, by saving it to a temporary file. | 
static Blob | 
createBlob(String string)
Creates a  
Blob backed by the given string, with MIME type "text/plain" and encoding "UTF-8". | 
static Blob | 
createBlob(String string,
          String mimeType)
Creates a  
Blob backed by the given string, with encoding "UTF-8". | 
static Blob | 
createBlob(String string,
          String mimeType,
          String encoding)
Creates a  
Blob backed by the given string. | 
static Blob | 
createBlob(String string,
          String mimeType,
          String encoding,
          String filename)
Creates a  
Blob backed by the given string. | 
static Blob | 
createBlobWithExtension(String ext)
 | 
static Blob | 
createJSONBlob(String json)
Create a  
Blob backed by the given JSON string. | 
static Blob | 
createJSONBlobFromValue(Object value)
Create a  
Blob backed by the JSON for an arbitrary value. | 
public static Blob createBlob(File file) throws IOException
file - fileIOExceptionpublic static Blob createBlob(File file, String mimeType) throws IOException
file - filemimeType - the MIME typeIOExceptionpublic static Blob createBlob(File file, String mimeType, String encoding) throws IOException
file - filemimeType - the MIME typeencoding - the encodingIOExceptionpublic static Blob createBlob(File file, String mimeType, String encoding, String filename) throws IOException
file - filemimeType - the MIME typeencoding - the encodingfilename - the blob filenameIOExceptionpublic static Blob createBlobWithExtension(String ext) throws IOException
ext - the extensionIOExceptionpublic static Blob createBlob(InputStream in) throws IOException
in - the input stream, which is closed after useIOExceptionpublic static Blob createBlob(InputStream in, String mimeType) throws IOException
in - the input stream, which is closed after usemimeType - the MIME typeIOExceptionpublic static Blob createBlob(InputStream in, String mimeType, String encoding) throws IOException
in - the input stream, which is closed after usemimeType - the MIME typeencoding - the encodingIOExceptionpublic static Blob createBlob(InputStream in, String mimeType, String encoding, File tmpDir) throws IOException
in - the input stream, which is closed after usemimeType - the MIME typeencoding - the encodingtmpDir - the temporary directory for file creationIOExceptionpublic static Blob createBlob(byte[] bytes)
Blob backed by the given bytes array.bytes - the bytes arraypublic static Blob createBlob(byte[] bytes, String mimeType) throws IOException
Blob backed by the given bytes array.bytes - the bytes arraymimeType - the MIME typeIOExceptionpublic static Blob createBlob(byte[] bytes, String mimeType, String encoding) throws IOException
Blob backed by the given bytes array.bytes - the bytes arraymimeType - the MIME typeencoding - the encodingIOExceptionpublic static Blob createBlob(String string)
Blob backed by the given string, with MIME type "text/plain" and encoding "UTF-8".string - the stringpublic static Blob createBlob(String string, String mimeType)
Blob backed by the given string, with encoding "UTF-8".string - the stringmimeType - the MIME typepublic static Blob createBlob(String string, String mimeType, String encoding)
Blob backed by the given string.string - the stringmimeType - the MIME typeencoding - the encodingpublic static Blob createBlob(String string, String mimeType, String encoding, String filename)
Blob backed by the given string.string - the stringmimeType - the MIME typeencoding - the encodingfilename - the blob filenamepublic static Blob createJSONBlob(String json)
Blob backed by the given JSON string.json - the JSON stringpublic static Blob createJSONBlobFromValue(Object value) throws IOException
Blob backed by the JSON for an arbitrary value.
 The value's internal classes may be annotated with Jackson 2 annotations.
value - the valueIOExceptionCopyright © 2019 Nuxeo. All rights reserved.