public final class Blob extends AbstractBlob
| Constructor | Description |
|---|---|
Blob(byte[] data) |
Creates a new Blob from an byte array
|
Blob(File file) |
Creates a new Blob from a File
|
Blob(InputStream is) |
Creates a new Blob from an InputStream
|
Blob(InputStream is,
String contentDispositionHeader) |
Creates a new Blob from an InputStream and the contents of a
Content-Disposition header
|
Blob(Path path) |
Creates a new Blob from a File
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(Object obj) |
|
byte[] |
getData() |
Get the contents of this Blob as a byte array
|
int |
hashCode() |
|
String |
toString() |
fromFile, fromInputStream, fromPath, getCreationDate, getFileName, getFormDataContentDisposition, getModificationDate, toFile, toFile, toInputStreampublic Blob(File file) throws IOException
file - The File instanceIOException - if reading failspublic Blob(Path path) throws IOException
path - The Path instanceIOException - if reading failspublic Blob(InputStream is) throws IOException
is - The stream to read fromIOException - if reading failspublic Blob(InputStream is, String contentDispositionHeader) throws IOException
is - The stream to read fromcontentDispositionHeader - String of the Content-Disposition headerIOException - if reading failspublic Blob(byte[] data)
data - The byte array to wrappublic byte[] getData()
AbstractBlobgetData in class AbstractBlobCopyright © 2021. All rights reserved.