class IsoFile extends BasicContainer implements Closeable {
    private final ReadableByteChannel readableByteChannel;

    private FileInputStream fis;


    public IsoFile(String file) throws IOException {
        this(new File(file));
    }

    public IsoFile(File file) throws IOException {
        this.fis = new FileInputStream(file);
        this.readableByteChannel = fis.getChannel();
        initContainer(readableByteChannel, -1, new PropertyBoxParserImpl());
    }

    /**
     * @param readableByteChannel the data source
     * @throws IOException in case I/O error
     */
    public IsoFile(ReadableByteChannel readableByteChannel) throws IOException {
        this(readableByteChannel, new PropertyBoxParserImpl());
    }

    public IsoFile(ReadableByteChannel readableByteChannel, BoxParser boxParser) throws IOException {
        this.readableByteChannel = readableByteChannel;
        initContainer(readableByteChannel, -1, boxParser);
    }

    public static byte[] fourCCtoBytes(String fourCC) {
        byte[] result = new byte[4];
        if (fourCC != null) {
            for (int i = 0; i < Math.min(4, fourCC.length()); i++) {
                result[i] = (byte) fourCC.charAt(i);
            }
        }
        return result;
    }

    public static String bytesToFourCC(byte[] type) {
        byte[] result = new byte[]{0, 0, 0, 0};
        if (type != null) {
            System.arraycopy(type, 0, result, 0, Math.min(type.length, 4));
        }
        return new String(result, StandardCharsets.ISO_8859_1);
    }


    public long getSize() {
        return getContainerSize();
    }


    /**
     * 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 ).
     *
     * @return the MovieBox or <code>null</code>
     */
    public MovieBox getMovieBox() {
        for (Box box : getBoxes()) {
            if (box instanceof MovieBox) {
                return (MovieBox) box;
            }
        }
        return null;
    }

    public void getBox(WritableByteChannel os) throws IOException {
        writeContainer(os);
    }

    @Override
    public void close() throws IOException {<FILL_FUNCTION_BODY>}

    @Override
    public String toString() {
        return "model(" + readableByteChannel + ")";
    }
}

        this.readableByteChannel.close();
        if (this.fis != null) {
            this.fis.close();
        }
        for (Box box : getBoxes()) {
            if (box instanceof Closeable) {
                ((Closeable) box).close();
            }
        }
    
<methods>public void <init>() ,public void <init>(List<org.mp4parser.Box>) ,public void addBox(org.mp4parser.Box) ,public List<org.mp4parser.Box> getBoxes() ,public List<T> getBoxes(Class<T>) ,public List<T> getBoxes(Class<T>, boolean) ,public void initContainer(java.nio.channels.ReadableByteChannel, long, org.mp4parser.BoxParser) throws java.io.IOException,public void setBoxes(List<? extends org.mp4parser.Box>) ,public java.lang.String toString() ,public final void writeContainer(java.nio.channels.WritableByteChannel) throws java.io.IOException<variables>private List<org.mp4parser.Box> boxes