Package org.cmc.music.myid3

Examples of org.cmc.music.myid3.ID3Tag$V1


    }

    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

    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,
        values, strict);
    if (listener != null)
      listener.log("writing id3v2TailTag", id3v2TailTag == null ? "null"
          : "" + id3v2TailTag.length);
View Full Code Here

        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss.SSSZ");
        header.setTimestamp(formatter.format(new Date()));
        Holder<HeaderT> mtosiHeader = new Holder<HeaderT>(header);

        GetActiveAlarmsCountT mtosiBody = new GetActiveAlarmsCountT();
        mtosiBody.setFilter(new ActiveAlarmFilterT());

        // use polling method to obtain response
       
        System.out.println("Invoking getActiveAlarmsCountAsync using polling.");
        Response<GetActiveAlarmsCountResponseT> response =
View Full Code Here

        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss.SSSZ");
        header.setTimestamp(formatter.format(new Date()));
        Holder<HeaderT> mtosiHeader = new Holder<HeaderT>(header);

        GetActiveAlarmsT mtosiBody = new GetActiveAlarmsT();
        mtosiBody.setFilter(new ActiveAlarmFilterT());

        // use callback method to obtain response
       
        System.out.println("Invoking getActiveAlarmsAsync using callback.");
        AsyncAlarmHandler handler = new AsyncAlarmHandler();
View Full Code Here

    private List<AlarmT> alarms = new Vector<AlarmT>();

    public void addAlarm(int alarmID) {

        AlarmT alarm = new AlarmT();

        EventInformationT eventInfo = new EventInformationT();
        ProbableCauseT probableCause = new ProbableCauseT();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss.SSSZ");

        switch (alarmID % 2) {
        case 1:
            eventInfo.setNotificationId("0001239");
            eventInfo.setObjectType(ObjectTypeT.OT_EQUIPMENT);
            eventInfo.setObjectName(new NamingAttributesT());
            eventInfo.setOsTime(formatter.format(new Date()));
            eventInfo.setNeTime(formatter.format(new Date()));
            eventInfo.setEdgePointRelated(Boolean.FALSE);
            probableCause.setType("PROP_odd_probable_cause_type");
            alarm.setEventInfo(eventInfo);
            alarm.setIsClearable(false);
            alarm.setLayerRate("PROP_layer_rate_odd");
            alarm.setProbableCause(probableCause);
            alarm.setPerceivedSeverity("PROP_odd_perceived_severity");
            alarm.setServiceAffecting(ServiceAffectingT.SA_UNKNOWN);
            alarm.setRcaiIndicator(false);
            break;

        default:
            eventInfo.setNotificationId("9876543");
            eventInfo.setObjectType(ObjectTypeT.OT_OS);
            eventInfo.setObjectName(new NamingAttributesT());
            eventInfo.setOsTime(formatter.format(new Date()));
            eventInfo.setEdgePointRelated(Boolean.FALSE);
            probableCause.setType("PROP_even_probable_cause_type");
            alarm.setEventInfo(eventInfo);
            alarm.setIsClearable(true);
            alarm.setLayerRate("PROP_layer_rate_even");
            alarm.setProbableCause(probableCause);
            alarm.setPerceivedSeverity("PROP_even_perceived_severity");
            alarm.setServiceAffecting(ServiceAffectingT.SA_SERVICE_AFFECTING);
            alarm.setRcaiIndicator(false);
            break;

        }

        alarms.add(alarm);
View Full Code Here

        GetActiveAlarmsResponseT.ActiveAlarmList alarmList = new GetActiveAlarmsResponseT.ActiveAlarmList();
       
        Long requestedCount = mtosiHeader.value.getRequestedBatchSize();
        if (requestedCount != null) {
            for (int i = 0; i < requestedCount && alarms.size() > 0; i++) {
                AlarmT alarm = alarms.remove(0);
                alarmList.getActiveAlarm().add(alarm);
            }
            // Indicate to the caller if there are more alarms remaining.
            if (alarms.size() > 0) {
                mtosiHeader.value.setBatchSequenceEndOfReply(Boolean.FALSE);
View Full Code Here

TOP

Related Classes of org.cmc.music.myid3.ID3Tag$V1

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.