|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
net.shredzone.ifish.ltr
Class OggFastFileStream
java.lang.Objectnet.shredzone.ifish.ltr.OggFastFileStream
- All Implemented Interfaces:
- PhysicalOggStream
public class OggFastFileStream
- extends Object
- implements PhysicalOggStream
- extends Object
Replacement file reader class. The original J-Ogg FileStream has the major disadvantage that it reads the entire file, even though we just need a few byte from it. This FastFileStream will only read as little information as possible.
- Version:
- $Id: OggFastFileStream.java 289 2009-04-28 21:21:46Z shred $
| Constructor Summary | |
|---|---|
OggFastFileStream(RandomAccessFile in)
Constructor for the OggFastFileStream object |
|
| Method Summary | |
|---|---|
void |
close()
Closes the stream |
int |
getContentLength()
Get the content length |
Collection |
getLogicalStreams()
Get a collection of the logical streams. |
OggPage |
getOggPage(int index)
Get an OggPage. |
int |
getPosition()
Get the current position |
boolean |
isOpen()
Checks if the file is open. |
boolean |
isSeekable()
Is this FileStream seekable? |
void |
setTime(long granulePosition)
Move the stream to a certain time position. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
OggFastFileStream
public OggFastFileStream(RandomAccessFile in) throws OggFormatException, IOException
- Constructor for the OggFastFileStream object
- Parameters:
in- RandomAccessFile to be read- Throws:
OggFormatException- Bad formatIOException- IO error
| Method Detail |
|---|
getLogicalStreams
public Collection getLogicalStreams()
- Get a collection of the logical streams.
- Specified by:
getLogicalStreamsin interfacePhysicalOggStream
- Returns:
- Collection
- See Also:
LogicalOggStream
isOpen
public boolean isOpen()
- Checks if the file is open.
- Specified by:
isOpenin interfacePhysicalOggStream
- Returns:
- true: open, false: closed
close
public void close() throws IOException
- Closes the stream
- Specified by:
closein interfacePhysicalOggStream
- Throws:
IOException- IO error
getContentLength
public int getContentLength()
- Get the content length
- Returns:
- The content length
getPosition
public int getPosition()
- Get the current position
- Returns:
- Position
getOggPage
public OggPage getOggPage(int index) throws IOException
- Get an OggPage.
- Specified by:
getOggPagein interfacePhysicalOggStream
- Parameters:
index- Index to be fetched- Returns:
- The oggPage value
- Throws:
IOException- IO Error
setTime
public void setTime(long granulePosition) throws IOException
- Move the stream to a certain time position.
- Specified by:
setTimein interfacePhysicalOggStream
- Parameters:
granulePosition- The new position- Throws:
IOExceptionOggFormatException- if the ogg stream is corrupted
isSeekable
public boolean isSeekable()
- Is this FileStream seekable? We pretend we are not, so J-Ogg
will not try to do some funny stuff... ;)
- Specified by:
isSeekablein interfacePhysicalOggStream
- Returns:
- false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2007-2011 shredzone.org. All Rights Reserved.
net.shredzone.ifish.ltr.OggFastFileStream