All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opengis.cite.geotiff11.SyncPipe Maven / Gradle / Ivy

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