Package org.mp4parser
Class IsoFile
- java.lang.Object
-
- org.mp4parser.BasicContainer
-
- org.mp4parser.IsoFile
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Container
@DoNotParseDetail public class IsoFile extends BasicContainer implements Closeable
The most upper container for ISO Boxes. It is a container box that is a file. Uses IsoBufferWrapper to access the underlying file.
-
-
Constructor Summary
Constructors Constructor Description IsoFile(File file)IsoFile(String file)IsoFile(ReadableByteChannel readableByteChannel)IsoFile(ReadableByteChannel readableByteChannel, BoxParser boxParser)
-
Method Summary
Modifier and Type Method Description static StringbytesToFourCC(byte[] type)voidclose()static byte[]fourCCtoBytes(String fourCC)voidgetBox(WritableByteChannel os)MovieBoxgetMovieBox()Shortcut to get the MovieBox since it is often needed and present in nearly all ISO 14496 files (at least if they are derived from MP4 ).longgetSize()StringtoString()-
Methods inherited from class org.mp4parser.BasicContainer
addBox, getBoxes, getBoxes, getBoxes, getContainerSize, initContainer, setBoxes, writeContainer
-
-
-
-
Constructor Detail
-
IsoFile
public IsoFile(String file) throws IOException
- Throws:
IOException
-
IsoFile
public IsoFile(File file) throws IOException
- Throws:
IOException
-
IsoFile
public IsoFile(ReadableByteChannel readableByteChannel) throws IOException
- Parameters:
readableByteChannel- the data source- Throws:
IOException- in case I/O error
-
IsoFile
public IsoFile(ReadableByteChannel readableByteChannel, BoxParser boxParser) throws IOException
- Throws:
IOException
-
-
Method Detail
-
fourCCtoBytes
public static byte[] fourCCtoBytes(String fourCC)
-
bytesToFourCC
public static String bytesToFourCC(byte[] type)
-
getSize
public long getSize()
-
getMovieBox
public MovieBox getMovieBox()
Shortcut to get the MovieBox since it is often needed and present in nearly all ISO 14496 files (at least if they are derived from MP4 ).- Returns:
- the MovieBox or
null
-
getBox
public void getBox(WritableByteChannel os) throws IOException
- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
toString
public String toString()
- Overrides:
toStringin classBasicContainer
-
-