
org.opengis.cite.geotiff11.SyncPipe Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ets-geotiff11 Show documentation
Show all versions of ets-geotiff11 Show documentation
Describe purpose of test suite.
The newest version!
package org.opengis.cite.geotiff11;
import java.io.InputStream;
import java.io.OutputStream;
/**
*
* SyncPipe class.
*
*
*/
public class SyncPipe implements Runnable {
/**
*
* Constructor for SyncPipe.
*
* @param istrm a {@link java.io.InputStream} object
* @param ostrm a {@link java.io.OutputStream} object
*/
public SyncPipe(InputStream istrm, OutputStream ostrm) {
this.istrm_ = istrm;
this.ostrm_ = ostrm;
}
/**
*
* run.
*
*/
public void run() {
try {
final byte[] buffer = new byte[1024];
for (int length = 0; (length = this.istrm_.read(buffer)) != -1;) {
this.ostrm_.write(buffer, 0, length);
}
}
catch (Exception e) {
e.printStackTrace();
}
}
private final OutputStream ostrm_;
private final InputStream istrm_;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy