summaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc/postgresql/PG_Stream.java
diff options
context:
space:
mode:
authorPeter Mount1999-09-14 05:50:44 +0000
committerPeter Mount1999-09-14 05:50:44 +0000
commit24c82830cf8e7cc6d378c622ef1028937a4ee488 (patch)
tree7850bdf877e854d555422f705cc42830ddba9611 /src/interfaces/jdbc/postgresql/PG_Stream.java
parent4197aaa8ae50410cce73fef871b6c5740b705f0c (diff)
Patches for 6.5.2
Diffstat (limited to 'src/interfaces/jdbc/postgresql/PG_Stream.java')
-rw-r--r--src/interfaces/jdbc/postgresql/PG_Stream.java15
1 files changed, 10 insertions, 5 deletions
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 <[email protected]>
+ 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);
}
/**