public class Blobs
extends java.lang.Object
Blob
.Modifier and Type | Method and Description |
---|---|
static Blob |
from(java.io.InputStream inputStream) |
static Blob |
from(JsonTemplate template) |
static Blob |
from(java.nio.file.Path file) |
static Blob |
from(java.lang.String content)
Creates a
StringBlob with UTF-8 encoding. |
static Blob |
from(WritableContents writable,
boolean retryable) |
static byte[] |
writeToByteArray(Blob blob)
Writes the BLOB to a byte array.
|
static java.lang.String |
writeToString(Blob blob)
Writes the BLOB to a string with UTF-8 decoding.
|
public static Blob from(java.io.InputStream inputStream)
public static Blob from(java.nio.file.Path file)
public static Blob from(JsonTemplate template)
public static Blob from(java.lang.String content)
StringBlob
with UTF-8 encoding.content
- the string to create the blob fromStringBlob
public static Blob from(WritableContents writable, boolean retryable)
public static java.lang.String writeToString(Blob blob) throws java.io.IOException
blob
- the BLOB to writejava.io.IOException
- if writing out the BLOB contents failspublic static byte[] writeToByteArray(Blob blob) throws java.io.IOException
blob
- the BLOB to writejava.io.IOException
- if writing out the BLOB contents fails