|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.media.NIOMediaBean
An implementation of the Media
interface using Java2 1.4's new I/O API.
This class is not in use yet...
Field Summary |
Fields inherited from interface javax.emb.Media (src) |
MIME_TYPE_UNKNOWN |
Constructor Summary | |
NIOMediaBean(java.io.File mediaFile,
java.lang.String mimeType)
|
|
NIOMediaBean(java.io.InputStream contentStream,
java.lang.String mimeType,
java.lang.String name)
|
Method Summary | |
byte[] |
getContent()
Returns the complete media content as a byte array. |
MediaFormat (src) |
getFormat()
Queries a suitable media format instance from the MediaFormatRegistry singleton and returns it. |
MediaHeader (src) |
getHeader()
Returns the receiver's header information. |
java.lang.String |
getMimeType()
Returns a mime type for the receiver's content as a string. |
java.lang.String |
getName()
Returns the receiver's non-unique name as a String. |
Media (src) |
getProxy()
Returns a media object that can be used as a proxy for the receiver, e.g. |
long |
getSize()
This operation returns the receiver's content size in number of bytes as a long value. |
int |
readContent(long position,
byte[] buffer)
Similarly to input streams, this method fills the given buffer with content read from the media object. |
int |
readContent(long position,
byte[] buffer,
int offset,
int length)
Similar to input streams, this method fills the given buffer with content read from the media object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NIOMediaBean(java.io.InputStream contentStream, java.lang.String mimeType, java.lang.String name) throws MediaException (src)
public NIOMediaBean(java.io.File mediaFile, java.lang.String mimeType) throws MediaException (src)
Method Detail |
public byte[] getContent() throws MediaException (src)
Media (src)
getContent
in interface Media (src)
MediaException (src)
public int readContent(long position, byte[] buffer) throws MediaException (src)
Media (src)
readContent
in interface Media (src)
position
- the position in media to copy from.buffer
- the byte array to store content.
MediaException (src)
public int readContent(long position, byte[] buffer, int offset, int length) throws MediaException (src)
Media (src)
readContent
in interface Media (src)
position
- the position in media to copy from.buffer
- the byte array to store content.offset
- the offset in the buffer to begin storing content.length
- the number of bytes to copy from the content.
MediaException (src)
public MediaFormat (src) getFormat() throws MediaException (src)
Media (src)
getFormat
in interface Media (src)
MediaException (src)
public MediaHeader (src) getHeader() throws MediaException (src)
Media (src)
getHeader
in interface Media (src)
MediaException (src)
public java.lang.String getMimeType() throws MediaException (src)
Media (src)
getMimeType
in interface Media (src)
MediaException (src)
public java.lang.String getName() throws MediaException (src)
Media (src)
getName
in interface Media (src)
MediaException (src)
public long getSize() throws MediaException (src)
Media (src)
getSize
in interface Media (src)
MediaException (src)
public Media (src) getProxy() throws MediaException (src)
Media (src)
getProxy
in interface Media (src)
MediaException (src)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |