Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 13 for getNameType (0.07 seconds)

  1. src/test/java/jcifs/NetbiosNameTest.java

        @Test
        @DisplayName("Should handle getNameType() method")
        void testGetNameType() {
            // Given
            int testType = 0x20; // Server service
            when(mockNetbiosName.getNameType()).thenReturn(testType);
    
            // When
            int nameType = mockNetbiosName.getNameType();
    
            // Then
            assertEquals(testType, nameType);
            verify(mockNetbiosName).getNameType();
        }
    
        @ParameterizedTest
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 8K bytes
    - Click Count (0)
  2. src/main/java/jcifs/NetbiosName.java

         *
         * @return the scope id
         */
        String getScope();
    
        /**
         * Returns the NetBIOS name type.
         *
         * @return the name type
         */
        int getNameType();
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 1.2K bytes
    - Click Count (0)
  3. src/test/java/jcifs/netbios/NbtAddressTest.java

        }
    
        @Test
        void testGetNameType() {
            // Test getNameType
            mockName = new Name(mockConfig, "TEST", 0x20, null);
            NbtAddress nbtAddress = new NbtAddress(mockName, testAddressInt, false, NbtAddress.H_NODE);
            assertEquals(0x20, nbtAddress.getNameType());
        }
    
        @Test
        void testHashCode() {
            // Test hashCode consistency
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 20.4K bytes
    - Click Count (0)
  4. src/main/java/jcifs/netbios/Name.java

         * @return scope id
         */
        @Override
        public String getScope() {
            return this.scope;
        }
    
        /**
         *
         * @return the name type
         */
        @Override
        public int getNameType() {
            return this.hexCode;
        }
    
        /**
         * Constructs a NetBIOS name with the specified parameters.
         *
         * @param cfg the configuration to use
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 8K bytes
    - Click Count (0)
  5. src/test/java/jcifs/netbios/SessionRequestPacketTest.java

        void testConstructorWithNetbiosNames() {
            when(mockCalledName.getName()).thenReturn("SERVER");
            when(mockCalledName.getNameType()).thenReturn(0x20);
            when(mockCalledName.getScope()).thenReturn(null);
    
            when(mockCallingName.getName()).thenReturn("CLIENT");
            when(mockCallingName.getNameType()).thenReturn(0x00);
            when(mockCallingName.getScope()).thenReturn(null);
    
    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)
  6. src/main/java/jcifs/netbios/NbtAddress.java

                NetbiosAddress[] addrs;
    
                try {
                    addrs = tc.getNameServiceClient().getNodeStatus(this);
                    if (this.getNameType() == 0x1D) {
                        for (final NetbiosAddress addr : addrs) {
                            if (addr.getNameType() == 0x20) {
                                return addr.getHostName();
                            }
                        }
                        return null;
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 15.1K bytes
    - Click Count (0)
  7. src/main/java/jcifs/NetbiosAddress.java

        /**
         * Returned the hex code associated with this name(e.g. 0x20 is for the file service)
         *
         * @return the name type
         */
        int getNameType();
    
        /**
         * Gets the NetBIOS name associated with this address.
         *
         * @return the name for this address
         */
        NetbiosName getName();
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 6.1K bytes
    - Click Count (0)
  8. src/test/java/jcifs/smb/SmbResourceLocatorImplTest.java

            Address addr = mock(Address.class);
            NetbiosAddress nb = mock(NetbiosAddress.class);
            when(addr.unwrap(NetbiosAddress.class)).thenReturn(nb);
            when(nb.getNameType()).thenReturn(0x1d); // workgroup code
            // getFirstAddress branch: host given and path non-root -> possibleNTDomain=false
            when(nsc.getAllByName(eq("server"), eq(false))).thenReturn(new Address[] { addr });
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 17.6K bytes
    - Click Count (0)
  9. src/main/java/jcifs/smb1/netbios/NbtAddress.java

        }
    
        /**
         * Returned the hex code associated with this name(e.g. 0x20 is for the file service)
         *
         * @return the NetBIOS name type code
         */
    
        public int getNameType() {
            return hostName.hexCode;
        }
    
        /**
         * Returns a hashcode for this IP address. The hashcode comes from the IP address
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 31.7K bytes
    - Click Count (0)
  10. src/main/java/jcifs/smb1/smb1/SmbFile.java

                        throw new SmbException(url.toString(), uhe);
                    }
                    if (addr.getAddress() instanceof NbtAddress) {
                        final int code = ((NbtAddress) addr.getAddress()).getNameType();
                        if (code == 0x1d || code == 0x1b) {
                            type = TYPE_WORKGROUP;
                            return type;
                        }
                    }
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 112.2K bytes
    - Click Count (0)
Back to Top