Interface Binary
public interface Binary
Binary data.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Releases all resources associated with this binary and informs the implementation that these resources may now be reclaimed.long
getSize()
Returns anInputStream
representation of this binary.
-
Method Details
-
getStream
InputStream getStream()Returns anInputStream
representation of this binary. Each call togetStream()
returns a new stream. The caller is responsible for callingclose()
on the returned stream.- Returns:
- A stream representation of this binary.
- Throws:
IllegalStateException
- ifdispose()
has already been called.WebFileException
- if another error occurs.
-
getSize
long getSize()- Returns:
- the size of this binary in bytes.
- Throws:
IllegalStateException
- ifdispose()
has already been called.WebFileException
- if another error occurs.
-
dispose
void dispose()Releases all resources associated with this binary and informs the implementation that these resources may now be reclaimed. An application should call this method when it is finished with the binary object.
-