public class AsfExtHeaderModifier extends java.lang.Object implements ChunkModifier
Modifier and Type | Field and Description |
---|---|
private java.util.List<ChunkModifier> |
modifierList
List of modifiers which are to be applied to contained chunks.
|
Constructor and Description |
---|
AsfExtHeaderModifier(java.util.List<ChunkModifier> modifiers)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
private void |
copyChunk(GUID guid,
java.io.InputStream source,
java.io.OutputStream destination)
Simply copies a chunk from
source to
destination .The method assumes, that the GUID has already been read and will write the provided one to the destination. The chunk length however will be read and used to determine the amount of bytes to copy. |
boolean |
isApplicable(GUID guid)
Determines, whether the modifier handles chunks identified by given
guid . |
ModificationResult |
modify(GUID guid,
java.io.InputStream source,
java.io.OutputStream destination)
Writes a modified copy of the chunk into the
destination. . |
private final java.util.List<ChunkModifier> modifierList
public AsfExtHeaderModifier(java.util.List<ChunkModifier> modifiers)
modifiers
- modifiers to apply.private void copyChunk(GUID guid, java.io.InputStream source, java.io.OutputStream destination) throws java.io.IOException
source
to
destination
.guid
- GUID of the current CHUNK.source
- source of an ASF chunk, which is to be located at the chunk
length field.destination
- the destination to copy the chunk to.java.io.IOException
- on I/O errors.public boolean isApplicable(GUID guid)
guid
.isApplicable
in interface ChunkModifier
guid
- GUID to test.true
, if this modifier can be used to modify the
chunk.public ModificationResult modify(GUID guid, java.io.InputStream source, java.io.OutputStream destination) throws java.io.IOException
destination.
.modify
in interface ChunkModifier
guid
- GUID of the chunk to modify.source
- a stream providing the chunk, starting at the chunks length
field.destination
- destination for the modified chunk.java.io.IOException
- on I/O errors.Copyright © 2005-2013 java.net. All Rights Reserved.