Package org.postgresql.gss
Class GSSInputStream
java.lang.Object
java.io.InputStream
org.postgresql.gss.GSSInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]
private int
private int
private final GSSContext
private final byte[]
private final byte[]
private int
private final MessageProp
private byte[]
private int
private final InputStream
-
Constructor Summary
ConstructorsConstructorDescriptionGSSInputStream
(InputStream wrapped, GSSContext gssContext, MessageProp messageProp) -
Method Summary
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
gssContext
-
messageProp
-
wrapped
-
encrypted
private byte[] encrypted -
encryptedPos
private int encryptedPos -
encryptedLength
private int encryptedLength -
unencrypted
private byte[] unencrypted -
unencryptedPos
private int unencryptedPos -
int4Buf
private final byte[] int4Buf -
lenPos
private int lenPos -
int1Buf
private final byte[] int1Buf
-
-
Constructor Details
-
GSSInputStream
-
-
Method Details
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
readLength
Reads the length of the wrapper message.- Returns:
- -1 of end of stream reached, 0 if length is not fully read yet, and 1 if length is fully read
- Throws:
IOException
- if read fails
-
readEncryptedBytesAndUnwrap
Reads the encrypted message, and unwraps it.- Returns:
- -1 of end of stream reached, 0 if the message is not fully read yet, and 1 if length is fully read
- Throws:
IOException
- if read fails
-