com.ritolaaudio.simplewavio.files.riff
Class RiffChunk_JUNK

java.lang.Object
  extended by com.ritolaaudio.simplewavio.files.RiffChunk
      extended by com.ritolaaudio.simplewavio.files.riff.RiffChunk_JUNK
All Implemented Interfaces:
java.lang.Comparable<RiffChunk>

public class RiffChunk_JUNK
extends RiffChunk

Whatcha gonna do with all that JUNK, all that JUNK inside your chunk?
The JUNK chunk is typically non-data i.e. all-zeroes, used for block alignment in some files, like with 2048 blocksize in CDs.
In case it is not empty, its contents can be read. Who knows what fun little goodies could be in there...

Author:
chuck

Field Summary
(package private)  byte[] junkData
           
 
Fields inherited from class com.ritolaaudio.simplewavio.files.RiffChunk
anotherWorkChunk4, childMap, workChunk2, workChunk4
 
Constructor Summary
RiffChunk_JUNK()
           
 
Method Summary
 int _sizeEstimateInBytes()
          DO NOT INVOKE OUTSIDE RIFFCHUNK OBJECTS
Called internally when pre-calculating the size of a RIFF file.
 void _toData(java.nio.ByteBuffer buffer)
          DO NOT INVOKE OUTSIDE RIFF CHUNK OBJECTS
Called internally when recursively building a chunk hierarchy from RIFF data.
 void fromData(java.nio.ByteBuffer fileBuffer)
           
 byte[] getJunkData()
          JUNK data should be non-data but it doesn't have to be.
 void setJunkData(byte[] junkData)
          JUNK data should be non-data but it doesn't have to be.
 
Methods inherited from class com.ritolaaudio.simplewavio.files.RiffChunk
addChildChunk, childrenToData, compareTo, getChildChunk, getOrderID, parseRiff, ParseRiff, printChildChunks, readUnsignedInt, readUnsignedShort, sizeEstimateInBytes, toData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

junkData

byte[] junkData
Constructor Detail

RiffChunk_JUNK

public RiffChunk_JUNK()
Method Detail

fromData

public void fromData(java.nio.ByteBuffer fileBuffer)
Specified by:
fromData in class RiffChunk

_toData

public void _toData(java.nio.ByteBuffer buffer)
Description copied from class: RiffChunk
DO NOT INVOKE OUTSIDE RIFF CHUNK OBJECTS
Called internally when recursively building a chunk hierarchy from RIFF data.

Specified by:
_toData in class RiffChunk

_sizeEstimateInBytes

public int _sizeEstimateInBytes()
Description copied from class: RiffChunk
DO NOT INVOKE OUTSIDE RIFFCHUNK OBJECTS
Called internally when pre-calculating the size of a RIFF file. This portion is developer-specified.

Specified by:
_sizeEstimateInBytes in class RiffChunk
Returns:

getJunkData

public byte[] getJunkData()
JUNK data should be non-data but it doesn't have to be.

Returns:
the junkData

setJunkData

public void setJunkData(byte[] junkData)
JUNK data should be non-data but it doesn't have to be.

Parameters:
junkData - the junkData to set