Class FreeBox

java.lang.Object
org.mp4parser.boxes.iso14496.part12.FreeBox
All Implemented Interfaces:
Box, ParsableBox

public class FreeBox extends Object implements ParsableBox

4cc = ""free""

A free box. Just a placeholder to enable editing without rewriting the whole file.
  • Field Details

  • Constructor Details

    • FreeBox

      public FreeBox()
    • FreeBox

      public FreeBox(int size)
  • Method Details

    • getData

      public ByteBuffer getData()
    • setData

      public void setData(ByteBuffer data)
    • getBox

      public void getBox(WritableByteChannel os) throws IOException
      Description copied from interface: Box
      Writes the complete box - size | 4-cc | content - to the given writableByteChannel.
      Specified by:
      getBox in interface Box
      Parameters:
      os - the box's sink
      Throws:
      IOException - in case of problems with the Channel
    • getSize

      public long getSize()
      Specified by:
      getSize in interface Box
    • getType

      public String getType()
      Description copied from interface: Box
      The box's 4-cc type.
      Specified by:
      getType in interface Box
      Returns:
      the 4 character type of the box
    • parse

      public void parse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException
      Description copied from interface: ParsableBox
      Parses the box excluding the already parsed header (size, 4cc, [long-size], [user-type]). The remaining size of the box is the contentSize, contentSize number of bytes should be read from the box source (readableByteChannel). If you need the header buffer at a later stage you have to create a copy.
      Specified by:
      parse in interface ParsableBox
      Parameters:
      dataSource - the source for this box
      header - the box' already parsed header (create copy if you need it later as it will be overwritten)
      contentSize - remaining bytes of this box
      boxParser - use it to parse sub-boxes.
      Throws:
      IOException - in case of an error during a read operation
    • addAndReplace

      public void addAndReplace(ParsableBox parsableBox)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object