-
- All Superinterfaces:
java.lang.AutoCloseable
public interface RiffChunkBuilderType extends java.lang.AutoCloseableA builder for RIFF chunks. It is an error to attempt to close a chunk without having called either ofaddSubChunk(RiffChunkID)orsetDataWriter(RiffChunkDataWriterType).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RiffChunkBuilderTypeaddSubChunk(RiffChunkID id)Add a subchunk.voidclose()RiffChunkBuilderTypesetDataWriter(RiffChunkDataWriterType writer)Set the data writer for the chunk.RiffChunkBuilderTypesetForm(java.lang.String form)Set the form of the chunk.RiffChunkBuilderTypesetForm(java.util.Optional<java.lang.String> form)Set the form of the chunk.RiffChunkBuilderTypesetID(RiffChunkID id)Set the ID of the chunk.RiffChunkBuilderTypesetSize(long size)Set the declared size of the chunk.RiffChunkBuilderTypesetSize(java.util.OptionalLong size)Set the declared size of the chunk.
-
-
-
Method Detail
-
close
void close() throws java.lang.IllegalStateException- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.IllegalStateException
-
setSize
RiffChunkBuilderType setSize(java.util.OptionalLong size)
Set the declared size of the chunk.- Parameters:
size- The size- Returns:
- The current builder
-
setSize
RiffChunkBuilderType setSize(long size)
Set the declared size of the chunk.- Parameters:
size- The size- Returns:
- The current builder
-
setID
RiffChunkBuilderType setID(RiffChunkID id)
Set the ID of the chunk.- Parameters:
id- The id- Returns:
- The current builder
-
setForm
RiffChunkBuilderType setForm(java.lang.String form)
Set the form of the chunk.- Parameters:
form- The form- Returns:
- The current builder
-
setForm
RiffChunkBuilderType setForm(java.util.Optional<java.lang.String> form)
Set the form of the chunk.- Parameters:
form- The form- Returns:
- The current builder
-
setDataWriter
RiffChunkBuilderType setDataWriter(RiffChunkDataWriterType writer) throws java.lang.IllegalStateException
Set the data writer for the chunk.- Parameters:
writer- The data writer- Returns:
- The current builder
- Throws:
java.lang.IllegalStateException- IfaddSubChunk(RiffChunkID)has already been called for this chunk
-
addSubChunk
RiffChunkBuilderType addSubChunk(RiffChunkID id) throws java.lang.IllegalStateException
Add a subchunk.- Parameters:
id- The id of the chunk- Returns:
- A builder for the subchunk
- Throws:
java.lang.IllegalStateException- IfsetDataWriter(RiffChunkDataWriterType)has already been called for this chunk
-
-