DEFAULT_FILE_EXTENSION
Constructor and Description |
---|
FileBlob(File file)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
File |
getFile()
Returns the file.
|
String |
getFileExtension()
Returns the file extension for this object.
|
long |
getSize()
Returns the object size in bytes.
|
InputStream |
open()
Returns an
InputStream for obtaining the BLOB contents. |
String |
toString() |
public FileBlob(File file)
file
- the target filepublic File getFile()
public InputStream open() throws IOException
Blob
InputStream
for obtaining the BLOB contents.open
in interface Blob
InputStream
IOException
- if I/O error was occurred while opening the contentspublic long getSize() throws IOException
Blob
getSize
in interface Blob
IOException
- if I/O error was occurred while obtaining the object sizepublic String getFileExtension()
Blob
Blob.DEFAULT_FILE_EXTENSION
will be returned.getFileExtension
in interface Blob
null
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.