Search Options

Results per page
Sort
Preferred Languages
Advance

Results 231 - 240 of 944 for nBytes (0.04 sec)

  1. src/bufio/example_test.go

    		return
    	}
    
    	if err = writer.Flush(); err != nil {
    		fmt.Println("Flush Error:", err)
    		return
    	}
    
    	fmt.Println("Bytes written:", n)
    	fmt.Println("Buffer contents:", buf.String())
    	// Output:
    	// Bytes written: 41
    	// Buffer contents: Hello, world!
    	// This is a ReadFrom example.
    }
    
    // The simplest use of a Scanner, to read standard input as a set of lines.
    func ExampleScanner_lines() {
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Fri Nov 01 21:52:12 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  2. src/test/java/jcifs/util/HexdumpTest.java

            // Then
            assertNotNull(result);
            assertFalse(result.isEmpty());
            // Should contain hex representation of first bytes
            assertTrue(result.startsWith("00010203"));
            assertEquals(64, result.length()); // 32 bytes * 2 chars per byte
        }
    
        @ParameterizedTest
        @ValueSource(ints = { 1, 16, 32, 64, 128, 256 })
        @DisplayName("Should handle various data sizes")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  3. src/main/java/jcifs/internal/smb2/create/LeaseV2CreateContextResponse.java

            int start = bufferIndex;
    
            if (len < 52) {
                throw new SMBProtocolDecodingException("Lease V2 context data too short: " + len);
            }
    
            // Read lease V2 data (52 bytes)
            byte[] keyBytes = new byte[16];
            System.arraycopy(buffer, bufferIndex, keyBytes, 0, 16);
            this.leaseKey = new Smb2LeaseKey(keyBytes);
            bufferIndex += 16;
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 02:21:31 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  4. src/main/java/jcifs/pac/PacUnicodeString.java

        private final int pointer;
    
        /**
         * Constructs a new PacUnicodeString instance.
         *
         * @param length the actual length of the string in bytes
         * @param maxLength the maximum allocated length for the string in bytes
         * @param pointer the pointer/offset to the string data
         */
        public PacUnicodeString(final short length, final short maxLength, final int pointer) {
            this.length = length;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb1/smb1/SmbComNegotiateTest.java

            byte[] dst = new byte[expectedBytes.length];
            int dstIndex = 0;
    
            // Execute the method to write bytes
            int bytesWritten = smbComNegotiate.writeBytesWireFormat(dst, dstIndex);
    
            // Verify the number of bytes written
            assertEquals(expectedBytes.length, bytesWritten, "The number of bytes written should match the length of the dialect string.");
            // Verify the content of the destination array
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4K bytes
    - Viewed (0)
  6. src/test/java/jcifs/netbios/SessionServicePacketTest.java

        void testReadnMultipleCalls() throws IOException {
            when(mockInputStream.read(any(byte[].class), anyInt(), anyInt())).thenReturn(2) // First read returns 2 bytes
                    .thenReturn(2) // Second read returns 2 bytes
                    .thenReturn(1); // Third read returns 1 byte
    
            byte[] buffer = new byte[10];
            int bytesRead = SessionServicePacket.readn(mockInputStream, buffer, 0, 5);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.5K bytes
    - Viewed (0)
  7. samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java

          listeners.put(state, listener);
        }
    
        return slackApi.authorizeUrl(scopes, redirectUrl(), state, team);
      }
    
      private ByteString randomToken() {
        byte[] bytes = new byte[16];
        secureRandom.nextBytes(bytes);
        return ByteString.of(bytes);
      }
    
      private HttpUrl redirectUrl() {
        return mockWebServer.url("/oauth/");
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Aug 12 07:26:27 UTC 2021
    - 3.8K bytes
    - Viewed (0)
  8. src/main/java/jcifs/internal/witness/WitnessUnregisterMessage.java

            // Encode input parameters for WitnessUnregister
    
            // Context handle (20 bytes) - this is both input and output (modified)
            if (contextHandle != null) {
                buf.writeOctetArray(contextHandle, 0, Math.min(contextHandle.length, 20));
                // Pad with zeros if context handle is shorter than 20 bytes
                for (int i = contextHandle.length; i < 20; i++) {
                    buf.enc_ndr_small(0);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 09:06:40 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  9. src/test/java/jcifs/spnego/SpnegoExceptionTest.java

            // When
            byte[] bytes;
            try (ByteArrayOutputStream bout = new ByteArrayOutputStream(); ObjectOutputStream oout = new ObjectOutputStream(bout)) {
                oout.writeObject(original);
                oout.flush();
                bytes = bout.toByteArray();
            }
    
            SpnegoException restored;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  10. docs/debugging/healing-bin/main.go

    					r, err := file.Open()
    					if err != nil {
    						return err
    					}
    
    					b, err := io.ReadAll(r)
    					if err != nil {
    						return err
    					}
    					buf := bytes.NewBuffer(nil)
    					if _, err = msgp.CopyToJSON(buf, bytes.NewReader(b)); err != nil {
    						return err
    					}
    
    					dec := json.NewDecoder(buf)
    					// Use number to preserve integers.
    					dec.UseNumber()
    					var htr map[string]any
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 3.1K bytes
    - Viewed (0)
Back to top