Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 77 for UnknownHostException (0.31 sec)

  1. src/test/java/jcifs/netbios/NbtAddressTest.java

            verify(mockNameServiceClient).getNodeStatus(nbtAddress);
        }
    
        @Test
        void testNextCalledName_SmbServerName_UnknownHostException() throws UnknownHostException {
            // Test nextCalledName when getNodeStatus throws UnknownHostException
            when(mockContext.getNameServiceClient()).thenReturn(mockNameServiceClient);
            mockName = new Name(mockConfig, "HOST", 0x20, null);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.4K bytes
    - Viewed (0)
  2. src/test/java/jcifs/NameServiceClientTest.java

        void testGetNbtAllByAddress_NetbiosAddress_ThrowsUnknownHostException() throws UnknownHostException {
            // Arrange
            NetbiosAddress inputAddress = mock(NetbiosAddress.class);
            when(nameServiceClient.getNbtAllByAddress(inputAddress)).thenThrow(new UnknownHostException("Host not found"));
    
            // Act & Assert
            assertThrows(UnknownHostException.class, () -> nameServiceClient.getNbtAllByAddress(inputAddress));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.4K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb1/netbios/NbtAddress.java

         * @throws UnknownHostException if address cannot be resolved
         */
    
        public static NbtAddress[] getAllByAddress(final NbtAddress addr) throws UnknownHostException {
            try {
                final NbtAddress[] addrs = CLIENT.getNodeStatus(addr);
                cacheAddressArray(addrs);
                return addrs;
            } catch (final UnknownHostException uhe) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 31.7K bytes
    - Viewed (0)
  4. src/test/java/jcifs/netbios/NameServiceClientImplTest.java

        void testGetNbtByName() {
            // When/Then - Should throw UnknownHostException quickly due to short timeouts
            UnknownHostException exception = assertThrows(UnknownHostException.class, () -> {
                nameServiceClient.getNbtByName("NONEXISTENT-FAST-FAIL");
            }, "Should throw UnknownHostException for non-existent NetBIOS name");
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 11K bytes
    - Viewed (0)
  5. src/test/java/jcifs/netbios/UniAddressTest.java

                when(mockInetAddress.getHostName()).thenReturn("thisisverylonghostname");
                UniAddress uniAddress = new UniAddress(mockInetAddress);
                assertEquals(NbtAddress.SMBSERVER_NAME, uniAddress.firstCalledName());
            }
    
            @Test
            void shouldReturnUppercaseHostnameWhenInetAddressHostnameHasNoDotAndLengthLessThan15() throws UnknownHostException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 16.4K bytes
    - Viewed (0)
  6. src/main/java/jcifs/NameServiceClient.java

         *
         * @param addr
         *            the address to query
         * @return resolved addresses
         * @throws UnknownHostException
         *             if address cannot be resolved
         */
        NetbiosAddress[] getNbtAllByAddress(NetbiosAddress addr) throws UnknownHostException;
    
        /**
         * Retrieve all addresses of a host by it's address. NetBIOS hosts can
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  7. src/main/java/jcifs/netbios/NameServiceClientImpl.java

                }
            }
            throw new UnknownHostException(addr.getHostName());
        }
    
        @Override
        public NbtAddress getNbtByName(final String host) throws UnknownHostException {
            return getNbtByName(host, 0x00, null);
        }
    
        @Override
        public NbtAddress getNbtByName(final String host, final int type, final String scope) throws UnknownHostException {
            return getNbtByName(host, type, scope, null);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 38.5K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb1/smb1/SmbFileOutputStream.java

         * @throws SmbException if an SMB error occurs
         * @throws MalformedURLException if the URL is not properly formatted
         * @throws UnknownHostException if the host cannot be resolved
         */
    
        public SmbFileOutputStream(final String url) throws SmbException, MalformedURLException, UnknownHostException {
            this(url, false);
        }
    
        /**
         * Creates an {@link java.io.OutputStream} for writing bytes to a file on
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 11K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb1/netbios/NameServiceClient.java

                        ioe.printStackTrace(log);
                    }
                    throw new UnknownHostException(name.name);
                }
    
                if (response.received && response.resultCode == 0) {
                    return response.addrEntry;
                }
            } while (--n > 0 && request.isBroadcast);
    
            throw new UnknownHostException(name.name);
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 17.6K bytes
    - Viewed (0)
  10. src/test/java/jcifs/AddressTest.java

        }
    
        @Test
        @DisplayName("toInetAddress should handle UnknownHostException")
        void testToInetAddressWithException() throws UnknownHostException {
            // Given
            when(mockAddress.toInetAddress()).thenThrow(new UnknownHostException("Host not found"));
    
            // When & Then
            assertThrows(UnknownHostException.class, () -> {
                mockAddress.toInetAddress();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.9K bytes
    - Viewed (0)
Back to top