Package entagged.audioformats.ogg

Examples of entagged.audioformats.ogg.OggTag


    raf.read(b);
    String flac = new String(b);
    if(!flac.equals("fLaC"))
      throw new CannotReadException("fLaC Header not found, not a flac file");
   
    OggTag tag = null;
   
    //Seems like we hava a valid stream
    boolean isLastBlock = false;
    while(!isLastBlock) {
      b = new byte[4];
View Full Code Here


  }
 
  private OggTag handleVorbisComment(MetadataBlockHeader mbh, RandomAccessFile raf) throws IOException, CannotReadException {
    long oldPos = raf.getFilePointer();
   
    OggTag tag = oggTagReader.read(raf);
   
    long newPos = raf.getFilePointer();
   
    if(newPos - oldPos != mbh.getDataLength())
      throw new CannotReadException("Tag length do not match with flac comment data length");
View Full Code Here

 
  private VorbisTagCreator tc = new VorbisTagCreator();
  private VorbisTagReader reader = new VorbisTagReader();
 
  public void delete(RandomAccessFile raf,  RandomAccessFile tempRaf) throws IOException, CannotWriteException {
    OggTag tag = null;
    try {
      tag = (OggTag) reader.read(raf);
    } catch(CannotReadException e) {
      write(new OggTag(), raf, tempRaf);
      return;
    }
   
    OggTag emptyTag = new OggTag();
    emptyTag.setVendor(tag.getVendor());
   
    write(emptyTag, raf, tempRaf);
  }
View Full Code Here

  private FlacTagCreator tc = new FlacTagCreator();
  private FlacTagReader reader = new FlacTagReader();
 
  public void delete(RandomAccessFile raf,  RandomAccessFile tempRaf) throws IOException, CannotWriteException {
    OggTag tag = null;
    try {
      tag = reader.read(raf);
    } catch(CannotReadException e) {
      write(new OggTag(), raf, tempRaf);
      return;
    }
   
    OggTag emptyTag = new OggTag();
    emptyTag.setVendor(tag.getVendor());
   
    raf.seek(0);
    tempRaf.seek(0);
   
    write(emptyTag, raf, tempRaf);
View Full Code Here

TOP

Related Classes of entagged.audioformats.ogg.OggTag

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.