![JAR search and dependency download from the Maven repository](/logo.png)
com.huawei.opengauss.jdbc.util.StreamWrapper.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opengaussjdbc Show documentation
Show all versions of opengaussjdbc Show documentation
HuaweiCloud JDBC for GaussDB
The newest version!
???? 4 ? ,com/huawei/opengauss/jdbc/util/StreamWrapper java/lang/Object StreamWrapper.java .com/huawei/opengauss/jdbc/util/StreamWrapper$1 MAX_MEMORY_BUFFER_BYTES I ? TEMP_FILE_PREFIX Ljava/lang/String; postgres-pgjdbc-stream
stream Ljava/io/InputStream; rawData [B offset length ([BII)V ()V
this .Lcom/huawei/opengauss/jdbc/util/StreamWrapper; data (Ljava/io/InputStream;I)V (Ljava/io/InputStream;)V ,com/huawei/opengauss/jdbc/util/PSQLException ' java/io/IOException ) java/io/ByteArrayOutputStream +
,
copyStream /(Ljava/io/InputStream;Ljava/io/OutputStream;I)I . /
0 toByteArray ()[B 2 3
, 4 java/io/File 6 createTempFile 4(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File; 8 9
7 : java/io/FileOutputStream < (Ljava/io/File;)V >
= ? write ([B)V A B
= C??? .Object is too large to send over the protocol. F !com/huawei/opengauss/jdbc/util/GT H tr 9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; J K
I L (com/huawei/opengauss/jdbc/util/PSQLState N NUMERIC_CONSTANT_OUT_OF_RANGE *Lcom/huawei/opengauss/jdbc/util/PSQLState; P Q O R ?(Ljava/lang/String;Lcom/huawei/opengauss/jdbc/util/PSQLState;)V T
( U java/io/InputStream W flush Z
= [ close ]
= ^ java/lang/Throwable ` M(Lcom/huawei/opengauss/jdbc/util/StreamWrapper;Ljava/io/File;Ljava/io/File;)V b
c 2An I/O error occured while sending to the backend. e IO_ERROR g Q O h T(Ljava/lang/String;Lcom/huawei/opengauss/jdbc/util/PSQLState;Ljava/lang/Throwable;)V j
( k
diskLength tempFile Ljava/io/File; diskOutputStream Ljava/io/FileOutputStream; memoryOutputStream Ljava/io/ByteArrayOutputStream; memoryLength rawDataArray e Ljava/io/IOException; getStream ()Ljava/io/InputStream; java/io/ByteArrayInputStream z
{ | getLength ()I getOffset getBytes toString ()Ljava/lang/String; java/lang/StringBuilder ?
?