src/share/classes/javax/sound/sampled/AudioFileFormat.java

Print this page


   1 /*
   2  * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  40  * and the format of the audio data.
  41  * <p>
  42  * The <code>{@link AudioSystem}</code> class includes methods for determining the format
  43  * of an audio file, obtaining an audio input stream from an audio file, and
  44  * writing an audio file from an audio input stream.
  45  *
  46  * <p>An <code>AudioFileFormat</code> object can
  47  * include a set of properties. A property is a pair of key and value:
  48  * the key is of type <code>String</code>, the associated property
  49  * value is an arbitrary object.
  50  * Properties specify additional informational
  51  * meta data (like a author, copyright, or file duration).
  52  * Properties are optional information, and file reader and file
  53  * writer implementations are not required to provide or
  54  * recognize properties.
  55  *
  56  * <p>The following table lists some common properties that should
  57  * be used in implementations:
  58  *
  59  * <table border=1>

  60  *  <tr>
  61  *   <th>Property key</th>
  62  *   <th>Value type</th>
  63  *   <th>Description</th>
  64  *  </tr>
  65  *  <tr>
  66  *   <td>&quot;duration&quot;</td>
  67  *   <td>{@link java.lang.Long Long}</td>
  68  *   <td>playback duration of the file in microseconds</td>
  69  *  </tr>
  70  *  <tr>
  71  *   <td>&quot;author&quot;</td>
  72  *   <td>{@link java.lang.String String}</td>
  73  *   <td>name of the author of this file</td>
  74  *  </tr>
  75  *  <tr>
  76  *   <td>&quot;title&quot;</td>
  77  *   <td>{@link java.lang.String String}</td>
  78  *   <td>title of this file</td>
  79  *  </tr>


   1 /*
   2  * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  40  * and the format of the audio data.
  41  * <p>
  42  * The <code>{@link AudioSystem}</code> class includes methods for determining the format
  43  * of an audio file, obtaining an audio input stream from an audio file, and
  44  * writing an audio file from an audio input stream.
  45  *
  46  * <p>An <code>AudioFileFormat</code> object can
  47  * include a set of properties. A property is a pair of key and value:
  48  * the key is of type <code>String</code>, the associated property
  49  * value is an arbitrary object.
  50  * Properties specify additional informational
  51  * meta data (like a author, copyright, or file duration).
  52  * Properties are optional information, and file reader and file
  53  * writer implementations are not required to provide or
  54  * recognize properties.
  55  *
  56  * <p>The following table lists some common properties that should
  57  * be used in implementations:
  58  *
  59  * <table border=1>
  60  *  <caption>Audio File Format Property Keys</caption>
  61  *  <tr>
  62  *   <th>Property key</th>
  63  *   <th>Value type</th>
  64  *   <th>Description</th>
  65  *  </tr>
  66  *  <tr>
  67  *   <td>&quot;duration&quot;</td>
  68  *   <td>{@link java.lang.Long Long}</td>
  69  *   <td>playback duration of the file in microseconds</td>
  70  *  </tr>
  71  *  <tr>
  72  *   <td>&quot;author&quot;</td>
  73  *   <td>{@link java.lang.String String}</td>
  74  *   <td>name of the author of this file</td>
  75  *  </tr>
  76  *  <tr>
  77  *   <td>&quot;title&quot;</td>
  78  *   <td>{@link java.lang.String String}</td>
  79  *   <td>title of this file</td>
  80  *  </tr>