Interface ContentAccess
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AudioResource,BytesImage,FileItemWrap,ImageResource,InternalResource,VideoResource
public interface ContentAccess extends Serializable
This interface enables access to arbitrary document content such as a PDF. It could be fetched from the database or it could be generated on the fly.
For larger content, consider using
ContentStreamAccess, as it does not require the entire binary content to be held in memory.- Since:
- 1.0.0
- Author:
- Martin Shevchenko
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]getBytes()The bytes that make up the document content.StringgetDescription()Some text that describes the document content.StringgetMimeType()The mime type of the document.
-
-
-
Method Detail
-
getBytes
byte[] getBytes()
The bytes that make up the document content.- Returns:
- the bytes
-
getDescription
String getDescription()
Some text that describes the document content. This text could be the document filename or title, for instance.- Returns:
- a short document description
-
getMimeType
String getMimeType()
The mime type of the document. For example, "image/jpeg", "image/gif", "application/pdf" etc- Returns:
- the mime type.
-
-