Package com.sun.speech.freetts

# Class FreeTTSSpeakableImpl

java.lang.Object
com.sun.speech.freetts.FreeTTSSpeakableImpl

All Implemented Interfaces:
  `FreeTTSSpeakable`

public class FreeTTSSpeakableImpl extends Object implements FreeTTSSpeakable
Minimal implementation of a FreeTTSSpeakable

## Constructor Summary

Constructors
Constructor
Description
`FreeTTSSpeakableImpl(InputStream is)`
Constructor.
`FreeTTSSpeakableImpl(String text)`
Constructor.
`FreeTTSSpeakableImpl(Document doc)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`cancelled()`
Indicates that this speakable has been cancelled.
`void`
`completed()`
Indicates that this speakable has been completed.
`Document`
`getDocument()`
Gets the DOM document for this object.
`InputStream`
`getInputStream()`
Gets the input stream.
`String`
`getText()`
Returns the text corresponding to this Playable.
`boolean`
`isCompleted()`
Returns true if this queue item has been processed.
`boolean`
`isDocument()`
Returns `true` if the item is a JSML document (Java Speech Markup Language).
`boolean`
`isPlainText()`
Returns `true` if the item contains plain text (not Java Speech Markup Language text).
`boolean`
`isStream()`
Returns `true` if the item is an input stream.
`void`
`started()`
Indicate that this speakable has been started.
`boolean`
`waitCompleted()`
Waits for this speakable item to be completed.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### FreeTTSSpeakableImpl

public FreeTTSSpeakableImpl(String text)
Constructor.

Parameters:
  `text` - the text to be spoken

### FreeTTSSpeakableImpl

public FreeTTSSpeakableImpl(Document doc)
Constructor.

Parameters:
  `doc` - the doc to be spoken

### FreeTTSSpeakableImpl

public FreeTTSSpeakableImpl(InputStream is)
Constructor.

Parameters:
  `is` - the doc to be spoken

## Method Details

### started

public void started()
Indicate that this speakable has been started.

Specified by:
  `started` in interface `FreeTTSSpeakable`

### completed

public void completed()
Indicates that this speakable has been completed.

Specified by:
  `completed` in interface `FreeTTSSpeakable`

### cancelled

public void cancelled()
Indicates that this speakable has been cancelled.

Specified by:
  `cancelled` in interface `FreeTTSSpeakable`

### isCompleted

public boolean isCompleted()
Returns true if this queue item has been processed.

Specified by:
  `isCompleted` in interface `FreeTTSSpeakable`
Returns:
  true if it has been processed

### waitCompleted

public boolean waitCompleted()
Waits for this speakable item to be completed.

Specified by:
  `waitCompleted` in interface `FreeTTSSpeakable`
Returns:
  true if the item was completed successfully, false if the speakable was cancelled or an error occurred.

### isPlainText

public boolean isPlainText()
Returns `true` if the item contains plain text (not Java Speech Markup Language text).

Specified by:
  `isPlainText` in interface `FreeTTSSpeakable`
Returns:
  true if the item contains plain text

### getText

public String getText()
Returns the text corresponding to this Playable.

Specified by:
  `getText` in interface `FreeTTSSpeakable`
Returns:
  the Playable text

### getDocument

public Document getDocument()
Gets the DOM document for this object.

Specified by:
  `getDocument` in interface `FreeTTSSpeakable`
Returns:
  the DOM document for this object.

### isStream

public boolean isStream()
Returns `true` if the item is an input stream.

Specified by:
  `isStream` in interface `FreeTTSSpeakable`
Returns:
  true if the item is an input stream

### getInputStream

public InputStream getInputStream()
Gets the input stream.

Specified by:
  `getInputStream` in interface `FreeTTSSpeakable`
Returns:
  the input stream

### isDocument

public boolean isDocument()
Returns `true` if the item is a JSML document (Java Speech Markup Language).

Specified by:
  `isDocument` in interface `FreeTTSSpeakable`
Returns:
  true if the item is a document