org.firebirdsql.gds

## Class ClumpletReader

- java.lang.Object
- - org.firebirdsql.gds.ClumpletReader

-     public class ClumpletReader
      extends java.lang.Object

  Reader for clumplets, similar to the implementation `ClumpletReader.cpp`.
  Since:
    3.0
  Author:
    Mark Rotteveel

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ClumpletReader.ClumpletType`
    `static class` | `ClumpletReader.Kind`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClumpletReader(ClumpletReader.Kind kind, byte[] buffer)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `adjustSpbState()`
    `boolean` | `directNext(int tag)` Checks if the next tag in this reader is `tag`.
    `boolean` | `find(int tag)`
    `int` | `getBufferTag()`
    `byte[]` | `getBytes()`
    `int` | `getClumpLength()`
    `int` | `getClumpletSize(boolean wTag, boolean wLength, boolean wData)`
    `ClumpletReader.ClumpletType` | `getClumpletType(byte tag)`
    `int` | `getClumpTag()`
    `int` | `getInt()`
    `long` | `getLong()`
    `java.lang.String` | `getString(java.nio.charset.Charset charset)`
    `java.lang.String` | `getString(Encoding encoding)`
    `boolean` | `isEof()`
    `boolean` | `isTagged()`
    `void` | `moveNext()`
    `boolean` | `next(int tag)` Finds the next `tag` in the reader, skipping tags to find it.
    `void` | `rewind()`

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

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

- - ### Constructor Detail

    - #### ClumpletReader

          public ClumpletReader(ClumpletReader.Kind kind,
                                byte[] buffer)

  - ### Method Detail

    - #### isTagged

          public boolean isTagged()

    - #### getBufferTag

          public int getBufferTag()
                           throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### getClumpletType

          public ClumpletReader.ClumpletType getClumpletType(byte tag)
                                                      throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### adjustSpbState

          public void adjustSpbState()
                              throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### getClumpletSize

          public int getClumpletSize(boolean wTag,
                                     boolean wLength,
                                     boolean wData)
                              throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### moveNext

          public void moveNext()
                        throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### rewind

          public void rewind()

    - #### find

          public boolean find(int tag)
                       throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### next

          public boolean next(int tag)
                       throws java.sql.SQLException

      Finds the next `tag` in the reader, skipping tags to find it.

      If `tag` is not found, the original position of this reader is retained.

      Parameters:
        `tag` - Tag to find
      Returns:
        `true` if `tag` was found and this reader is positioned to read it, `false` otherwise
      Throws:
        `java.sql.SQLException` - For errors positioning
      See Also:
        `directNext(int)`

    - #### directNext

          public boolean directNext(int tag)
                             throws java.sql.SQLException

      Checks if the next tag in this reader is `tag`.

      If the next tag is not `tag`, the original position of this reader is retained.

      Parameters:
        `tag` - Tag to find
      Returns:
        `true` if the next tag is `tag` and this reader is positioned to read it, `false` otherwise
      Throws:
        `java.sql.SQLException` - For errors positioning
      Since:
        5
      See Also:
        `next(int)`

    - #### getClumpTag

          public int getClumpTag()
                          throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### getClumpLength

          public int getClumpLength()
                             throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### getBytes

          public byte[] getBytes()
                          throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### getInt

          public int getInt()
                     throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### getLong

          public long getLong()
                       throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### getString

          public java.lang.String getString(Encoding encoding)
                                     throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### getString

          public java.lang.String getString(java.nio.charset.Charset charset)
                                     throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### isEof

          public boolean isEof()

Copyright © 2001-2025 Jaybird (Firebird JDBC) team. All rights reserved.