|
|||||||||
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 bufferMethod Detail |
public MediaProperties getProperties()
getProperties
in interface MediaData
public java.lang.String getPath()
MediaData
getPath
in interface MediaData
com.tuneology.avm.media.MediaData
public java.io.File getFile() throws java.io.IOException
MediaData
getFile
in interface MediaData
java.io.IOException
- public void releaseFile(java.io.File f) throws java.io.IOException
MediaData
releaseFile
in interface MediaData
java.io.IOException
- public boolean isStream()
isStream
in interface MediaData
public long length() throws java.io.IOException
MediaData
length
in interface MediaData
java.io.IOException
- public boolean canSeek()
canSeek
in interface MediaData
public void seek(long pos) throws java.io.IOException
MediaData
seek
in interface MediaData
pos
- java.io.IOException
- public long getFilePointer() throws java.io.IOException
getFilePointer
in interface MediaData
java.io.IOException
- public void setLength(long newLength) throws java.io.IOException
setLength
in interface MediaData
newLength
- java.io.IOException
- public int read(byte[] b, int off, int len) throws java.io.IOException
read
in interface MediaData
b
- off
- len
- java.io.IOException
- public void write(byte[] b, int off, int len) throws java.io.IOException
write
in interface MediaData
java.io.IOException
- public void close() throws java.io.IOException
close
in interface MediaData
java.io.IOException
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |