org.apache.poi.hdgf.chunks

## Class Chunk

- java.lang.Object
- - org.apache.poi.hdgf.chunks.Chunk

-     public final class Chunk
      extends java.lang.Object

  Base of all chunks, which hold data, flags etc

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Chunk.Command` A command in the visio file.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ChunkFactory.CommandDefinition[]` | `commandDefinitions` The possible different commands we can hold

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Chunk(ChunkHeader header, ChunkTrailer trailer, ChunkSeparator separator, byte[] contents)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `_getContents()`
    `ChunkFactory.CommandDefinition[]` | `getCommandDefinitions()` Gets the command definitions, which define and describe much of the data held by the chunk.
    `Chunk.Command[]` | `getCommands()`
    `ChunkHeader` | `getHeader()`
    `java.lang.String` | `getName()` Get the name of the chunk, as found from the CommandDefinitions
    `int` | `getOnDiskSize()` Returns the size of the chunk, including any headers, trailers and separators.
    `ChunkSeparator` | `getSeparator()` Gets the separator between this chunk and the next, if it exists
    `ChunkTrailer` | `getTrailer()` Gets the trailer for this chunk, if it exists
    `protected void` | `processCommands()` Uses our CommandDefinitions to process the commands our chunk type has, and figure out the values for them.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### commandDefinitions

          protected ChunkFactory.CommandDefinition[] commandDefinitions

      The possible different commands we can hold

  - ### Constructor Detail

    - #### Chunk

          public Chunk(ChunkHeader header,
                       ChunkTrailer trailer,
                       ChunkSeparator separator,
                       byte[] contents)

  - ### Method Detail

    - #### _getContents

          public byte[] _getContents()

    - #### getHeader

          public ChunkHeader getHeader()

    - #### getSeparator

          public ChunkSeparator getSeparator()

      Gets the separator between this chunk and the next, if it exists
      Returns:
        the separator

    - #### getTrailer

          public ChunkTrailer getTrailer()

      Gets the trailer for this chunk, if it exists
      Returns:
        the trailer

    - #### getCommandDefinitions

          public ChunkFactory.CommandDefinition[] getCommandDefinitions()

      Gets the command definitions, which define and describe much of the data held by the chunk.
      Returns:
        the command definitions

    - #### getCommands

          public Chunk.Command[] getCommands()

    - #### getName

          public java.lang.String getName()

      Get the name of the chunk, as found from the CommandDefinitions
      Returns:
        the name of the chunk

    - #### getOnDiskSize

          public int getOnDiskSize()

      Returns the size of the chunk, including any headers, trailers and separators.
      Returns:
        the size of the chunk

    - #### processCommands

          protected void processCommands()

      Uses our CommandDefinitions to process the commands our chunk type has, and figure out the values for them.

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.