Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hsmf.datatypes
Class ByteChunk

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

    public class ByteChunk

extends Chunk

A Chunk that holds binary data, normally unparsed. Generally as we know how to make sense of the contents, we create a new Chunk class and add a special case in the parser for them.

Field Summary

Fields inherited from class org.apache.poi.hsmf.datatypes.Chunk
`DEFAULT_NAME_PREFIX`

Constructor Summary
`ByteChunk(int chunkId, Types.MAPIType type)` Create a Byte Chunk, with the specified type.
`ByteChunk(java.lang.String namePrefix, int chunkId, Types.MAPIType type)` Creates a Byte Chunk.

Method Summary
`java.lang.String` | `getAs7bitString()` Returns the data, formatted as a string assuming it was a non-unicode string.
`byte[]` | `getValue()`
`void` | `readValue(java.io.InputStream value)` Reads the value of this chunk using an InputStream
`void` | `setValue(byte[] value)`
`protected static java.lang.String` | `toDebugFriendlyString(byte[] value)` Formats the byte array in a debug-friendly way, showing all of a short array, and the start of a longer one.
`java.lang.String` | `toString()` Returns the data in a debug-friendly string format
`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, wait, wait, wait`

Constructor Detail

### ByteChunk

    public ByteChunk(java.lang.String namePrefix,
                     int chunkId,
                     Types.MAPIType type)

  Creates a Byte Chunk.

### ByteChunk

    public ByteChunk(int chunkId,
                     Types.MAPIType type)

  Create a Byte Chunk, with the specified type.

Method Detail

### readValue

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

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

  Specified by:
    `readValue` in class `Chunk`
  Throws:
    `java.io.IOException`

### writeValue

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

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

  Specified by:
    `writeValue` in class `Chunk`
  Throws:
    `java.io.IOException`

### getValue

    public byte[] getValue()

### setValue

    public void setValue(byte[] value)

### toString

    public java.lang.String toString()

  Returns the data in a debug-friendly string format

  Overrides:
    `toString` in class `java.lang.Object`

### toDebugFriendlyString

    protected static java.lang.String toDebugFriendlyString(byte[] value)

  Formats the byte array in a debug-friendly way, showing all of a short array, and the start of a longer one.

### getAs7bitString

    public java.lang.String getAs7bitString()

  Returns the data, formatted as a string assuming it was a non-unicode string. If your data isn't in fact stored as basically ASCII, don't expect this to return much of any sense....

  Returns:
    the data formatted as a string

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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