Package org.cmc.music.myid3.examples

Examples of org.cmc.music.myid3.examples.SampleUsage


      throw new IOException(Debug.getDebug("missing values", values));

    if (listener != null)
      listener.log();

    byte id3v1Tag[] = new MyID3v1().toTag(listener, values, strict);
    if (listener != null)
      listener.log("writing id3v1Tag", id3v1Tag == null ? "null" : ""
          + id3v1Tag.length);

    byte id3v2TailTag[] = new MyID3v2Write().toTag(listener, filter, set,
View Full Code Here


   */
  public void rewriteTags(File src, File dst)
      throws UnsupportedEncodingException, IOException, ID3WriteException
  {
    byte id3v1Tag[] = null;
    ID3Tag tag = new MyID3v1().readID3v1(src, strict);
    if (null != tag)
      id3v1Tag = tag.bytes;

    byte id3v2HeadTag[] = new MyID3v2().readID3v2Head(src, strict);

View Full Code Here

      if (dst.exists())
        throw new IOException(Debug.getDebug("could not delete dst",
            dst));
    }

    boolean hasId3v1 = new MyID3v1().hasID3v1(src);

    long id3v1Length = hasId3v1 ? ID3_V1_TAG_LENGTH : 0;
    long id3v2HeadLength = new MyID3v2().findID3v2HeadLength(src);
    long id3v2TailLength = new MyID3v2().findID3v2TailLength(src, hasId3v1);
View Full Code Here

        return null;

      if (!file.getName().toLowerCase().endsWith(".mp3"))
        return null;

      ID3Tag.V1 id3v1 = new MyID3v1().readID3v1(listener, file, strict);
      ID3Tag.V2 id3v2 = new MyID3v2().readID3v2(listener, file,
          id3v1 != null, strict);

      MusicMetadataSet result = MusicMetadataSet.factoryMethod(id3v1,
          id3v2, file.getName(), file.getParentFile().getName());
View Full Code Here

    byte id3v1Tag[] = null;
    ID3Tag tag = new MyID3v1().readID3v1(src, strict);
    if (null != tag)
      id3v1Tag = tag.bytes;

    byte id3v2HeadTag[] = new MyID3v2().readID3v2Head(src, strict);

    boolean hasId3v1 = id3v1Tag != null;
    byte id3v2TailTag[] = new MyID3v2()
        .readID3v2Tail(src, hasId3v1, strict);

    write(src, dst, id3v1Tag, id3v2HeadTag, id3v2TailTag);
  }
View Full Code Here

    }

    boolean hasId3v1 = new MyID3v1().hasID3v1(src);

    long id3v1Length = hasId3v1 ? ID3_V1_TAG_LENGTH : 0;
    long id3v2HeadLength = new MyID3v2().findID3v2HeadLength(src);
    long id3v2TailLength = new MyID3v2().findID3v2TailLength(src, hasId3v1);

    OutputStream os = null;
    InputStream is = null;
    try
    {
View Full Code Here

      if (!file.getName().toLowerCase().endsWith(".mp3"))
        return null;

      ID3Tag.V1 id3v1 = new MyID3v1().readID3v1(listener, file, strict);
      ID3Tag.V2 id3v2 = new MyID3v2().readID3v2(listener, file,
          id3v1 != null, strict);

      MusicMetadataSet result = MusicMetadataSet.factoryMethod(id3v1,
          id3v2, file.getName(), file.getParentFile().getName());
View Full Code Here

    }

    Vector id3v2_frames = src_set.id3v2Raw.frames; //
    if (id3v2_frames.size() > 1)
    {
      MyID3v2Frame first_frame = (MyID3v2Frame) id3v2_frames.get(0);
      String frame_frame_id = first_frame.frameID;
      byte frame_frame_bytes[] = first_frame.dataBytes;
      Debug.debug("\t" + "frame_frame_id", frame_frame_id);
      Debug.debug("\t" + "frame_frame_bytes", frame_frame_bytes);
    }
View Full Code Here

    byte id3v2_tag_bytes[] = src_set.id3v2Raw.bytes; // tag bytes

    Vector id3v2_frames = src_set.id3v2Raw.frames; //
    if (id3v2_frames.size() > 1)
    {
      MyID3v2Frame first_frame = (MyID3v2Frame) id3v2_frames.get(0);
      String frame_frame_id = first_frame.frameID;
      byte frame_frame_bytes[] = first_frame.dataBytes;
    }
  }
View Full Code Here

      byte id3v2_tag_bytes[] = src_set.id3v2Raw.bytes; // tag bytes

      Vector id3v2_frames = src_set.id3v2Raw.frames; //
      if (id3v2_frames.size() > 1)
      {
        MyID3v2Frame first_frame = (MyID3v2Frame) id3v2_frames.get(0);
        String frame_frame_id = first_frame.frameID;
        byte frame_frame_bytes[] = first_frame.dataBytes;
      }

      new MyID3().write(src, dst, src_set, src_set.merged);
View Full Code Here

TOP

Related Classes of org.cmc.music.myid3.examples.SampleUsage

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.