Package streamer

Examples of streamer.ByteBuffer.unref()


        ByteBuffer negoToken = ((NegoItem)request.negoTokens.tags[0]).negoToken.value;
        ntlmState.challengeMessage = negoToken.toByteArray(); // Store message for MIC calculation in AUTH message

        parseNtlmChallenge(negoToken);

        negoToken.unref();
        buf.unref();
        switchOff();
    }

    public void parseNtlmChallenge(ByteBuffer buf) {
View Full Code Here


        // ServerChallenge
        ByteBuffer challenge = buf.readBytes(8);
        ntlmState.serverChallenge = challenge.toByteArray();
        if (verbose)
            System.out.println("[" + this + "] INFO: Server challenge: " + challenge + ".");
        challenge.unref();

        // Reserved/context
        buf.skipBytes(8);

        // TargetInfo
View Full Code Here

        // Store raw target info block for Type3 message
        ntlmState.serverTargetInfo = targetInfo.toByteArray();

        // Parse target info block
        parseTargetInfo(targetInfo);
        targetInfo.unref();

        // OS Version, NTLM revision, 8 bytes, Optional. Ignore it.

        // Ignore rest of buffer with allocated blocks
View Full Code Here

                // End of list
                break;

            ByteBuffer data = buf.readBytes(length);
            parseAttribute(data, type, length);
            data.unref();
        }
    }

    public void parseAttribute(ByteBuffer buf, int type, int length) {
        switch (type) {
View Full Code Here

        case MSV_AV_TIMESTAMP:
            ByteBuffer tmp = buf.readBytes(length);
            ntlmState.serverTimestamp = tmp.toByteArray();
            //*DEBUG*/System.out.println("Server timestamp: "+tmp.toPlainHexString());
            tmp.unref();
            break;

        default:
            // Ignore
            //throw new RuntimeException("[" + this + "] ERROR: Unknown NTLM target info attribute: " + type + ". Data: " + buf + ".");
View Full Code Here

     * @return
     */
    public static String readStringByDescription(ByteBuffer buf) {
        ByteBuffer block = readBlockByDescription(buf);
        String value = block.readString(block.length, RdpConstants.CHARSET_16);
        block.unref();

        return value;
    }

    public static ByteBuffer readBlockByDescription(ByteBuffer buf) {
View Full Code Here

        ByteBuffer negoToken = ((NegoItem)request.negoTokens.tags[0]).negoToken.value;
        System.out.println("TSRequest negotoken: " + negoToken.toPlainHexString());
        dumpNegoToken(negoToken);

        negoToken.unref();
    }

    private void dumpNegoToken(ByteBuffer buf) {
        String signature = buf.readVariableString(RdpConstants.CHARSET_8);
        if (!signature.equals(NTLMSSP))
View Full Code Here

                System.out.println("AV Target Name: " + data.readString(length, RdpConstants.CHARSET_16));
                break;
            default:
                System.out.println("Unknown NTLM target info attribute: " + type + ". Data: " + data + ".");
            }
            data.unref();
        }

    }
}
View Full Code Here

            case UPDATETYPE_PALETTE:
                pushDataToPad("palette", payload);
                break;
            case UPDATETYPE_SYNCHRONIZE:
                // Ignore
                payload.unref();
                break;
            }

            break;
        }
View Full Code Here

            rectangle.bitmapDataStream = buf.readBytes(bitmapLength);
        } else {
            ByteBuffer compressedImage = buf.readBytes(bitmapLength);
            //* DEBUG */System.out.println("Compressed image: " + compressedImage + ", depth: " + rectangle.bitsPerPixel + ".");
            rectangle.bitmapDataStream = RLEBitmapDecompression.rleDecompress(compressedImage, rectangle.bufferWidth, rectangle.bufferHeight, rectangle.colorDepth);
            compressedImage.unref();
        }

        return rectangle;
    }

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.