Commit 7d3151e1 by Tom Tromey Committed by Tom Tromey

PipedOutputStream.java (write(byte[], int, int)): New method.

	* java/io/PipedOutputStream.java (write(byte[], int, int)): New
	method.

From-SVN: r31774
parent 79f05c19
2000-02-03 Tom Tromey <tromey@cygnus.com>
* java/io/PipedOutputStream.java (write(byte[], int, int)): New
method.
2000-02-01 Tom Tromey <tromey@cygnus.com> 2000-02-01 Tom Tromey <tromey@cygnus.com>
* include/java-interp.h (_Jv_JNI_conversion_call): Declare. * include/java-interp.h (_Jv_JNI_conversion_call): Declare.
......
// PipedOutputStream.java - Write bytes to a pipe. // PipedOutputStream.java - Write bytes to a pipe.
/* Copyright (C) 1998, 1999 Red Hat, Inc. /* Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
This file is part of libgcj. This file is part of libgcj.
...@@ -81,12 +81,15 @@ public class PipedOutputStream extends OutputStream ...@@ -81,12 +81,15 @@ public class PipedOutputStream extends OutputStream
destination.receive(oneByte); destination.receive(oneByte);
} }
// This is mentioned in the JCL book, but we don't really need it. public void write (byte[] buffer, int offset, int count) throws IOException
// If there were a corresponding receive() method on {
// PipedInputStream then we could get better performance using if (closed)
// this. throw new IOException ();
// public void write (byte[] buffer, int offset, int count) if (offset < 0 || count < 0 || offset + count > buffer.length)
// throws IOException; throw new ArrayIndexOutOfBoundsException ();
for (int i = 0; i < count; ++i)
destination.receive (buffer[offset + i]);
}
// Instance variables. // Instance variables.
private PipedInputStream destination; private PipedInputStream destination;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment