- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 20 for hasCapability (0.08 seconds)
-
src/test/java/jcifs/smb/SmbTransportInternalTest.java
} // Happy path: hasCapability returns based on provided capability codes @ParameterizedTest @DisplayName("hasCapability returns expected values for various caps") @ValueSource(ints = { -1, 0, 1, 1024 }) void hasCapability_variousCaps(int cap) throws SmbException { when(transport.hasCapability(anyInt())).thenAnswer(inv -> ((int) inv.getArgument(0)) >= 0);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 12.1K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbTreeHandleImplTest.java
} @Test @DisplayName("hasCapability delegates and propagates exceptions") void hasCapabilityDelegates() throws Exception { // Happy path delegates; invalid case propagates SmbException when(treeConnection.hasCapability(123)).thenReturn(true); assertTrue(handle.hasCapability(123)); verify(treeConnection).hasCapability(123); // Exception pathCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 14.4K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbWatchHandleImplTest.java
when(handle.getTree()).thenReturn(tree); when(tree.isSMB2()).thenReturn(false); when(tree.getConfig()).thenReturn(mock(Configuration.class)); when(tree.hasCapability(SmbConstants.CAP_NT_SMBS)).thenReturn(true); when(handle.getFid()).thenReturn(fid); when(tree.send(any(CommonServerMessageBlockRequest.class), any(), any(), any())).thenReturn(resp); }
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 11.5K bytes - Click Count (0) -
src/main/java/jcifs/smb/SmbTreeHandleImpl.java
public void ensureDFSResolved() throws CIFSException { this.treeConnection.ensureDFSResolved(this.resourceLoc); } @Override public boolean hasCapability(final int cap) throws SmbException { return this.treeConnection.hasCapability(cap); } /** * {@inheritDoc} * * @see jcifs.SmbTreeHandle#isConnected() */ @Override public boolean isConnected() {
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sun Aug 31 08:00:57 GMT 2025 - 11.1K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbTreeConnectionTest.java
setTree(c2, other); assertFalse(c1.isSame(c2)); } @Test @DisplayName("hasCapability throws when not connected") void hasCapability_notConnected_throws() { SmbTreeConnection c = newConn(); SmbException ex = assertThrows(SmbException.class, () -> c.hasCapability(1)); assertTrue(ex.getMessage().contains("Not connected")); } @Test
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 13K bytes - Click Count (0) -
src/main/java/jcifs/smb/SmbTreeConnection.java
* @throws SmbException */ public boolean hasCapability(final int cap) throws SmbException { try (SmbSessionImpl s = getSession()) { if (s != null) { try (SmbTransportImpl transport = s.getTransport()) { return transport.hasCapability(cap); } } throw new SmbException("Not connected");Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 30.4K bytes - Click Count (1) -
src/main/java/jcifs/smb1/smb1/SmbTransport.java
port == 445 && this.port == 139) && (localAddr == this.localAddr || localAddr != null && localAddr.equals(this.localAddr)) && localPort == this.localPort; } boolean hasCapability(final int cap) throws SmbException { try { connect(RESPONSE_TIMEOUT); } catch (final IOException ioe) { throw new SmbException(ioe.getMessage(), ioe); }
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 31.8K bytes - Click Count (0) -
src/main/java/jcifs/smb/SmbRandomAccessFile.java
} try (SmbFileHandle h = ensureOpen()) {} this.readSize = th.getReceiveBufferSize() - 70; this.writeSize = th.getSendBufferSize() - 70; if (th.hasCapability(SmbConstants.CAP_LARGE_READX)) { this.largeReadX = true; this.readSize =Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 18.8K bytes - Click Count (0) -
src/main/java/jcifs/smb/SmbCopyUtil.java
req.setFileInformation(new FileBasicInfo(ctime, atime, mtime, 0L, attrs)); dh.send(req); } else if (dh.hasCapability(SmbConstants.CAP_NT_SMBS)) { // use the open file descriptor dh.send(new Trans2SetFileInformation(dh.getConfig(), dfd.getFid(), attrs, ctime, mtime, atime),
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 16.6K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbPipeHandleInternalTest.java
when(pipe.ensureTreeConnected()).thenReturn(tree); when(tree.acquire()).thenReturn(tree); // Setup for ensureOpen when(tree.isSMB2()).thenReturn(false); when(tree.hasCapability(SmbConstants.CAP_NT_SMBS)).thenReturn(true); when(pipe.openUnshared(anyInt(), anyInt(), anyInt(), anyInt(), anyInt())).thenReturn(fh); when(fh.acquire()).thenReturn(fh);
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 16.7K bytes - Click Count (0)