Package streamer

Examples of streamer.ByteBuffer.unref()


                // 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

            if (actualLength < 0) {
                if (verbose)
                    System.out.println("[" + this + "] INFO: End of stream.");

                buf.unref();
                closeStream();
                sendEventToAllPads(Event.STREAM_CLOSE, Direction.OUT);
                return;
            }
View Full Code Here

            if (actualLength == 0) {
                if (verbose)
                    System.out.println("[" + this + "] INFO: Empty buffer is read from stream.");

                buf.unref();
                return;
            }

            buf.length = actualLength;
View Full Code Here

            ByteBuffer value = buf.readBytes((int)length);

            readTagValue(value);

            value.unref();
        } else {

            readTagValue(buf, typeAndFlags);
        }
    }
View Full Code Here

                    + ".");

        ByteBuffer value = buf.readBytes((int)length);
        parseContent(value);

        value.unref();
    }

    protected void parseContent(ByteBuffer buf) {
        for (int i = 0; buf.remainderLength() > 0 && i < tags.length; i++) {
            BerType typeAndFlags = readBerType(buf);
View Full Code Here

        TSRequest tsRequest = new TSRequest("TSRequest");
        tsRequest.version.value = 2L;

        ByteBuffer tsCredentialsBuf = generateTSCredentials();
        tsRequest.authInfo.value = encryptTSCredentials(tsCredentialsBuf);
        tsCredentialsBuf.unref();

        tsRequest.writeTag(buf);

        // Trim buffer to actual length of data written
        buf.trimAtCursor();
View Full Code Here

        //* DEBUG */System.out.println("TSPasswordCreds:\n" + tsPasswordCredsBuf.dump());

        tsCredentials.credentials.value = tsPasswordCredsBuf;

        tsCredentials.writeTag(buf);
        tsPasswordCredsBuf.unref();

        // Trim buffer to actual length of data written
        buf.trimAtCursor();
        //* DEBUG */System.out.println("TSCredentials:\n" + buf.dump());

View Full Code Here

            default:
                // Ignore
                break;
            }

            capabilityData.unref();
        }

        // TODO

        buf.unref();
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.