- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for readUShort (0.06 sec)
-
src/test/java/jcifs/ntlmssp/NtlmMessageTest.java
} @Test void testReadUShort() { // Test readUShort with various values byte[] data = new byte[4]; ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); // Test with a positive value buffer.putShort(0, (short) 0x1234); assertEquals(0x1234, NtlmMessage.readUShort(data, 0), "Should read positive UShort correctly."); // Test with zero
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.5K bytes - Viewed (0) -
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) -
src/test/java/jcifs/ntlmssp/Type2MessageTest.java
// For server: Type 0x0001 (NetBIOS Computer Name) // Verify domain part assertEquals(2, Type2Message.readUShort(targetInfo, 0)); // Type 0x0002 assertEquals(TEST_DOMAIN.getBytes(Type2Message.UNI_ENCODING).length, Type2Message.readUShort(targetInfo, 2)); // Length assertEquals(TEST_DOMAIN,
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 38.9K bytes - Viewed (0) -
src/main/java/jcifs/smb1/ntlmssp/NtlmMessage.java
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 4.6K bytes - Viewed (0) -
src/main/java/jcifs/ntlmssp/NtlmMessage.java
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 5.4K bytes - Viewed (0) -
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) -
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) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/WebSocketReader.kt
// Get frame length, optionally reading from follow-up bytes if indicated by special values. frameLength = (b1 and B1_MASK_LENGTH).toLong() if (frameLength == PAYLOAD_SHORT.toLong()) { frameLength = (source.readShort() and 0xffff).toLong() // Value is unsigned. } else if (frameLength == PAYLOAD_LONG.toLong()) { frameLength = source.readLong() if (frameLength < 0L) { throw ProtocolException(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jul 29 22:04:11 UTC 2025 - 9.9K bytes - Viewed (0) -
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) -
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)