Constructor and Description |
---|
PDFSound(InputStream in)
Create a new PDFSound from the specified InputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the sound object.
|
AudioInputStream |
getAudioInputStream()
Return an
AudioInputStream of this object. |
Reader |
getMetaData()
Return any XML metadata associated with this object.
|
int |
getRate()
Return the number of samples/second this sound is played at.
|
InputStream |
getStream()
Deprecated.
please call getAudioInputStream instead.
|
String |
getType()
Deprecated.
method will always return Unknown
|
void |
setMetaData(String xmldata)
Set the XML metadata associated with this object.
|
String |
toString() |
public PDFSound(InputStream in) throws IOException
Create a new PDFSound from the specified InputStream. The stream
can be any type of Audio file that is supported by the
AudioSystem
, or if that system is
not enabled for any reason, PCM WAV formats can be parsed directly.
IOException
- if the file format is invalidpublic int getRate()
public AudioInputStream getAudioInputStream()
AudioInputStream
of this object.@Deprecated public String getType()
@Deprecated public InputStream getStream()
getAudioInputStream()
instead.public void setMetaData(String xmldata)
PDF.setMetaData(java.lang.String)
for more information.xmldata
- the XML data to embed into the document, or null to clear any existing metadata. No validation is performed on this input.public Reader getMetaData() throws IOException
PDF.getMetaData()
for more informationReader
containing the source of the XML or null if no metadata is available.IOException
- if the metadata can't be extractedpublic String toString()
public void close()
Copyright © 2001-2017 Big Faceless Organization