本文整理匯總了Java中org.globus.io.streams.GridFTPInputStream類的典型用法代碼示例。如果您正苦於以下問題:Java GridFTPInputStream類的具體用法?Java GridFTPInputStream怎麽用?Java GridFTPInputStream使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
GridFTPInputStream類屬於org.globus.io.streams包,在下文中一共展示了GridFTPInputStream類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doGetInputStream
import org.globus.io.streams.GridFTPInputStream; //導入依賴的package包/類
/**
* Creates an input stream to read the file content from.
*
* @return the input stream
*
* @throws Exception the exception
*/
@Override
protected InputStream doGetInputStream() throws Exception {
// String Path = relPath;
log.debug("Creating GridFTP Input Stream to host:" + GsiFtpClientFactory.host + ":" + GsiFtpClientFactory.port);
// if ( ! relPath.startsWith("/")) {
// Path = "/" + Path;
// log.warn("Relative path " + relPath + " doesn't start with /. Using:" + Path + " instead");
// }
GridFTPInputStream fis = new GridFTPInputStream(null, GsiFtpClientFactory.host, GsiFtpClientFactory.port, getName().getPath());
// final InputStream instr = client.retrieveFileStream(relPath);
return fis; // new FtpInputStream(client, instr);
}