Package streamer

Examples of streamer.ByteBuffer.writeBytes()


    private void sendControlPDUActionCooperate() {
        int length = 1024; // Large enough
        ByteBuffer buf = new ByteBuffer(length, true);

        /* @formatter:off */
    buf.writeBytes(new byte[] {
        // MCS Send Data Request
        (byte)0x64,
        // Initiator: 1004 (1001+3)
        (byte)0x00, (byte)0x03,
        // Channel ID: 1003 (I/O channel)
View Full Code Here


        (byte)0xec, (byte)0x03,
    });
    // Share ID, 4 bytes  (LE)
    buf.writeIntLE((int)state.serverShareId);
   
    buf.writeBytes(new byte[] {
        // Padding 1 byte
        (byte)0x00,
        // Stream ID: STREAM_LOW (1)
        (byte)0x01,
        // uncompressedLength : 12 bytes (LE)
View Full Code Here

    private void sendSynchronizePDU() {

        ByteBuffer buf = new ByteBuffer(1024, true);
        /* @formatter:off */
    buf.writeBytes(new byte[] {
        // MCS send data request
        (byte)0x64,
        // Initiator: 1004 (1001+3)
        (byte)0x00, (byte)0x03,
        // Channel ID: 1003 (I/O Channel)
View Full Code Here

        (byte)0xec, (byte)0x03,
    });
    // Share ID, 4 bytes  (LE)
    buf.writeIntLE((int)state.serverShareId);
   
    buf.writeBytes(new byte[] {
        // Padding: 1 byte
        (byte)0x00,
        // Stream ID: STREAM_LOW (1)
        (byte)0x01,
        // uncompressedLength : 8 bytes (LE)
View Full Code Here

        // cbClientAddress: ( LE) (including the size of the mandatory NULL terminator)
        buf.writeShortLE(clientAddress.length + 2);

        // Client address: (UCS2)
        buf.writeBytes(clientAddress);
        buf.writeShort(0);

        // cbClientDir: 64 bytes (0x40, LE) (including the size of the mandatory NULL terminator)
        buf.writeShortLE(clientDir.length + 2);
View Full Code Here

        // cbClientDir: 64 bytes (0x40, LE) (including the size of the mandatory NULL terminator)
        buf.writeShortLE(clientDir.length + 2);

        // Client directory: (UCS2)
        buf.writeBytes(clientDir);
        buf.writeShort(0);

        //
        // Client time zone:
        //
View Full Code Here

        // Standard name: "EET, Standard Time" (fixed string: 64 bytes, UCS2)
        buf.writeFixedString(62, standardTimeZoneName, RdpConstants.CHARSET_16);
        buf.writeShort(0);

        // Standard date
        buf.writeBytes(new byte[] {
                // wYear: 0 (LE)
                (byte)0x00, (byte)0x00,
                // wMonth: unknown (LE)
                (byte)0x00, (byte)0x00,
                // wDayOfWeek: Sunday (LE)
View Full Code Here

        // Daylight name: "EET, Summer Time" (fixed string: 64 bytes, UCS2)
        buf.writeFixedString(62, daylightTimeZoneName, RdpConstants.CHARSET_16);
        buf.writeShort(0);

        // Daylight date
        buf.writeBytes(new byte[] {
                // wYear: 0 (LE)
                (byte)0x00, (byte)0x00,
                // wMonth: unknown (LE)
                (byte)0x00, (byte)0x00,
                // wDayOfWeek: Sunday (LE)
View Full Code Here

        // NegotiateFlags (4 bytes): In connection-oriented mode, a NEGOTIATE
        // structure that contains the set of bit flags (section 2.2.2.5) negotiated
        // in the previous messages.
        buf.writeIntLE(/*ntlmState.negotiatedFlags.value*/0xe288b235); // FIXME: remove hardcoded value

        buf.writeBytes(generateVersion());

        // If the CHALLENGE_MESSAGE TargetInfo field (section 2.2.1.2) has an
        // MsvAvTimestamp present, the client SHOULD provide a MIC(Message Integrity
        // Check)

View Full Code Here

        // MsvAvTimestamp present, the client SHOULD provide a MIC(Message Integrity
        // Check)

        int savedCursorForMIC = buf.cursor; // Save cursor position to write MIC
                                            // later
        buf.writeBytes(new byte[16]); // Write 16 zeroes

        if (BLOCKS_OFFSET != buf.cursor)
            throw new RuntimeException("BUG: Actual offset of first byte of allocated blocks is not equal hardcoded offset. Hardcoded offset: " + BLOCKS_OFFSET
                    + ", actual offset: " + buf.cursor + ". Update hardcoded offset to match actual offset.");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.