private boolean tagExists(FileChannel fc) throws IOException { ByteBuffer b = ByteBuffer.allocate(3); fc.position(0); fc.read(b); String tagString = new String(b.array()); return tagString.equals("ID3"); }