|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.tuneology.avm.media.MediaBuffer
This class implements an in-memory implementation of the MediaData interface.
| Constructor Summary | |
MediaBuffer(java.io.InputStream str)
|
|
MediaBuffer(long sz,
MediaProperties p)
|
|
| Method Summary | |
boolean |
canSeek()
Returns true if the file is capable of seeking. |
void |
close()
|
java.io.File |
getFile()
Returns a File object by which the contents can be read. |
long |
getFilePointer()
Returns the current position in the file. |
java.lang.String |
getPath()
Returns the pathname of the file if it has one, blank otherwise. |
MediaProperties |
getProperties()
|
boolean |
isStream()
Returns true if the source is a stream of indefinate length. |
long |
length()
Returns the length of the file. |
int |
read(byte[] b,
int off,
int len)
|
void |
releaseFile(java.io.File f)
Deletes the contents of the file if it's a temp file. |
void |
seek(long pos)
Moves the current position in the file. |
void |
setLength(long newLength)
|
void |
write(byte[] b,
int off,
int len)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MediaBuffer(long sz,
MediaProperties p)
sz - the initial size of the bufferpublic MediaBuffer(java.io.InputStream str)
str - the initial contents of the buffer| Method Detail |
public MediaProperties getProperties()
getProperties in interface MediaDatapublic java.lang.String getPath()
MediaDatagetPath in interface MediaDatacom.tuneology.avm.media.MediaData
public java.io.File getFile()
throws java.io.IOException
MediaDatagetFile in interface MediaDatajava.io.IOException -
public void releaseFile(java.io.File f)
throws java.io.IOException
MediaDatareleaseFile in interface MediaDatajava.io.IOException - public boolean isStream()
isStream in interface MediaData
public long length()
throws java.io.IOException
MediaDatalength in interface MediaDatajava.io.IOException - public boolean canSeek()
canSeek in interface MediaData
public void seek(long pos)
throws java.io.IOException
MediaDataseek in interface MediaDatapos - java.io.IOException -
public long getFilePointer()
throws java.io.IOException
getFilePointer in interface MediaDatajava.io.IOException -
public void setLength(long newLength)
throws java.io.IOException
setLength in interface MediaDatanewLength - java.io.IOException -
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in interface MediaDatab - off - len - java.io.IOException -
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in interface MediaDatajava.io.IOException -
public void close()
throws java.io.IOException
close in interface MediaDatajava.io.IOException -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||