From 24c82830cf8e7cc6d378c622ef1028937a4ee488 Mon Sep 17 00:00:00 2001 From: Peter Mount Date: Tue, 14 Sep 1999 05:50:44 +0000 Subject: Patches for 6.5.2 --- src/interfaces/jdbc/postgresql/PG_Stream.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/interfaces/jdbc/postgresql/PG_Stream.java') diff --git a/src/interfaces/jdbc/postgresql/PG_Stream.java b/src/interfaces/jdbc/postgresql/PG_Stream.java index e2ee91ac2f7..d5816b634c9 100644 --- a/src/interfaces/jdbc/postgresql/PG_Stream.java +++ b/src/interfaces/jdbc/postgresql/PG_Stream.java @@ -39,8 +39,9 @@ public class PG_Stream // improvement on FreeBSD machines (caused by a bug in their TCP Stack) connection.setTcpNoDelay(true); - pg_input = connection.getInputStream(); - pg_output = new BufferedOutputStream(connection.getOutputStream()); + // Buffer sizes submitted by Sverre H Huseby + pg_input = new BufferedInputStream(connection.getInputStream(), 8192); + pg_output = new BufferedOutputStream(connection.getOutputStream(), 8192); } /** @@ -51,9 +52,13 @@ public class PG_Stream */ public void SendChar(int val) throws IOException { - byte b[] = new byte[1]; - b[0] = (byte)val; - pg_output.write(b); + // Original code + //byte b[] = new byte[1]; + //b[0] = (byte)val; + //pg_output.write(b); + + // Optimised version by Sverre H. Huseby Aug 22 1999 Applied Sep 13 1999 + pg_output.write((byte)val); } /** -- cgit v1.2.3