Java Code Examples for com.hierynomus.smbj.share.File#getInputStream()
The following examples show how to use
com.hierynomus.smbj.share.File#getInputStream() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SMBJController.java From DanDanPlayForAndroid with MIT License | 6 votes |
@Override public InputStream getFileInputStream(String fileName) { String filePath = getPathNotShare(fileName); try { File file = openFile(diskShare, filePath); inputStream = file.getInputStream(); return inputStream; } catch (Exception e) { e.printStackTrace(); } return null; }
Example 2
Source File: SMBJ_RPCController.java From DanDanPlayForAndroid with MIT License | 6 votes |
@Override public InputStream getFileInputStream(String fileName) { String filePath = getPathNotShare(fileName); try { File file = openFile(diskShare, filePath); inputStream = file.getInputStream(); } catch (Exception e) { e.printStackTrace(); } return inputStream; }
Example 3
Source File: Samba2FileSystem.java From iaf with Apache License 2.0 | 6 votes |
@Override public InputStream readFile(String filename) throws FileSystemException, IOException { final File file = getFile(filename, AccessMask.GENERIC_READ, SMB2CreateDisposition.FILE_OPEN); InputStream is = file.getInputStream(); FilterInputStream fis = new FilterInputStream(is) { boolean isOpen = true; @Override public void close() throws IOException { if(isOpen) { super.close(); isOpen=false; } file.close(); } }; return fis; }