APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.media.sound

public final Class AiffFileWriter

extends SunFileWriter
Class Inheritance
Imports
java.io.BufferedOutputStream, .ByteArrayInputStream, .ByteArrayOutputStream, .DataOutputStream, .File, .FileOutputStream, .IOException, .InputStream, .OutputStream, .RandomAccessFile, .SequenceInputStream, java.util.Objects, javax.sound.sampled.AudioFileFormat, .AudioFormat, .AudioInputStream, .AudioSystem

AIFF file writer.
Author
Jan Borgersen

Field Summary

Modifier and TypeField and Description
private static final int
private static final long
private static final int
private static final int
private static final long
private static final long
private static final int
private static final int
private static final long
private static final int
Inherited from com.sun.media.sound.SunFileWriter:
bisBufferSizebufferSizetypes

Constructor Summary

AccessConstructor and Description
public
AiffFileWriter()

Constructs a new AiffFileWriter object.

Method Summary

Modifier and TypeMethod and Description
private AudioFileFormat
getAudioFileFormat(AudioFileFormat.Type type, AudioInputStream stream)

Returns the AudioFileFormat describing the file that will be written from this AudioInputStream.

public AudioFileFormat.Type[]
getAudioFileTypes(AudioInputStream stream)

Implements abstract javax.sound.sampled.spi.AudioFileWriter.getAudioFileTypes.

Obtains the file types that this audio file writer can write from the audio input stream specified.

private InputStream
getFileStream(AiffFileFormat aiffFileFormat, InputStream audioStream)

public int
write(AudioInputStream stream, AudioFileFormat.Type fileType, OutputStream out)

Implements abstract javax.sound.sampled.spi.AudioFileWriter.write.

Writes a stream of bytes representing an audio file of the file type indicated to the output stream provided.

public int
write(AudioInputStream stream, AudioFileFormat.Type fileType, File out)

Implements abstract javax.sound.sampled.spi.AudioFileWriter.write.

Writes a stream of bytes representing an audio file of the file format indicated to the external file provided.

private void
write_ieee_extended(DataOutputStream dos, float f)

Extended precision IEEE floating-point conversion routine.

private int
Inherited from com.sun.media.sound.SunFileWriter:
big2littlebig2littleShortgetAudioFileTypesrllongrlshort

Field Detail

DOUBLE_EXPONENT_LENGTHback to summary
private static final int DOUBLE_EXPONENT_LENGTH
DOUBLE_EXPONENT_MASKback to summary
private static final long DOUBLE_EXPONENT_MASK
DOUBLE_EXPONENT_OFFSETback to summary
private static final int DOUBLE_EXPONENT_OFFSET
DOUBLE_MANTISSA_LENGTHback to summary
private static final int DOUBLE_MANTISSA_LENGTH
DOUBLE_MANTISSA_MASKback to summary
private static final long DOUBLE_MANTISSA_MASK
DOUBLE_SIGN_MASKback to summary
private static final long DOUBLE_SIGN_MASK
EXTENDED_EXPONENT_LENGTHback to summary
private static final int EXTENDED_EXPONENT_LENGTH
EXTENDED_EXPONENT_OFFSETback to summary
private static final int EXTENDED_EXPONENT_OFFSET
EXTENDED_INTEGER_MASKback to summary
private static final long EXTENDED_INTEGER_MASK
EXTENDED_MANTISSA_LENGTHback to summary
private static final int EXTENDED_MANTISSA_LENGTH

Constructor Detail

AiffFileWriterback to summary
public AiffFileWriter()

Constructs a new AiffFileWriter object.

Method Detail

getAudioFileFormatback to summary
private AudioFileFormat getAudioFileFormat(AudioFileFormat.Type type, AudioInputStream stream)

Returns the AudioFileFormat describing the file that will be written from this AudioInputStream. Throws IllegalArgumentException if not supported.

getAudioFileTypesback to summary
public AudioFileFormat.Type[] getAudioFileTypes(AudioInputStream stream)

Implements abstract javax.sound.sampled.spi.AudioFileWriter.getAudioFileTypes.

Doc from javax.sound.sampled.spi.AudioFileWriter.getAudioFileTypes.

Obtains the file types that this audio file writer can write from the audio input stream specified.

Annotations
@Override
getFileStreamback to summary
private InputStream getFileStream(AiffFileFormat aiffFileFormat, InputStream audioStream) throws IOException
writeback to summary
public int write(AudioInputStream stream, AudioFileFormat.Type fileType, OutputStream out) throws IOException

Implements abstract javax.sound.sampled.spi.AudioFileWriter.write.

Doc from javax.sound.sampled.spi.AudioFileWriter.write.

Writes a stream of bytes representing an audio file of the file type indicated to the output stream provided. Some file types require that the length be written into the file header, and cannot be written from start to finish unless the length is known in advance. An attempt to write such a file type will fail with an IOException if the length in the audio file format is AudioSystem#NOT_SPECIFIED.

Annotations
@Override
Exceptions
IOException:
if an I/O exception occurs
writeback to summary
public int write(AudioInputStream stream, AudioFileFormat.Type fileType, File out) throws IOException

Implements abstract javax.sound.sampled.spi.AudioFileWriter.write.

Doc from javax.sound.sampled.spi.AudioFileWriter.write.

Writes a stream of bytes representing an audio file of the file format indicated to the external file provided.

Annotations
@Override
Exceptions
IOException:
if an I/O exception occurs
write_ieee_extendedback to summary
private void write_ieee_extended(DataOutputStream dos, float f) throws IOException

Extended precision IEEE floating-point conversion routine.

writeAiffFileback to summary
private int writeAiffFile(InputStream in, AiffFileFormat aiffFileFormat, OutputStream out) throws IOException