de.esprit.appsuite.nio.binary

## Class String32BufferWrapper

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.log.SimpleLogSupportAdapter
    - - de.esprit.appsuite.nio.binary.ByteBufferWrapper
      - - de.esprit.appsuite.nio.binary.NumberBufferWrapper
        - - de.esprit.appsuite.nio.binary.IntBufferWrapper
          - - de.esprit.appsuite.nio.binary.String32BufferWrapper

- All Implemented Interfaces:
    BinaryDataStructure, SimpleLogSupport, Dumpable, Resettable

      public class String32BufferWrapper
      extends IntBufferWrapper

  This buffer reads Strings whereas a single char consists of 4 bytes!
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `String32BufferWrapper(java.lang.String name, BinaryChannel binaryChannel)`
    `String32BufferWrapper(java.lang.String name, BinaryChannel binaryChannel, int expectedStringSize)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getSize()` Returns the capacity of the underlying buffer in bytes.
    `java.lang.String` | `getText()` Reads in a loop until '0' was found as a string terminator
    `void` | `reset()` Clears the internal cache and forces the data to be re-read again on the next access.

    - ### Methods inherited from class de.esprit.appsuite.nio.binary.IntBufferWrapper

      `createSingleValueBufferWrapper, getDoubleValue, getDoubleValue, getIntBuffer, getValue, getValue, getValues`

    - ### Methods inherited from class de.esprit.appsuite.nio.binary.NumberBufferWrapper

      `getSingleValueBufferWrapper`

    - ### Methods inherited from class de.esprit.appsuite.nio.binary.ByteBufferWrapper

      `getBinaryChannel, getByteBuffer, getByteOrder, getCapacity, getData, getEndPosition, getJavaDataType, getName, getNumberOfValues, getPredecessor, getReadOffset, getStartPosition, read, setPredecessor, setReadOffset`

    - ### Methods inherited from class de.esprit.common.log.SimpleLogSupportAdapter

      `getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString`

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

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

- - ### Constructor Detail

    - #### String32BufferWrapper

          public String32BufferWrapper(java.lang.String name,
                               BinaryChannel binaryChannel)

    - #### String32BufferWrapper

          public String32BufferWrapper(java.lang.String name,
                               BinaryChannel binaryChannel,
                               int expectedStringSize)

  - ### Method Detail

    - #### getText

          public final java.lang.String getText()
                                         throws java.io.IOException

      Reads in a loop until '0' was found as a string terminator
      Throws:
        `java.io.IOException`

    - #### getSize

          public final int getSize()
                            throws java.io.IOException

      Description copied from class: `ByteBufferWrapper`
      Returns the capacity of the underlying buffer in bytes.
      Overrides:
        `getSize` in class `ByteBufferWrapper`
      Throws:
        `java.io.IOException`

    - #### reset

          public void reset()

      Description copied from class: `ByteBufferWrapper`
      Clears the internal cache and forces the data to be re-read again on the next access.
      Specified by:
        `reset` in interface `Resettable`
      Overrides:
        `reset` in class `IntBufferWrapper`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.