com.ibm.cics.jcicsx

Interface WritableBITContainer

  • All Superinterfaces:
    Container, WritableContainer<byte[]>
    All Known Subinterfaces:
    BITContainer


    public interface WritableBITContainer
    extends WritableContainer<byte[]>
    An interface which describes a CICS container with BIT datatype that can be written to
    Since CICS TS version:
    5.6
    Since package version:
    1.000.0
    • Method Detail

      • asOutputStream

        default java.io.OutputStream asOutputStream(int type,
                                                    int bufferSize)
        Get a view of this BIT container as an OutputStream. This stream is internally buffered to write data to the CICS container in chunks of bufferSize bytes.
        Parameters:
        type - Defines the type of the put container request: REPLACE, APPEND or PREPEND
        bufferSize - How many bytes to buffer before writing to the container
        Returns:
        The OutputStream
      • with

        default <T> WritableContainer<T> with(Serializer<T> serializer,
                                              int chunkSize)
        Return a container that wraps this container and allows objects of type T to be written to it directly.

        Objects will be serialized into the wrapped BIT container using the supplied Serializer. Some Serializers are available using static methods on the Serializers class, or can be custom-written.

        This implementation will write data to the underlying CICS container in chunks of chunkSize. For an implementation that writes all data to the container at once, see with(Serializer)

        Type Parameters:
        T - The type that the Serializer serializes bytes from
        Parameters:
        serializer - The Serializer used to write the object into the bytes in the container
        chunkSize - How many bytes buffer before writing to the CICS container
        Returns:
        This container for chaining
      • with

        default <T> WritableContainer<T> with(Serializer<T> serializer)
        Return a container that wraps this container and allows objects of type T to be written to it directly.

        Objects will be serialized into the wrapped BIT container using the supplied Serializer. Some Serializers are available using static methods on the Serializers class, or can be custom-written.

        This implementation will write all data to the underlying CICS container at once. For an implementation that writes the data in chunks, see with(Serializer, int).

        Type Parameters:
        T - The type that the Serializer serializes bytes from
        Parameters:
        serializer - The Serializer used to write the object into the bytes in the container
        Returns:
        This container for chaining
      • putWith

        default <T> WritableBITContainer putWith(Serializer<T> serializer,
                                                 T object)
                                          throws CICSConditionException,
                                                 java.io.IOException
        Put the provided object of type T into the container, using the provided Serializer to convert from bytes. This method will overwrite any existing container contents. This method effectively calls with(Serializer) followed by WritableContainer.put(Object)

        The object will be serialized into the wrapped BIT container using the supplied Serializer. Some Serializers are available using static methods on the Serializers class, or can be custom-written.

        This implementation will write all data to the underlying CICS container at once. For an implementation that writes the data in chunks, see putWith(Serializer, int, Object).

        For information about EXEC CICS API commands and associated RespCodes, see WritableContainer.put(Object)

        Type Parameters:
        T - The type that the Serializer serializes bytes from
        Parameters:
        serializer - The Serializer used to write the object into the bytes in the container
        object - The object to write to the container
        Returns:
        This container for chaining
        Throws:
        java.io.IOException - If there is a problem serializing the data
        CICSConditionException - if there is a problem writing the data to the CICS container.

        For information about EXEC CICS API commands and associated RespCodes, see WritableContainer.put(Object)

      • putWith

        default <T> WritableBITContainer putWith(Serializer<T> serializer,
                                                 int chunkSize,
                                                 T object)
                                          throws CICSConditionException,
                                                 java.io.IOException
        Put the provided object of type T into the container, using the provided Serializer to convert from bytes. This method will overwrite any existing container contents. This method effectively calls with(Serializer, int) followed by WritableContainer.put(Object)

        The object will be serialized into the wrapped BIT container using the supplied Serializer. Some Serializers are available using static methods on the Serializers class, or can be custom-written.

        This implementation will write data to the underlying CICS container in chunks of chunkSize. For an implementation that writes all data to the container at once, see putWith(Serializer, Object)

        For information about EXEC CICS API commands and associated RespCodes, see WritableContainer.put(Object)

        Type Parameters:
        T - The type that the Serializer serializes bytes from
        Parameters:
        serializer - The Serializer used to write the object into the bytes in the container
        chunkSize - How many bytes buffer before writing to the CICS container
        object - The object to write to the container
        Returns:
        This container for chaining
        Throws:
        java.io.IOException - If there is a problem serializing the data
        CICSConditionException - if there is a problem writing the data to the CICS container.

        For information about EXEC CICS API commands and associated RespCodes, see WritableContainer.put(Object)

      • appendWith

        default <T> WritableBITContainer appendWith(Serializer<T> serializer,
                                                    T object)
                                             throws CICSConditionException,
                                                    java.io.IOException
        Add the provided object of type T to the container, using the provided Serializer to convert from bytes. This method will append to any existing container contents. This method effectively calls with(Serializer) followed by WritableContainer.append(Object)

        The object will be serialized into the wrapped BIT container using the supplied Serializer. Some Serializers are available using static methods on the Serializers class, or can be custom-written.

        This implementation will write all data to the underlying CICS container at once. For an implementation that writes the data in chunks, see appendWith(Serializer, int, Object).

        For information about EXEC CICS API commands and associated RespCodes, see WritableContainer.append(Object)

        Type Parameters:
        T - The type that the Serializer serializes bytes from
        Parameters:
        serializer - The Serializer used to write the object into the bytes in the container
        object - The object to write to the container
        Returns:
        This container for chaining
        Throws:
        java.io.IOException - If there is a problem serializing the data
        CICSConditionException - if there is a problem writing the data to the CICS container.

        For information about EXEC CICS API commands and associated RespCodes, see WritableContainer.append(Object)

      • prependWith

        default <T> WritableBITContainer prependWith(Serializer<T> serializer,
                                                     int chunkSize,
                                                     T object)
                                              throws CICSConditionException,
                                                     java.io.IOException
        Put the provided object of type T into the container, using the provided Serializer to convert from bytes. This method will prepend to any existing container contents. This method effectively calls with(Serializer, int) followed by WritableContainer.append(Object)

        The object will be serialized into the wrapped BIT container using the supplied Serializer. Some Serializers are available using static methods on the Serializers class, or can be custom-written.

        This implementation will write data to the underlying CICS container in chunks of chunkSize. For an implementation that writes all data to the container at once, see prependWith(Serializer, Object)

        For information about EXEC CICS API commands and associated RespCodes, see WritableContainer.append(Object)

        Type Parameters:
        T - The type that the Serializer serializes bytes from
        Parameters:
        serializer - The Serializer used to write the object into the bytes in the container
        chunkSize - How many bytes buffer before writing to the CICS container
        object - The object to write to the container
        Returns:
        This container for chaining
        Throws:
        java.io.IOException - If there is a problem serializing the data
        CICSConditionException - if there is a problem writing the data to the CICS container.

        For information about EXEC CICS API commands and associated RespCodes, see WritableContainer.append(Object)

      • prependWith

        default <T> WritableBITContainer prependWith(Serializer<T> serializer,
                                                     T object)
                                              throws CICSConditionException,
                                                     java.io.IOException
        Add the provided object of type T to the container, using the provided Serializer to convert from bytes. This method will prepend to any existing container contents. This method effectively calls with(Serializer) followed by WritableContainer.append(Object)

        The object will be serialized into the wrapped BIT container using the supplied Serializer. Some Serializers are available using static methods on the Serializers class, or can be custom-written.

        This implementation will write all data to the underlying CICS container at once. For an implementation that writes the data in chunks, see prependWith(Serializer, int, Object).

        For information about EXEC CICS API commands and associated RespCodes, see WritableContainer.append(Object)

        Type Parameters:
        T - The type that the Serializer serializes bytes from
        Parameters:
        serializer - The Serializer used to write the object into the bytes in the container
        object - The object to write to the container
        Returns:
        This container for chaining
        Throws:
        java.io.IOException - If there is a problem serializing the data
        CICSConditionException - if there is a problem writing the data to the CICS container.

        For information about EXEC CICS API commands and associated RespCodes, see WritableContainer.append(Object)

      • appendWith

        default <T> WritableBITContainer appendWith(Serializer<T> serializer,
                                                    int chunkSize,
                                                    T object)
                                             throws CICSConditionException,
                                                    java.io.IOException
        Put the provided object of type T into the container, using the provided Serializer to convert from bytes. This method will append to any existing container contents. This method effectively calls with(Serializer, int) followed by WritableContainer.append(Object)

        The object will be serialized into the wrapped BIT container using the supplied Serializer. Some Serializers are available using static methods on the Serializers class, or can be custom-written.

        This implementation will write data to the underlying CICS container in chunks of chunkSize. For an implementation that writes all data to the container at once, see appendWith(Serializer, Object)

        For information about EXEC CICS API commands and associated RespCodes, see WritableContainer.append(Object)

        Type Parameters:
        T - The type that the Serializer serializes bytes from
        Parameters:
        serializer - The Serializer used to write the object into the bytes in the container
        chunkSize - How many bytes buffer before writing to the CICS container
        object - The object to write to the container
        Returns:
        This container for chaining
        Throws:
        java.io.IOException - If there is a problem serializing the data
        CICSConditionException - if there is a problem writing the data to the CICS container.

        For information about EXEC CICS API commands and associated RespCodes, see WritableContainer.append(Object)