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

public final Class AuFileWriter

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, .AudioFileFormat.Type, .AudioFormat, .AudioInputStream, .AudioSystem

AU file writer.
Author
Jan Borgersen

Field Summary

Modifier and TypeField and Description
private static final int
UNKNOWN_SIZE

Value for length field if length is not known.

Inherited from com.sun.media.sound.SunFileWriter:
bisBufferSizebufferSizetypes

Constructor Summary

AccessConstructor and Description
public
AuFileWriter()

Constructs a new AuFileWriter 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(AuFileFormat auFileFormat, AudioInputStream 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 int
Inherited from com.sun.media.sound.SunFileWriter:
big2littlebig2littleShortgetAudioFileTypesrllongrlshort

Field Detail

UNKNOWN_SIZEback to summary
private static final int UNKNOWN_SIZE

Value for length field if length is not known.

Constructor Detail

AuFileWriterback to summary
public AuFileWriter()

Constructs a new AuFileWriter 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(AuFileFormat auFileFormat, AudioInputStream 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
writeAuFileback to summary
private int writeAuFile(AudioInputStream in, AuFileFormat auFileFormat, OutputStream out) throws IOException