/** * @throws SmbException * */ SmbFileInputStream ( SmbFile file, SmbTreeHandleImpl th, SmbFileHandleImpl fh ) throws SmbException { this.file = file; this.handle = fh; this.unsharedFile = false; this.smb2 = th.isSMB2(); try { init(th); } catch ( CIFSException e ) { throw SmbException.wrap(e); } }
/** * @throws SmbException * */ SmbFileInputStream ( SmbFile file, SmbTreeHandleImpl th, SmbFileHandleImpl fh ) throws SmbException { this.file = file; this.handle = fh; this.unsharedFile = false; this.smb2 = th.isSMB2(); try { init(th); } catch ( CIFSException e ) { throw SmbException.wrap(e); } }
SmbFileInputStream ( SmbFile file, int openFlags, int access, int sharing, boolean unshared ) throws SmbException { this.file = file; this.unsharedFile = unshared; this.openFlags = openFlags; this.access = access; try ( SmbTreeHandleInternal th = file.ensureTreeConnected() ) { this.smb2 = th.isSMB2(); if ( file.getType() != SmbConstants.TYPE_NAMED_PIPE ) { try ( SmbFileHandle h = ensureOpen() ) {} this.openFlags &= ~ ( SmbConstants.O_CREAT | SmbConstants.O_TRUNC ); } init(th); } catch ( CIFSException e ) { throw SmbException.wrap(e); } }
SmbFileInputStream ( SmbFile file, int openFlags, int access, int sharing, boolean unshared ) throws SmbException { this.file = file; this.unsharedFile = unshared; this.openFlags = openFlags; this.access = access; try ( SmbTreeHandleInternal th = file.ensureTreeConnected() ) { this.smb2 = th.isSMB2(); if ( file.getType() != SmbConstants.TYPE_NAMED_PIPE ) { try ( SmbFileHandle h = ensureOpen() ) {} this.openFlags &= ~ ( SmbConstants.O_CREAT | SmbConstants.O_TRUNC ); } init(th); } catch ( CIFSException e ) { throw SmbException.wrap(e); } }