Java Doc for AudioFileFormat.java in  » 6.0-JDK-Core » sound » javax » sound » sampled » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » sound » javax.sound.sampled 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.sound.sampled.AudioFileFormat

AudioFileFormat
public class AudioFileFormat (Code)
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 AudioSystem 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.

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" java.lang.Long Long playback duration of the file in microseconds
"author" java.lang.String String name of the author of this file
"title" java.lang.String String title of this file
"copyright" java.lang.String String copyright message
"date" java.util.Date Date date of the recording or release
"comment" java.lang.String String an arbitrary text

author:
   David Rivas
author:
   Kara Kytle
author:
   Florian Bomers
version:
   1.29 07/05/05
See Also:   AudioInputStream
since:
   1.3


Inner Class :public static class Type


Constructor Summary
protected  AudioFileFormat(Type type, int byteLength, AudioFormat format, int frameLength)
     Constructs an audio file format object.
public  AudioFileFormat(Type type, AudioFormat format, int frameLength)
     Constructs an audio file format object.
public  AudioFileFormat(Type type, AudioFormat format, int frameLength, Map<String, Object> properties)
     Construct an audio file format object with a set of defined properties. This public constructor may be used by applications to describe the properties of a requested audio file.

Method Summary
public  intgetByteLength()
     Obtains the size in bytes of the entire audio file (not just its audio data).
public  AudioFormatgetFormat()
     Obtains the format of the audio data contained in the audio file.
public  intgetFrameLength()
     Obtains the length of the audio data contained in the file, expressed in sample frames.
public  ObjectgetProperty(String key)
     Obtain the property value specified by the key.
public  TypegetType()
     Obtains the audio file type, such as WAVE or AU.
public  Map<String, Object>properties()
     Obtain an unmodifiable map of properties. The concept of properties is further explained in the AudioFileFormat class description . a Map<String,Object> object containingall properties.
public  StringtoString()
     Provides a string representation of the file format.


Constructor Detail
AudioFileFormat
protected AudioFileFormat(Type type, int byteLength, AudioFormat format, int frameLength)(Code)
Constructs an audio file format object. This protected constructor is intended for use by providers of file-reading services when returning information about an audio file or about supported audio file formats.
Parameters:
  type - the type of the audio file
Parameters:
  byteLength - the length of the file in bytes, or AudioSystem.NOT_SPECIFIED
Parameters:
  format - the format of the audio data contained in the file
Parameters:
  frameLength - the audio data length in sample frames, or AudioSystem.NOT_SPECIFIED
See Also:   AudioFileFormat.getType



AudioFileFormat
public AudioFileFormat(Type type, AudioFormat format, int frameLength)(Code)
Constructs an audio file format object. This public constructor may be used by applications to describe the properties of a requested audio file.
Parameters:
  type - the type of the audio file
Parameters:
  format - the format of the audio data contained in the file
Parameters:
  frameLength - the audio data length in sample frames, or AudioSystem.NOT_SPECIFIED



AudioFileFormat
public AudioFileFormat(Type type, AudioFormat format, int frameLength, Map<String, Object> properties)(Code)
Construct an audio file format object with a set of defined properties. This public constructor may be used by applications to describe the properties of a requested audio file. The properties map will be copied to prevent any changes to it.
Parameters:
  type - the type of the audio file
Parameters:
  format - the format of the audio data contained in the file
Parameters:
  frameLength - the audio data length in sample frames, orAudioSystem.NOT_SPECIFIED
Parameters:
  properties - a Map<String,Object> objectwith properties
since:
   1.5




Method Detail
getByteLength
public int getByteLength()(Code)
Obtains the size in bytes of the entire audio file (not just its audio data). the audio file length in bytes
See Also:   AudioSystem.NOT_SPECIFIED



getFormat
public AudioFormat getFormat()(Code)
Obtains the format of the audio data contained in the audio file. the audio data format



getFrameLength
public int getFrameLength()(Code)
Obtains the length of the audio data contained in the file, expressed in sample frames. the number of sample frames of audio data in the file
See Also:   AudioSystem.NOT_SPECIFIED



getProperty
public Object getProperty(String key)(Code)
Obtain the property value specified by the key. The concept of properties is further explained in the AudioFileFormat class description .

If the specified property is not defined for a particular file format, this method returns null.
Parameters:
  key - the key of the desired property the value of the property with the specified key,or null if the property does not exist.
See Also:   AudioFileFormat.properties()
since:
   1.5




getType
public Type getType()(Code)
Obtains the audio file type, such as WAVE or AU. the audio file type
See Also:   Type.WAVE
See Also:   Type.AU
See Also:   Type.AIFF
See Also:   Type.AIFC
See Also:   Type.SND



properties
public Map<String, Object> properties()(Code)
Obtain an unmodifiable map of properties. The concept of properties is further explained in the AudioFileFormat class description . a Map<String,Object> object containingall properties. If no properties are recognized, an empty map isreturned.
See Also:   AudioFileFormat.getProperty(String)
since:
   1.5



toString
public String toString()(Code)
Provides a string representation of the file format. the file format as a string



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.