org.apache.poi.hsmf.datatypes

## Class Chunk

- java.lang.Object
- - org.apache.poi.hsmf.datatypes.Chunk

- Direct Known Subclasses:
    ByteChunk, DirectoryChunk, MessageSubmissionChunk, PropertiesChunk, StringChunk

      public abstract class Chunk
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DEFAULT_NAME_PREFIX`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Chunk(int chunkId, Types.MAPIType type)`
    `protected` | `Chunk(java.lang.String namePrefix, int chunkId, Types.MAPIType type)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getChunkId()` Gets the id of this chunk
    `java.lang.String` | `getEntryName()` Creates a string to use to identify this chunk in the POI file system object.
    `Types.MAPIType` | `getType()` Gets the numeric type of this chunk.
    `abstract void` | `readValue(java.io.InputStream value)` Reads the value of this chunk using an InputStream
    `abstract void` | `writeValue(java.io.OutputStream out)` Writes the value of this chunk back out again.

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

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

- - ### Field Detail

    - #### DEFAULT_NAME_PREFIX

          public static final java.lang.String DEFAULT_NAME_PREFIX

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Chunk

          protected Chunk(java.lang.String namePrefix,
                          int chunkId,
                          Types.MAPIType type)

    - #### Chunk

          protected Chunk(int chunkId,
                          Types.MAPIType type)

  - ### Method Detail

    - #### getChunkId

          public int getChunkId()

      Gets the id of this chunk

    - #### getType

          public Types.MAPIType getType()

      Gets the numeric type of this chunk.

    - #### getEntryName

          public java.lang.String getEntryName()

      Creates a string to use to identify this chunk in the POI file system object.

    - #### writeValue

          public abstract void writeValue(java.io.OutputStream out)
                                   throws java.io.IOException

      Writes the value of this chunk back out again.
      Throws:
        `java.io.IOException`

    - #### readValue

          public abstract void readValue(java.io.InputStream value)
                                  throws java.io.IOException

      Reads the value of this chunk using an InputStream
      Throws:
        `java.io.IOException`

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