java.lang.Objectjavax.sound.sampled.AudioFileFormat
public class AudioFileFormat
An instance of the AudioFileFormat class describes
an audio file, including the file type, the file's length in bytes,
the length in sample frames of the audio data contained in the file,
and the format of the audio data.
The class includes methods for determining the format
of an audio file, obtaining an audio input stream from an audio file, and
writing an audio file from an audio input stream.
AudioSystem
An AudioFileFormat object can
include a set of properties. A property is a pair of key and value:
the key is of type String, the associated property
value is an arbitrary object.
Properties specify additional informational
meta data (like a author, copyright, or file duration).
Properties are optional information, and file reader and file
writer implementations are not required to provide or
recognize properties.
The following table lists some common properties that should be used in implementations:
| Property key | Value type | Description |
|---|---|---|
| "duration" | Long |
playback duration of the file in microseconds |
| "author" | String |
name of the author of this file |
| "title" | String |
title of this file |
| "copyright" | String |
copyright message |
| "date" | Date |
date of the recording or release |
| "comment" | String |
an arbitrary text |
AudioInputStream| Nested Class Summary | |
|---|---|
static class |
AudioFileFormat.Type
An instance of the Type class represents one of the
standard types of audio file. |
| Constructor Summary | |
|---|---|
|
AudioFileFormat(AudioFileFormat.Type type,
AudioFormat format,
int frameLength)
Constructs an audio file format object. |
|
AudioFileFormat(AudioFileFormat.Type type,
AudioFormat format,
int frameLength,
Map<String,Object> properties)
Construct an audio file format object with a set of defined properties. |
protected |
AudioFileFormat(AudioFileFormat.Type type,
int byteLength,
AudioFormat format,
int frameLength)
Constructs an audio file format object. |
| Method Summary | |
|---|---|
int |
getByteLength()
Obtains the size in bytes of the entire audio file (not just its audio data). |
AudioFormat |
getFormat()
Obtains the format of the audio data contained in the audio file. |
int |
getFrameLength()
Obtains the length of the audio data contained in the file, expressed in sample frames. |
Object |
getProperty(String key)
Obtain the property value specified by the key. |
AudioFileFormat.Type |
getType()
Obtains the audio file type, such as WAVE or AU. |
Map<String,Object> |
properties()
Obtain an unmodifiable map of properties. |
String |
toString()
Provides a string representation of the file format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected AudioFileFormat(AudioFileFormat.Type type, int byteLength, AudioFormat format, int frameLength)
type - the type of the audio filebyteLength - the length of the file in bytes, or AudioSystem.NOT_SPECIFIEDformat - the format of the audio data contained in the fileframeLength - the audio data length in sample frames, or AudioSystem.NOT_SPECIFIEDgetType()public AudioFileFormat(AudioFileFormat.Type type, AudioFormat format, int frameLength)
type - the type of the audio fileformat - the format of the audio data contained in the fileframeLength - the audio data length in sample frames, or AudioSystem.NOT_SPECIFIEDpublic AudioFileFormat(AudioFileFormat.Type type, AudioFormat format, int frameLength, Map<String,Object> properties)
type - the type of the audio fileformat - the format of the audio data contained in the fileframeLength - the audio data length in sample frames, or
AudioSystem.NOT_SPECIFIEDproperties - a Map<String,Object> object
with properties| Method Detail |
|---|
public AudioFileFormat.Type getType()
WAVE or AU.
AudioFileFormat.Type.WAVE,
AudioFileFormat.Type.AU,
AudioFileFormat.Type.AIFF,
AudioFileFormat.Type.AIFC,
AudioFileFormat.Type.SNDpublic int getByteLength()
AudioSystem.NOT_SPECIFIEDpublic AudioFormat getFormat()
public int getFrameLength()
AudioSystem.NOT_SPECIFIEDpublic Map<String,Object> properties()
class description.
Map<String,Object> object containing
all properties. If no properties are recognized, an empty map is
returned.getProperty(String)public Object getProperty(String key)
class description.
If the specified property is not defined for a
particular file format, this method returns
null.
key - the key of the desired property
null if the property does not exist.propertiespublic String toString()
Ces informations proviennent du site de http://java.sun.com
Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :
Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.
Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.
Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.
Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.
Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
7 mots clés dont 0 définis manuellement (plus d'information...).
Avertissement
Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.
Recherche (afficher)
Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)