Examples of MidiFileWriter


Examples of javax.sound.midi.spi.MidiFileWriter

     * @return <code>true</code> if the file type is supported,
     * otherwise <code>false</code>
     */
    public static boolean isFileTypeSupported(int fileType) {

        MidiFileWriter providers[] = getMidiFileWriters();

        for(int i=0; i<providers.length; i++) {
            if( providers[i].isFileTypeSupported(fileType) == true ) {
                return true;
            }
View Full Code Here

Examples of javax.sound.midi.spi.MidiFileWriter

     * @return the set of supported file types.  If no file types are supported,
     * returns an array of length 0.
     */
    public static int[] getMidiFileTypes(Sequence sequence) {

        MidiFileWriter providers[] = getMidiFileWriters();
        int types[][] = new int[ providers.length ][];
        int returnTypes[] = null;
        int numTypes = 0;
        int index = 0;

View Full Code Here

Examples of javax.sound.midi.spi.MidiFileWriter

     * @return <code>true</code> if the file type is supported for this
     * sequence, otherwise <code>false</code>
     */
    public static boolean isFileTypeSupported(int fileType, Sequence sequence) {

        MidiFileWriter providers[] = getMidiFileWriters();

        for(int i=0; i<providers.length; i++) {
            if( providers[i].isFileTypeSupported(fileType,sequence) == true ) {
                return true;
            }
View Full Code Here

Examples of javax.sound.midi.spi.MidiFileWriter

     * @see #isFileTypeSupported(int, Sequence)
     * @see     #getMidiFileTypes(Sequence)
     */
    public static int write(Sequence in, int fileType, OutputStream out) throws IOException {

        MidiFileWriter providers[] = getMidiFileWriters();
        //$$fb 2002-04-17: Fix for 4635287: Standard MidiFileWriter cannot write empty Sequences
        int bytesWritten = -2;

        //$$fb 2001-08-03: reverse this loop to give external providers more priority (Bug #4487550)
        for(int i = providers.length-1; i >= 0; i-- ) {
View Full Code Here

Examples of javax.sound.midi.spi.MidiFileWriter

     * @see #isFileTypeSupported(int, Sequence)
     * @see     #getMidiFileTypes(Sequence)
     */
    public static int write(Sequence in, int type, File out) throws IOException {

        MidiFileWriter providers[] = getMidiFileWriters();
        //$$fb 2002-04-17: Fix for 4635287: Standard MidiFileWriter cannot write empty Sequences
        int bytesWritten = -2;

        //$$fb 2001-08-03: reverse this loop to give external providers more priority (Bug #4487550)
        for(int i = providers.length-1; i >= 0; i-- ) {
View Full Code Here

Examples of javax.sound.midi.spi.MidiFileWriter

    }

    private static MidiFileWriter[] getMidiFileWriters() {

        Vector v = new Vector();
        MidiFileWriter varray[];

        try {

            Class.forName( "sun.misc.Service" );
View Full Code Here

Examples of javax.sound.midi.spi.MidiFileWriter

    // The number of supported formats.
    int count = 0;
    Iterator writers = lookupMidiFileWriterProviders();
    while (writers.hasNext())
    {
      MidiFileWriter fw = (MidiFileWriter) writers.next();
      int types[] = fw.getMidiFileTypes();
      for (int i = types.length; i > 0;)
      {
        int type = types[--i];
        if (supported.length > type && !supported[type])
        {
View Full Code Here

Examples of javax.sound.midi.spi.MidiFileWriter

  public static boolean isFileTypeSupported(int fileType)
  {
    Iterator writers = lookupMidiFileWriterProviders();
    while (writers.hasNext())
    {
      MidiFileWriter fw = (MidiFileWriter) writers.next();

      if (fw.isFileTypeSupported(fileType))
        return true;
    }
    return false;
  }
View Full Code Here

Examples of javax.sound.midi.spi.MidiFileWriter

    // The number of supported formats.
    int count = 0;
    Iterator writers = lookupMidiFileWriterProviders();
    while (writers.hasNext())
    {
      MidiFileWriter fw = (MidiFileWriter) writers.next();
      int types[] = fw.getMidiFileTypes(sequence);
      for (int i = types.length; i > 0;)
      {
        int type = types[--i];
        if (supported.length > type && !supported[type])
        {
View Full Code Here

Examples of javax.sound.midi.spi.MidiFileWriter

  public static boolean isFileTypeSupported(int fileType, Sequence sequence)
  {
    Iterator writers = lookupMidiFileWriterProviders();
    while (writers.hasNext())
    {
      MidiFileWriter fw = (MidiFileWriter) writers.next();

      if (fw.isFileTypeSupported(fileType, sequence))
        return true;
    }
    return false;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.