Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for writeShort (0.09 sec)

  1. src/test/java/jcifs/smb1/smb1/InfoTest.java

        private static void writeLong(byte[] buf, int offset, long val) {
            for (int i = 0; i < 8; i++) {
                buf[offset + i] = (byte) ((val >>> (8 * i)) & 0xFF);
            }
        }
    
        private static void writeShort(byte[] buf, int offset, int val) {
            buf[offset] = (byte) (val & 0xFF);
            buf[offset + 1] = (byte) ((val >>> 8) & 0xFF);
        }
    
        @Test
        void testTrans2QueryPathBasicInfoParsing() throws Exception {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/WebSocketWriter.kt

      ) {
        var payload = ByteString.EMPTY
        if (code != 0 || reason != null) {
          if (code != 0) {
            validateCloseCode(code)
          }
          payload =
            Buffer().run {
              writeShort(code)
              if (reason != null) {
                write(reason)
              }
              readByteString()
            }
        }
    
        try {
          writeControlFrame(OPCODE_CONTROL_CLOSE, payload)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 6K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb1/smb1/SmbRandomAccessFile.java

        }
    
        @Override
        public final void writeByte(final int v) throws SmbException {
            tmp[0] = (byte) v;
            write(tmp, 0, 1);
        }
    
        @Override
        public final void writeShort(final int v) throws SmbException {
            Encdec.enc_uint16be((short) v, tmp, 0);
            write(tmp, 0, 2);
        }
    
        @Override
        public final void writeChar(final int v) throws SmbException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 14.1K bytes
    - Viewed (0)
  4. src/test/java/jcifs/smb/SmbRandomAccessFileTest.java

            doNothing().when(raf).write(any(byte[].class), anyInt(), anyInt());
            doNothing().when(raf).writeShort(anyInt());
    
            raf.writeUTF("é"); // 2-byte UTF-8 char
    
            // size prefix should be 2, and then write called with len=2
            verify(raf).writeShort(eq(2));
            verify(raf).write(any(byte[].class), eq(0), eq(2));
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb/SmbRandomAccessFile.java

        }
    
        @Override
        public final void writeByte(final int v) throws SmbException {
            this.tmp[0] = (byte) v;
            write(this.tmp, 0, 1);
        }
    
        @Override
        public final void writeShort(final int v) throws SmbException {
            Encdec.enc_uint16be((short) v, this.tmp, 0);
            write(this.tmp, 0, 2);
        }
    
        @Override
        public final void writeChar(final int v) throws SmbException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  6. src/test/java/jcifs/pac/PacLogonInfoTest.java

            domainSid = new SID("S-1-5-21-1-2-3");
            userSid = new SID("S-1-5-21-1-2-3-1000");
        }
    
        private void writeLittleEndianShort(DataOutputStream dos, short value) throws IOException {
            dos.writeShort(Short.reverseBytes(value));
        }
    
        private void writeLittleEndianInt(DataOutputStream dos, int value) throws IOException {
            dos.writeInt(Integer.reverseBytes(value));
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  7. guava/src/com/google/common/io/ByteStreams.java

          try {
            output.writeLong(v);
          } catch (IOException impossible) {
            throw new AssertionError(impossible);
          }
        }
    
        @Override
        public void writeShort(int v) {
          try {
            output.writeShort(v);
          } catch (IOException impossible) {
            throw new AssertionError(impossible);
          }
        }
    
        @Override
        public void writeUTF(String s) {
          try {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 31.1K bytes
    - Viewed (0)
  8. src/main/java/jcifs/ntlmssp/NtlmMessage.java

            final int length = src != null ? src.length : 0;
            if (length == 0) {
                return offset + 4;
            }
            writeUShort(dest, offset, length);
            writeUShort(dest, offset + 2, length);
            return offset + 4;
        }
    
        static int writeSecurityBufferContent(final byte[] dest, final int pos, final int off, final byte[] src) {
            writeULong(dest, off, pos);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb1/ntlmssp/Type2Message.java

            if (domainLength > 0) {
                writeUShort(targetInfo, offset, 2);
                offset += 2;
                writeUShort(targetInfo, offset, domainLength);
                offset += 2;
                System.arraycopy(domain, 0, targetInfo, offset, domainLength);
                offset += domainLength;
            }
            if (serverLength > 0) {
                writeUShort(targetInfo, offset, 1);
                offset += 2;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 13K bytes
    - Viewed (0)
  10. src/test/java/jcifs/ntlmssp/NtlmMessageTest.java

        }
    
        @Test
        void testWriteUShort() {
            // Test writeUShort
            byte[] data = new byte[2];
            ByteBuffer expectedBuffer = ByteBuffer.allocate(2).order(ByteOrder.LITTLE_ENDIAN);
    
            // Test with a positive value
            int value = 0x1234;
            NtlmMessage.writeUShort(data, 0, value);
            expectedBuffer.putShort(0, (short) value);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.5K bytes
    - Viewed (0)
Back to top