|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An open Media Data Object, as returned by ContainerService.openDataObject().
An open DataObject can be used to read/write data. These are not used directly for play() and record(). Data written using DataObject.write() can be played by passing the String name of the MDO to play().
Fields inherited from interface javax.telephony.media.container.ContainerConstants |
b_Append, b_Create, b_Exclusive, b_Truncate, e_OK, k_InputParameters, k_MediaType, k_MediaTypes, v_AccessCopy, v_AccessRead, v_AccessWrite, v_Begin, v_Bytes, v_Create, v_Current, v_End, v_Fail, v_MDO, v_MilliSeconds |
Fields inherited from interface javax.telephony.media.CoderConstants |
v_24kADPCM, v_32kADPCM, v_44kADPCM, v_48k8BitLinear, v_48kALawPCM, v_48kMuLawPCM, v_64k8BitLinear, v_64kALawPCM, v_64kMuLawPCM, v_88k8BitLinear, v_88kALawPCM, v_88kMuLawPCM, v_ADPCM_24k, v_ADPCM_32k, v_ADPCM_44k, v_ADSI, v_ALawPCM_48k, v_ALawPCM_64k, v_ALawPCM_88k, v_ASCII, v_Linear8Bit_48k, v_Linear8Bit_64k, v_Linear8Bit_88k, v_MuLawPCM_48k, v_MuLawPCM_64k, v_MuLawPCM_88k, v_TDD |
Method Summary | |
void |
close()
close this DataObject. |
ContainerService |
getContainerService()
Return the ContainerService for this DataObject. |
Symbol |
getMediaType()
The assigned coder type for an existing DataObject. |
byte[] |
read(int nbytes)
read bytes from this DataObject and return them. |
int |
seek(Symbol position,
int offset,
Symbol seekUnits)
set stream to new position. |
void |
write(byte[] bytes)
write the whole byte[]. |
void |
write(byte[] bytes,
int offset,
int len)
write from within a byte[]. |
Method Detail |
public ContainerService getContainerService()
public Symbol getMediaType()
public void close() throws ContainerException
ContainerException
- if close failspublic int seek(Symbol position, int offset, Symbol seekUnits) throws ContainerException
First move to the indicated position, one of v_Begin, v_Current, v_End. Then translate offset and seekUnits and skip the appropriate number of bytes forward or backward from there.
If offset is negative, then seek backward from position toward beginning of MDO.
Returns the number of bytes actually skipped (from the position). [althought for some seekUnits, that may not be very meaningful]
position
- one of the Symbols v_Begin, v_End, v_Current.offset
- int number of units to move from position.seekUnits
- one of the Symbols v_Bytes, v_MilliSeconds, v_MDOContainerException
- if seek failspublic byte[] read(int nbytes) throws ContainerException
nbytes
- the int number of bytes to readContainerException
- if the bytes are not readpublic void write(byte[] bytes, int offset, int len) throws ContainerException
bytes
- a byte array containing the bytes to writeoffset
- int index of the first byte to writelen
- int number of bytes to writeContainerException
- if the bytes are not writtenpublic void write(byte[] bytes) throws ContainerException
bytes
- a byte array containing the bytes to writeContainerException
- if the bytes are not written
|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |