Class TgClobTempFile

  • All Implemented Interfaces:
    TgClob, IceaxeTimeoutCloseable, java.lang.AutoCloseable

    public class TgClobTempFile
    extends java.lang.Object
    implements TgClob
    CLOB using temporary file.
    Since:
    1.8.0
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TgClobTempFile​(java.nio.file.Path path, boolean deleteOnExecuteFinished)
      Creates a new instance.
    • Constructor Detail

      • TgClobTempFile

        protected TgClobTempFile​(java.nio.file.Path path,
                                 boolean deleteOnExecuteFinished)
        Creates a new instance.
        Parameters:
        path - temporary file path
        deleteOnExecuteFinished - delete temporary file on execute finished
    • Method Detail

      • getPath

        public java.nio.file.Path getPath()
        Description copied from interface: TgClob
        get path.
        Specified by:
        getPath in interface TgClob
        Returns:
        path
      • isTempFile

        public boolean isTempFile()
        Description copied from interface: TgClob
        Whether temporary file or not.
        Specified by:
        isTempFile in interface TgClob
        Returns:
        true when temporary file
      • isDeleteOnExecuteFinished

        public boolean isDeleteOnExecuteFinished()
        Description copied from interface: TgClob
        Whether delete on execute finished.
        Specified by:
        isDeleteOnExecuteFinished in interface TgClob
        Returns:
        true: delete temporary file on execute finished
      • openReader

        public java.io.Reader openReader()
                                  throws java.io.IOException
        Description copied from interface: TgClob
        Returns a reader.
        Specified by:
        openReader in interface TgClob
        Returns:
        reader
        Throws:
        java.io.IOException - if an I/O error occurs
      • copyTo

        public void copyTo​(java.nio.file.Path destination)
                    throws java.io.IOException
        Description copied from interface: TgClob
        Copy the large object to the file indicated by the given path.
        Specified by:
        copyTo in interface TgClob
        Parameters:
        destination - the path of the destination file
        Throws:
        java.io.IOException - if an I/O error occurs
      • readString

        public java.lang.String readString()
                                    throws java.io.IOException
        Description copied from interface: TgClob
        Reads string.
        Specified by:
        readString in interface TgClob
        Returns:
        value
        Throws:
        java.io.IOException - if an I/O error occurs
      • upload

        public TgRemoteClob upload​(TsurugiSession session,
                                   TgTimeValue timeout)
                            throws java.io.IOException,
                                   java.lang.InterruptedException
        Description copied from interface: TgClob
        Upload CLOB.
        Specified by:
        upload in interface TgClob
        Parameters:
        session - session
        timeout - timeout
        Returns:
        uploaded CLOB
        Throws:
        java.io.IOException - if an I/O error occurs
        java.lang.InterruptedException - if the operation is interrupted
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface IceaxeTimeoutCloseable
        Specified by:
        close in interface TgClob
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object