org.apache.poi.hsmf.datatypes

## Class DirectoryChunk

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

-     public class DirectoryChunk
      extends Chunk

  A Chunk that is just a placeholder in the MAPIMessage directory structure, which contains children. This is most commonly used with nested MAPIMessages

- - ### Field Summary

    - ### Fields inherited from class org.apache.poi.hsmf.datatypes.Chunk

      `DEFAULT_NAME_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DirectoryChunk(DirectoryNode dir, java.lang.String namePrefix, int chunkId, Types.MAPIType type)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `MAPIMessage` | `getAsEmbeddedMessage()` Treats the directory as an embedded MAPIMessage (it normally is one), and returns a MAPIMessage object to process it with.
    `MAPIMessage` | `getAsEmbededMessage()` Deprecated. use `getAsEmbeddedMessage()` instead
    `DirectoryNode` | `getDirectory()` Returns the directory entry for this chunk.
    `void` | `readValue(java.io.InputStream value)` Reads the value of this chunk using an InputStream
    `void` | `writeValue(java.io.OutputStream out)` Writes the value of this chunk back out again.

    - ### Methods inherited from class org.apache.poi.hsmf.datatypes.Chunk

      `getChunkId, getEntryName, getType`

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

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

- - ### Constructor Detail

    - #### DirectoryChunk

          public DirectoryChunk(DirectoryNode dir,
                                java.lang.String namePrefix,
                                int chunkId,
                                Types.MAPIType type)

  - ### Method Detail

    - #### getDirectory

          public DirectoryNode getDirectory()

      Returns the directory entry for this chunk. You can then use standard POIFS methods to enumerate the entries in it.

    - #### getAsEmbededMessage

          @Removal(version="4.3")
           @Deprecated
          public MAPIMessage getAsEmbededMessage()
                                                                               throws java.io.IOException

      Deprecated. use `getAsEmbeddedMessage()` instead
      Treats the directory as an embedded MAPIMessage (it normally is one), and returns a MAPIMessage object to process it with.
      Throws:
        `java.io.IOException`

    - #### getAsEmbeddedMessage

          public MAPIMessage getAsEmbeddedMessage()
                                           throws java.io.IOException

      Treats the directory as an embedded MAPIMessage (it normally is one), and returns a MAPIMessage object to process it with.
      Throws:
        `java.io.IOException`
      Since:
        4.1.1

    - #### readValue

          public void readValue(java.io.InputStream value)

      Description copied from class: `Chunk`
      Reads the value of this chunk using an InputStream
      Specified by:
        `readValue` in class `Chunk`

    - #### writeValue

          public void writeValue(java.io.OutputStream out)

      Description copied from class: `Chunk`
      Writes the value of this chunk back out again.
      Specified by:
        `writeValue` in class `Chunk`

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