com.qoppa.pdf.annotations
Interface Sound

All Superinterfaces:
Annotation

public interface Sound
extends Annotation

Interface representing a Sound annotation in a PDF document. Sound annotations are displayed using a speaker icon and can be double-clicked to play back the audio content.

Author:
Qoppa Software

Field Summary
 
Fields inherited from interface com.qoppa.pdf.annotations.Annotation
BORDERSTYLE_BEVELED, BORDERSTYLE_DASHED, BORDERSTYLE_INSETS, BORDERSTYLE_SOLID, BORDERSTYLE_UNDERLINE, FLAGS_HIDDEN, FLAGS_INVISIBLE, FLAGS_LOCKED, FLAGS_NOROTATE, FLAGS_NOVIEW, FLAGS_NOZOOM, FLAGS_PRINTABLE, FLAGS_READONLY
 
Method Summary
 byte[] getContent()
          Return this sound annotation's sound content as a byte array.
 AudioFormat getFormat()
          Return this annotation's audio format.
 void setAudio(AudioInputStream audioStream)
          Sets the audio content of this Sound annotation.
 void setContent(byte[] content, AudioFormat format)
          Sets the audio content of this Sound annotation.
 
Methods inherited from interface com.qoppa.pdf.annotations.Annotation
getActions, getBorderStyle, getBorderWidth, getColor, getComponent, getContents, getCreationDate, getCreator, getFlags, getModifiedDate, getName, getOpacity, getRectangle, getSubject, getSubtype, getTriggerActions, isHidden, isInvisible, isLocked, isNoRotate, isNoView, isNoZoom, isPrintable, isReadOnly, paint, paint, print, revalidate, setActions, setBorderStyle, setBorderWidth, setColor, setComponent, setComponentVisible, setCreationDate, setCreator, setFlags, setHidden, setInvisible, setLayer, setLocked, setModifiedDate, setName, setNoRotate, setNoView, setNoZoom, setOpacity, setPrintable, setReadOnly, setRectangle, setSubject, setSubtype, setTriggerActions, shiftRectangle
 

Method Detail

setAudio

void setAudio(AudioInputStream audioStream)
              throws IOException
Sets the audio content of this Sound annotation.

Parameters:
audioStream - Stream containing the sound content.
Throws:
IOException

getContent

byte[] getContent()
Return this sound annotation's sound content as a byte array. The format of the content is specified by the AudioFormat object returned by getAudioFormat()

Returns:
A byte array containing the sound content.
Throws:
PDFException

getFormat

AudioFormat getFormat()
Return this annotation's audio format.

Returns:
The audio format.

setContent

void setContent(byte[] content,
                AudioFormat format)
Sets the audio content of this Sound annotation.

Parameters:
content - A byte array containing the sound content
format - the audio format
Throws:
IOException