129 |
* <code>PipedInputStream</code> to which this object is connected has |
* <code>PipedInputStream</code> to which this object is connected has |
130 |
* a buffer that cannot hold all of the bytes to be written. |
* a buffer that cannot hold all of the bytes to be written. |
131 |
* |
* |
132 |
* @param buf The array containing bytes to write to the stream. |
* @param buffer The array containing bytes to write to the stream. |
133 |
* @param offset The index into the array to start writing bytes from. |
* @param offset The index into the array to start writing bytes from. |
134 |
* @param len The number of bytes to write. |
* @param len The number of bytes to write. |
135 |
* |
* |
136 |
* @exception IOException If the stream has not been connected or has |
* @exception IOException If the stream has not been connected or has |
137 |
* been closed. |
* been closed. |
138 |
*/ |
*/ |
139 |
public void write(byte[] b, int off, int len) throws IOException |
public void write(byte[] buffer, int offset, int len) throws IOException |
140 |
{ |
{ |
141 |
if (sink == null) |
if (sink == null) |
142 |
throw new IOException ("Not connected"); |
throw new IOException ("Not connected"); |
143 |
if (closed) |
if (closed) |
144 |
throw new IOException ("Pipe closed"); |
throw new IOException ("Pipe closed"); |
145 |
|
|
146 |
sink.receive (b, off, len); |
sink.receive(buffer, offset, len); |
147 |
} |
} |
148 |
|
|
149 |
/** |
/** |