code: public static FlacFile open(InputStream inp) throws IOException, FileNotFoundException {
        inp.mark(4);
        byte[] header = new byte[4];
        IOUtils.readFully(inp, header);
        inp.reset();
        
        if(header[0] == (byte)'O' && header[1] == (byte)'g' &&
           header[2] == (byte)'g' && header[3] == (byte)'S') {
           return new FlacOggFile(new OggFile(inp));
        }
        if(header[0] == (byte)'f' && header[1] == (byte)'L' &&
           header[2] == (byte)'a' && header[3] == (byte)'C') {
           return new FlacNativeFile(inp);
        }
        throw new IllegalArgumentException("File type not recognised");
     }
docs: Opens the given file for reading.
  @param inp The InputStrem to read from, which must support mark/reset