Modifier and Type | Method and Description |
---|---|
static Blob |
from(BlobWriter writer) |
static Blob |
from(InputStream inputStream) |
static Blob |
from(Path file) |
static Blob |
from(String content)
Creates a
StringBlob with UTF-8 encoding. |
static byte[] |
writeToByteArray(Blob blob)
Writes the BLOB to a byte array.
|
static BlobDescriptor |
writeToFileWithLock(Blob blob,
Path blobFile)
Writes the BLOB to a file with an exclusive lock.
|
static String |
writeToString(Blob blob)
Writes the BLOB to a string with UTF-8 decoding.
|
public static Blob from(InputStream inputStream)
public static Blob from(String content)
StringBlob
with UTF-8 encoding.content
- the string to create the blob fromStringBlob
public static Blob from(BlobWriter writer)
public static String writeToString(Blob blob) throws IOException
blob
- the BLOB to writeIOException
- if writing out the BLOB contents failspublic static byte[] writeToByteArray(Blob blob) throws IOException
blob
- the BLOB to writeIOException
- if writing out the BLOB contents failspublic static BlobDescriptor writeToFileWithLock(Blob blob, Path blobFile) throws IOException
blob
- the BLOB to to writeblobFile
- the file to write toBlobDescriptor
of the written BLOBIOException
- if writing the BLOB failsCopyright © 2018. All rights reserved.