Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 334 for getByte (0.88 sec)

  1. src/test/java/jcifs/ntlmssp/NtlmMessageTest.java

        }
    
        @Test
        void testReadSecurityBuffer() {
            // Test readSecurityBuffer
            byte[] data = new byte[20];
            byte[] content = "Hello".getBytes();
    
            // Simulate a security buffer structure: length (2 bytes), length (2 bytes), offset (4 bytes)
            // Length = 5, Offset = 8
            ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb1/ServerMessageBlockTest.java

                byte[] buffer = "Test\0Other".getBytes();
    
                assertEquals(4, testBlock.readStringLength(buffer, 0, 10));
            }
    
            @Test
            @DisplayName("Test read string length without termination throws exception")
            void testReadStringLengthNoTermination() {
                byte[] buffer = "TestTest".getBytes();
    
                assertThrows(RuntimeCIFSException.class, () -> {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 36.2K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/dfs/DfsReferralResponseBufferTest.java

                bb.putShort((short) 24); // altPathOffset
                bb.putShort((short) 28); // nodeOffset
    
                // Add path string at offset 20 (8 + 20 = 28)
                bb.position(28);
                bb.put("\\test\0".getBytes(StandardCharsets.UTF_16LE));
    
                int bytesDecoded = buffer.decode(testBuffer, 0, testBuffer.length);
    
                assertEquals(42, bytesDecoded); // 8 header + 34 referral
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.4K bytes
    - Viewed (0)
  4. src/main/java/jcifs/smb1/ntlmssp/Type1Message.java

                if (suppliedDomain != null && suppliedDomain.length() != 0) {
                    hostInfo = true;
                    flags |= NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED;
                    domain = suppliedDomain.toUpperCase().getBytes(getOEMEncoding());
                } else {
                    flags &= NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED ^ 0xffffffff;
                }
                byte[] workstation = {};
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb1/net/TestSmbComTransactionResponseReader.java

        }
    
        @Test
        public void testAsciiEncoding() throws Exception {
            String msg = "\u00A1\u00A2"; // same Unicode string
            byte[] asciiBytes = msg.getBytes(SmbConstants.DEFAULT_OEM_ENCODING);
            assertTrue(asciiBytes.length > 0, "ASCII encoding should produce bytes");
        }
    
        @Test
        public void testBufferCreation() throws UnsupportedEncodingException {
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  6. fess-crawler/src/test/java/org/codelibs/fess/crawler/client/smb/SmbClientTest.java

                assertEquals("spaces", new String(InputStreamUtil.getBytes(responseData.getResponseBody())));
            }
    
            try (ResponseData responseData = client.doGet(shareUrl + "file-with-dashes.txt")) {
                assertEquals(200, responseData.getHttpStatusCode());
                assertEquals("dashes", new String(InputStreamUtil.getBytes(responseData.getResponseBody())));
            }
    
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Tue Sep 23 06:42:59 UTC 2025
    - 31.9K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbFileInputStreamTest.java

            when(mockTree.getConfig()).thenReturn(mockConfig);
            when(mockTree.isConnected()).thenReturn(true);
            when(mockTree.getTreeId()).thenReturn(1L);
    
            when(mockFile.getType()).thenReturn(SmbConstants.TYPE_FILESYSTEM);
        }
    
        @Nested
        @DisplayName("Happy path")
        class HappyPath {
    
            @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  8. fess-crawler/src/test/java/org/codelibs/fess/crawler/client/gcs/GcsClientTest.java

                    .setMetadata(Map.of("label", "label1"))//
                    .build(), "file1".getBytes());
    
            storage.create(BlobInfo.newBuilder(BlobId.of(bucketName, "dir1/file2.txt"))//
                    .setContentType("application/octet-stream")//
                    .setMetadata(Map.of("label", "label2"))//
                    .build(), "file2".getBytes());
    
            storage.create(BlobInfo.newBuilder(BlobId.of(bucketName, "dir1/dir2/file3.txt"))//
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Thu Dec 11 08:38:29 UTC 2025
    - 19.6K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb1/ntlmssp/Type3Message.java

                    domain = unicode ? domainName.getBytes(UNI_ENCODING) : domainName.getBytes(oem);
                }
                final int domainLength = domain != null ? domain.length : 0;
                final String userName = getUser();
                byte[] user = null;
                if (userName != null && userName.length() != 0) {
                    user = unicode ? userName.getBytes(UNI_ENCODING) : userName.toUpperCase().getBytes(oem);
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 24.1K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/core/io/InputStreamUtilTest.java

            final InputStream is = ResourceUtil.getResourceAsStream(StringUtil.replace(getClass().getName(), ".", "/") + ".class");
            try {
                assertNotNull("1", InputStreamUtil.getBytes(is));
            } finally {
                is.close();
            }
        }
    Registered: Sat Dec 20 08:55:33 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 1.2K bytes
    - Viewed (0)
Back to top