|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RIFFChunk
Specifies a chunk of resource interchange file format (RIFF) data, identified by a 4-byte tag and variable size field.
See the description of the RIFF file format on Wikipedia.
makeRIFFChunk()
,
BWFImportDescriptor.getUnknownBWFChunks()
Method Summary | |
---|---|
byte[] |
getChunkData()
Returns the complete data of this RIFF chunk. |
int |
getChunkID()
Returns the chunk id of this RIFF chunk, which is a 4-byte tag that identifies this tag. |
long |
getLength()
Returns the total size of this RIFF chunk measured in bytes. |
long |
getPosition()
Returns the current position for reading or writing the RIFF chunk data. |
byte[] |
read(int numberOfBytes)
Read the requested number of bytes from the RIFF chunk at the current position. |
void |
setChunkData(byte[] chunkData)
Sets the complete data of this RIFF chunk and initializes the position to zero. |
void |
setChunkID(int chunkId)
Sets the chunk id of this RIFF chunk, which is a 4-byte tag that identifies this tag. |
void |
setPosition(long offset)
Sets the position for reading or writing this RIFF chunk data. |
void |
write(byte[] bytes)
Writes the given bytes to this RIFF chunk data at the current position. |
Methods inherited from interface tv.amwa.maj.iface.InterchangeObject |
---|
countProperties, createOptionalPropertyValue, disableGenerationTracking, enableGenerationTracking, getDefinition, getGeneration, getGenerationAUID, getProperties, getPropertyValue, isGenerationTracked, isPropertyPresent, omitOpionalProperty, setPropertyValue |
Method Detail |
---|
void setChunkID(@UInt32 int chunkId)
Sets the chunk id of this RIFF chunk, which is a 4-byte tag that identifies this tag.
Note that in the representation of this tag, care needs to be taken to ensure that the sign bit is not confused with an 8-bit character code. Negative values are accepted by this method.
chunkId
- Chunk identifier for this RIFF chunk.@UInt32 int getChunkID()
Returns the chunk id of this RIFF chunk, which is a 4-byte tag that identifies this tag.
Note that in the representation of this tag, care needs to be taken to ensure that the sign bit is not confused with an 8-bit character code. Negative values are accepted by this method.
@DataBuffer byte[] read(@UInt32 int numberOfBytes) throws IllegalArgumentException, EndOfDataException
Read the requested number of bytes from the RIFF chunk at the current position. The position is advanced by the number of bytes read.
numberOfBytes
- Number of bytes to read from the RIFF chunk.
IllegalArgumentException
- Cannot read a negative number of bytes.
EndOfDataException
- The number of bytes requested are not available in the
RIFF chunk relative to the current position.getPosition()
void write(@DataBuffer byte[] bytes) throws NullPointerException, EndOfDataException
Writes the given bytes to this RIFF chunk data at the current position. The position is advanced by the number of bytes written. Any data beyond the new position is lost by truncating the buffer.
bytes
- Bytes to write to the RIFF chunk data.
NullPointerException
- The given array of bytes is null
.
EndOfDataException
- The size of the RIFF chunk is less than the number of bytes
to write relative to the current position.getPosition()
void setPosition(@PositionType long offset) throws PositionOutOfRangeException
Sets the position for reading or writing this RIFF chunk data.
offset
- Position offset to set for reading or writing RIFF chunk data.
PositionOutOfRangeException
- The given offset is outside the acceptable
range for this RIFF chunk data, which is between 0 and the length of the data.getLength()
@PositionType long getPosition()
Returns the current position for reading or writing the RIFF chunk data.
@LengthType long getLength()
Returns the total size of this RIFF chunk measured in bytes. The length is
initially 0 until setChunkData(byte[])
has been called.
@DataBuffer byte[] getChunkData()
Returns the complete data of this RIFF chunk.
void setChunkData(@DataBuffer byte[] chunkData) throws NullPointerException
Sets the complete data of this RIFF chunk and initializes the position to zero. The length property of this RIFF chunk will be set to the length of the given chunk data.
chunkData
- Actual data for this RIFF chunk.
NullPointerException
- The chunk data argument is null.
|
Media Authoring with Java API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |