Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 150 for SmbException (0.05 sec)

  1. src/main/java/jcifs/smb/SmbException.java

            return this.getCause();
        }
    
        /**
         * @param e
         * @return a CIFS exception wrapped in an SmbException
         */
        static SmbException wrap(final CIFSException e) {
            if (e instanceof SmbException) {
                return (SmbException) e;
            }
            return new SmbException(e.getMessage(), e);
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  2. src/main/java/jcifs/smb1/smb1/SmbException.java

        /** The root cause exception */
        private Throwable rootCause;
    
        SmbException() {
        }
    
        SmbException(final int errcode, final Throwable rootCause) {
            super(getMessageByCode(errcode));
            status = getStatusByCode(errcode);
            this.rootCause = rootCause;
        }
    
        SmbException(final String msg) {
            super(msg);
            status = NT_STATUS_UNSUCCESSFUL;
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 6K bytes
    - Viewed (0)
  3. src/main/java/jcifs/SmbException.java

         */
        public SmbException(String message, int errorCode, Category category) {
            this(message, errorCode, Severity.PERMANENT, category);
        }
    
        /**
         * Adds context information to the exception
         *
         * @param key the context key
         * @param value the context value
         * @return this exception for chaining
         */
        public SmbException withContext(String key, Object value) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  4. src/main/java/jcifs/util/ServerResponseValidator.java

         * @param maxSize maximum allowed size
         * @throws SmbException if validation fails
         */
        public void validateBuffer(byte[] buffer, int expectedSize, int maxSize) throws SmbException {
            totalValidations.incrementAndGet();
    
            if (buffer == null) {
                failedValidations.incrementAndGet();
                throw new SmbException("Response buffer is null");
            }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb/SmbRandomAccessFile.java

         * @throws SmbException if an SMB error occurs
         */
        public SmbRandomAccessFile(final SmbFile file, final String mode) throws SmbException {
            this(file, mode, SmbConstants.DEFAULT_SHARING, false);
        }
    
        /**
         * Instantiate a random access file from a {@link SmbFile}
         *
         * @param file
         * @param mode
         * @throws SmbException
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  6. src/test/java/jcifs/util/PathValidatorTest.java

        }
    
        @Test
        public void testDirectoryTraversal() throws Exception {
            assertThrows(SmbException.class, () -> {
                validator.validatePath("\\share\\..\\..\\windows\\system32");
            });
        }
    
        @Test
        public void testDirectoryTraversalDot() throws Exception {
            assertThrows(SmbException.class, () -> {
                validator.validatePath("\\share\\.\\..\\folder");
            });
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 14.6K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbExceptionTest.java

        void testRetriableExceptions() {
            // Test non-retriable errors
            SmbException accessDenied = new SmbException(NtStatus.NT_STATUS_ACCESS_DENIED, false);
            // Note: isRetriable() method does not exist in SmbException
            assertNotNull(accessDenied);
    
            SmbException notFound = new SmbException(NtStatus.NT_STATUS_OBJECT_NAME_NOT_FOUND, false);
            assertNotNull(notFound);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb1/smb1/SmbRandomAccessFile.java

         * @throws SmbException if an I/O error occurs
         */
        public void close() throws SmbException {
            file.close();
        }
    
        @Override
        public final boolean readBoolean() throws SmbException {
            if (read(tmp, 0, 1) < 0) {
                throw new SmbException("EOF");
            }
            return tmp[0] != (byte) 0x00;
        }
    
        @Override
        public final byte readByte() throws SmbException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb1/smb1/SmbExceptionTest.java

            SmbException ex = new SmbException(0, root);
            assertSame(root, ex.getRootCause());
        }
    
        /**
         * Verify that the string-ctor sets status to {@code NT_STATUS_UNSUCCESSFUL}.
         */
        @Test
        @DisplayName("String constructor sets NT_STATUS_UNSUCCESSFUL status")
        void testStringConstructor() {
            SmbException ex = new SmbException("custom message");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb/SmbTreeHandleImpl.java

                return transport.getRemoteHostName();
            }
        }
    
        /**
         * {@inheritDoc}
         *
         * @throws SmbException
         *
         * @see jcifs.SmbTreeHandle#getServerTimeZoneOffset()
         */
        @Override
        public long getServerTimeZoneOffset() throws SmbException {
            try (SmbSessionImpl session = this.treeConnection.getSession(); SmbTransportImpl transport = session.getTransport()) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 11.1K bytes
    - Viewed (0)
Back to top