Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for readUShort (0.05 sec)

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

        }
    
        @Test
        @DisplayName("readUShort correctly interprets little endian")
        void testReadUShort() {
            byte[] a = new byte[] { (byte) 0xAA, (byte) 0xBB };
            int result = NtlmMessage.readUShort(a, 0);
            assertEquals(0xBBAA, result, "UShort should be little‑endian");
        }
    
        @Test
        @DisplayName("readUShort throws on too short array")
        void testReadUShortOutOfBounds() {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  2. src/main/java/jcifs/ntlmssp/NtlmMessage.java

        }
    
        static int readUShort(final byte[] src, final int index) {
            return src[index] & 0xff | (src[index + 1] & 0xff) << 8;
        }
    
        static byte[] readSecurityBuffer(final byte[] src, final int index) {
            final int length = readUShort(src, index);
            final int offset = readULong(src, index + 4);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb1/ntlmssp/NtlmMessage.java

        }
    
        static int readUShort(final byte[] src, final int index) {
            return src[index] & 0xff | (src[index + 1] & 0xff) << 8;
        }
    
        static byte[] readSecurityBuffer(final byte[] src, final int index) {
            final int length = readUShort(src, index);
            final int offset = readULong(src, index + 4);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  4. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

        }
    
        val questionCount = buf.readShort().toInt() and 0xffff
        val answerCount = buf.readShort().toInt() and 0xffff
        buf.readShort() // authority record count
        buf.readShort() // additional record count
    
        for (i in 0 until questionCount) {
          skipName(buf) // name
          buf.readShort() // type
          buf.readShort() // class
        }
    
        for (i in 0 until answerCount) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  5. src/main/java/jcifs/pac/PacDataInputStream.java

         * @return the short value in little-endian format
         * @throws IOException if an I/O error occurs
         */
        public short readShort() throws IOException {
            align(2);
            return Short.reverseBytes(this.dis.readShort());
        }
    
        /**
         * Reads a 32-bit integer value with proper alignment and byte order.
         * @return the integer value in little-endian format
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/LittleEndianDataInputStream.java

       * Reads a {@code short} as specified by {@link DataInputStream#readShort()}, except using
       * little-endian byte order.
       *
       * @return the next two bytes of the input stream, interpreted as a {@code short} in little-endian
       *     byte order.
       * @throws IOException if an I/O error occurs.
       */
      @CanIgnoreReturnValue // to skip some bytes
      @Override
      public short readShort() throws IOException {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 12 03:49:18 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/SocksProxy.kt

                else -> InetAddress.getByName(domainName)
              }
            }
    
            else -> throw ProtocolException("unsupported address type: $addressType")
          }
    
        val port = fromSource.readShort() and 0xffff
    
        when (command) {
          COMMAND_CONNECT -> {
            val toSocket = Socket(toAddress, port)
            val localAddress = toSocket.localAddress.address
            if (localAddress.size != 4) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/ByteArrayDataInput.java

      @Override
      byte readByte();
    
      @CanIgnoreReturnValue // to skip a byte
      @Override
      int readUnsignedByte();
    
      @CanIgnoreReturnValue // to skip some bytes
      @Override
      short readShort();
    
      @CanIgnoreReturnValue // to skip some bytes
      @Override
      int readUnsignedShort();
    
      @CanIgnoreReturnValue // to skip some bytes
      @Override
      char readChar();
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Dec 27 20:25:25 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  9. src/test/java/jcifs/pac/PacDataInputStreamTest.java

            // Little-endian 0x1234 -> 0x34 0x12
            byte[] data = new byte[] { 0x34, 0x12, 0x00, 0x00 };
            PacDataInputStream pdis = createInputStream(data);
            assertEquals((short) 0x1234, pdis.readShort());
        }
    
        @Test
        public void testReadInt() throws IOException {
            // Little-endian 0x12345678 -> 0x78 0x56 0x34 0x12
            byte[] data = new byte[] { 0x78, 0x56, 0x34, 0x12 };
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 9.2K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        assertEquals(100, in.readByte());
        assertEquals(-100, in.readByte());
        assertEquals(200, in.readUnsignedByte());
        assertEquals('\u6100', in.readChar());
        assertEquals(-12150, in.readShort());
        assertEquals(20675, in.readUnsignedShort());
        assertEquals(0xBEBAFECA, in.readInt());
        assertEquals(0xBEBAFECAEFBEADDEL, in.readLong());
        assertEquals("Herby Derby", in.readUTF());
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 4.9K bytes
    - Viewed (0)
Back to top