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

public final Class WaveFloatFileWriter

extends AudioFileWriter
Class Inheritance
Imports
java.io.File, .IOException, .OutputStream, java.util.Objects, javax.sound.sampled.AudioFileFormat, .AudioFileFormat.Type, .AudioFormat, .AudioFormat.Encoding, .AudioInputStream, .AudioSystem, javax.sound.sampled.spi.AudioFileWriter

Floating-point encoded (format 3) WAVE file writer.
Author
Karl Helgason

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
public AudioFileFormat.Type[]
getAudioFileTypes()

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

Obtains the file types for which file writing support is provided by this audio file writer.

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 AudioInputStream
public void
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.

Inherited from javax.sound.sampled.spi.AudioFileWriter:
isFileTypeSupportedisFileTypeSupported

Constructor Detail

WaveFloatFileWriterback to summary
public WaveFloatFileWriter()

Method Detail

checkFormatback to summary
private void checkFormat(AudioFileFormat.Type type, AudioInputStream stream)
getAudioFileTypesback to summary
public AudioFileFormat.Type[] getAudioFileTypes()

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

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

Obtains the file types for which file writing support is provided by this audio file writer.

Annotations
@Override
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
toLittleEndianback to summary
private AudioInputStream toLittleEndian(AudioInputStream ais)
writeback to summary
public void write(AudioInputStream stream, RIFFWriter writer) 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
com.sun.media.sound back to summary

private final Class WaveFloatFileWriter.NoCloseOutputStream

extends OutputStream
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final OutputStream

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
flush()

Overrides java.io.OutputStream.flush.

Implements java.io.Flushable.flush.

Flushes this output stream and forces any buffered output bytes to be written out.

public void
write(int b)

Implements abstract java.io.OutputStream.write.

Writes the specified byte to this output stream.

public void
write(byte[] b, int off, int len)

Overrides java.io.OutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this output stream.

public void
write(byte[] b)

Overrides java.io.OutputStream.write.

Writes b.length bytes from the specified byte array to this output stream.

Inherited from java.io.OutputStream:
closenullOutputStream

Field Detail

outback to summary
pack-priv final OutputStream out

Constructor Detail

NoCloseOutputStreamback to summary
pack-priv NoCloseOutputStream(OutputStream out)

Method Detail

flushback to summary
public void flush() throws IOException

Overrides java.io.OutputStream.flush.

Implements java.io.Flushable.flush.

Doc from java.io.OutputStream.flush.

Flushes this output stream and forces any buffered output bytes to be written out. The general contract of flush is that calling it is an indication that, if any bytes previously written have been buffered by the implementation of the output stream, such bytes should immediately be written to their intended destination.

If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
writeback to summary
public void write(int b) throws IOException

Implements abstract java.io.OutputStream.write.

Doc from java.io.OutputStream.write.

Writes the specified byte to this output stream. The general contract for write is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
writeback to summary
public void write(byte[] b, int off, int len) throws IOException

Overrides java.io.OutputStream.write.

Doc from java.io.OutputStream.write.

Writes len bytes from the specified byte array starting at offset off to this output stream. The general contract for write(b, off, len) is that some of the bytes in the array b are written to the output stream in order; element b[off] is the first byte written and b[off+len-1] is the last byte written by this operation.

If b is null, a NullPointerException is thrown.

If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs. In particular, an IOException is thrown if the output stream is closed.
writeback to summary
public void write(byte[] b) throws IOException

Overrides java.io.OutputStream.write.

Doc from java.io.OutputStream.write.

Writes b.length bytes from the specified byte array to this output stream. The general contract for write(b) is that it should have exactly the same effect as the call write(b, 0, b.length).

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.