Class GSSOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.postgresql.util.internal.PgBufferedOutputStream
org.postgresql.gss.GSSOutputStream
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
Output stream that wraps each packed with GSS encryption.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GSSContextprivate final MessagePropprivate final PgBufferedOutputStreamFields inherited from class PgBufferedOutputStream
buf, countFields inherited from class FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionGSSOutputStream(PgBufferedOutputStream out, GSSContext gssContext, MessageProp messageProp, int maxTokenSize) Creates GSS output stream. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprivate static intgetBufferSize(GSSContext gssContext, MessageProp messageProp, int maxTokenSize) voidwrite(byte[] b, int off, int len) private voidwriteWrapped(byte[] b, int off, int len) Methods inherited from class PgBufferedOutputStream
flush, write, write, writeInt2, writeInt4, writeZerosMethods inherited from class FilterOutputStream
close, writeMethods inherited from class OutputStream
nullOutputStream
-
Field Details
-
pgOut
-
gssContext
-
messageProp
-
-
Constructor Details
-
GSSOutputStream
public GSSOutputStream(PgBufferedOutputStream out, GSSContext gssContext, MessageProp messageProp, int maxTokenSize) throws GSSException Creates GSS output stream.- Parameters:
out- output stream for the encrypted datagssContext- gss contextmessageProp- message propertiesmaxTokenSize- maximum length of the encrypted messages- Throws:
GSSException
-
-
Method Details
-
getBufferSize
private static int getBufferSize(GSSContext gssContext, MessageProp messageProp, int maxTokenSize) throws GSSException - Throws:
GSSException
-
flushBuffer
- Overrides:
flushBufferin classPgBufferedOutputStream- Throws:
IOException
-
writeWrapped
- Throws:
IOException
-
write
- Overrides:
writein classPgBufferedOutputStream- Throws:
IOException
-