| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
package org.locationtech.jts.io; |
| 13 |
|
| 14 |
import java.io.IOException; |
| 15 |
import java.io.OutputStream; |
| 16 |
|
| 17 |
/** |
| 18 |
* An adapter to allow an {@link OutputStream} to be used as an {@link OutStream} |
| 19 |
*/ |
| 20 |
public class OutputStreamOutStream |
| 21 |
implements OutStream |
| 22 |
{ |
| 23 |
private OutputStream os; |
| 24 |
|
| 25 |
public OutputStreamOutStream(OutputStream os) |
| 26 |
{ |
| 27 |
this.os = os; |
| 28 |
} |
| 29 |
public void write(byte[] buf, int len) throws IOException |
| 30 |
{ |
| 31 |
os.write(buf, 0, len); |
| 32 |
} |
| 33 |
} |
| 34 |
|