Package streamer

Examples of streamer.ByteBuffer


    /**
     * Send all client requests in one hop, to simplify logic.
     */
    protected void sendHandshakePackets() {
        // Send reactivation sequence in bulk
        pushDataToPad("confirm_active", new ByteBuffer((Order)null));
    }
View Full Code Here


    @Override
    protected void onStart() {
        super.onStart();

        int length = 1024; // Large enough
        ByteBuffer buf = new ByteBuffer(length, true);

        /* @formatter:off */
        buf.writeBytes(new byte[] {
                (byte)0x7f, (byte)0x65, (byte)0x82, (byte)0x01, (byte)0x6d, (byte)0x04, (byte)0x01, (byte)0x01, (byte)0x04, (byte)0x01, (byte)0x01, (byte)0x01, (byte)0x01, (byte)0xff, (byte)0x30, (byte)0x1a,
                (byte)0x02, (byte)0x01, (byte)0x22, (byte)0x02, (byte)0x01, (byte)0x02, (byte)0x02, (byte)0x01, (byte)0x00, (byte)0x02, (byte)0x01, (byte)0x01, (byte)0x02, (byte)0x01, (byte)0x00, (byte)0x02,
                (byte)0x01, (byte)0x01, (byte)0x02, (byte)0x03, (byte)0x00, (byte)0xff, (byte)0xff, (byte)0x02, (byte)0x01, (byte)0x02, (byte)0x30, (byte)0x19, (byte)0x02, (byte)0x01, (byte)0x01, (byte)0x02,
                (byte)0x01, (byte)0x01, (byte)0x02, (byte)0x01, (byte)0x01, (byte)0x02, (byte)0x01, (byte)0x01, (byte)0x02, (byte)0x01, (byte)0x00, (byte)0x02, (byte)0x01, (byte)0x01, (byte)0x02, (byte)0x02,
                (byte)0x04, (byte)0x20, (byte)0x02, (byte)0x01, (byte)0x02, (byte)0x30, (byte)0x20, (byte)0x02, (byte)0x03, (byte)0x00, (byte)0xff, (byte)0xff, (byte)0x02, (byte)0x03, (byte)0x00, (byte)0xfc,
                (byte)0x17, (byte)0x02, (byte)0x03, (byte)0x00, (byte)0xff, (byte)0xff, (byte)0x02, (byte)0x01, (byte)0x01, (byte)0x02, (byte)0x01, (byte)0x00, (byte)0x02, (byte)0x01, (byte)0x01, (byte)0x02,
                (byte)0x03, (byte)0x00, (byte)0xff, (byte)0xff, (byte)0x02, (byte)0x01, (byte)0x02, (byte)0x04, (byte)0x82, (byte)0x01, (byte)0x07, (byte)0x00, (byte)0x05, (byte)0x00, (byte)0x14, (byte)0x7c,
                (byte)0x00, (byte)0x01, (byte)0x80, (byte)0xfe, (byte)0x00, (byte)0x08, (byte)0x00, (byte)0x10, (byte)0x00, (byte)0x01, (byte)0xc0, (byte)0x00, (byte)0x44, (byte)0x75, (byte)0x63, (byte)0x61,
                (byte)0x80, (byte)0xf0, (byte)0x01, (byte)0xc0, (byte)0xd8, (byte)0x00, (byte)0x04, (byte)0x00, (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x04, (byte)0x00, (byte)0x03, (byte)0x01, (byte)0xca,
                (byte)0x03, (byte)0xaa, (byte)0x09, (byte)0x04, (byte)0x00, (byte)0x00, (byte)0x28, (byte)0x0a, (byte)0x00, (byte)0x00, (byte)0x61, (byte)0x00, (byte)0x70, (byte)0x00, (byte)0x6f, (byte)0x00,
                (byte)0x6c, (byte)0x00, (byte)0x6c, (byte)0x00, (byte)0x6f, (byte)0x00, (byte)0x2e, (byte)0x00, (byte)0x76, (byte)0x00, (byte)0x6c, (byte)0x00, (byte)0x69, (byte)0x00, (byte)0x73, (byte)0x00,
                (byte)0x69, (byte)0x00, (byte)0x76, (byte)0x00, (byte)0x6b, (byte)0x00, (byte)0x61, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x04, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                (byte)0x00, (byte)0x00, (byte)0x0c, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x01, (byte)0xca, (byte)0x01, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x10, (byte)0x00,
                (byte)0x07, (byte)0x00, (byte)0x21, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x00, (byte)0x02, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x04, (byte)0xc0, (byte)0x0c, (byte)0x00, (byte)0x0d, (byte)0x00,
                (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x02, (byte)0xc0, (byte)0x0c, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                (byte)0x00, (byte)0x00,
        });
//
//    buf.writeBytes(new byte[] {
////        - T125: MCSConnect Initial
////        - MCSConnectInitial: Identifier=Generic Conference Control (0.0.20.124.0.1), ConnectPDULength=254
////         - ConnectInitialHeader:
//      (byte)0x7F, (byte)0x65,
////          - AsnId: Application Constructed Tag (101)
////           - HighTag:
////              Class:     (01......) Application (1)
////              Type:      (..1.....) Constructed
////              TagNumber: (...11111)
////              TagValueEnd: 101 (0x65)
//      (byte)0x82, (byte)0x01, (byte)0x6C,
////          - AsnLen: Length = 364, LengthOfLength = 2
////             LengthType: LengthOfLength = 2
////             Length: 364 bytes
//      (byte)0x04, (byte)0x01, (byte)0x01,
////         - CallingDomainSelector: 0x1
////          - AsnOctetStringHeader:
////           - AsnId: OctetString type (Universal 4)
////            - LowTag:
////               Class:    (00......) Universal (0)
////               Type:     (..0.....) Primitive
////               TagValue: (...00100) 4
////           - AsnLen: Length = 1, LengthOfLength = 0
////              Length: 1 bytes, LengthOfLength = 0
////            OctetStream: 0x1
//      (byte)0x04, (byte)0x01, (byte)0x01,
////         - CalledDomainSelector: 0x1
////          - AsnOctetStringHeader:
////           - AsnId: OctetString type (Universal 4)
////            - LowTag:
////               Class:    (00......) Universal (0)
////               Type:     (..0.....) Primitive
////               TagValue: (...00100) 4
////           - AsnLen: Length = 1, LengthOfLength = 0
////              Length: 1 bytes, LengthOfLength = 0
////            OctetStream: 0x1
//      (byte)0x01, (byte)0x01, (byte)0xFF,
////         - UpwardFlag: True
////          - AsnBooleanHeader:
////           - AsnId: Boolean type (Universal 1)
////            - LowTag:
////               Class:    (00......) Universal (0)
////               Type:     (..0.....) Primitive
////               TagValue: (...00001) 1
////           - AsnLen: Length = 1, LengthOfLength = 0
////              Length: 1 bytes, LengthOfLength = 0
////            Tf: 255 (0xFF)
//
////
////         - TargetParameters: Length = 26, LengthOfLength = 0
//      (byte)0x30, (byte)0x1A,
////          - DomainParametersHeader: 0x1
////           - AsnId: Sequence and SequenceOf types (Universal 16)
////            - LowTag:
////               Class:    (00......) Universal (0)
////               Type:     (..1.....) Constructed
////               TagValue: (...10000) 16
////           - AsnLen: Length = 26, LengthOfLength = 0
////              Length: 26 bytes, LengthOfLength = 0
//      (byte)0x02, (byte)0x01, (byte)0x22,
////          - ChannelIds: 34
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 34 (0x22)
//      (byte)0x02, (byte)0x01, (byte)0x02,
////          - UserIDs: 2
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 2 (0x2)
//      (byte)0x02, (byte)0x01, (byte)0x00,
////          - TokenIds: 0
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 0 (0x0)
//      (byte)0x02, (byte)0x01, (byte)0x01,
////          - NumPriorities: 1
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 1 (0x1)
//      (byte)0x02, (byte)0x01, (byte)0x00,
////          - MinThroughput: 0
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 0 (0x0)
//      (byte)0x02, (byte)0x01, (byte)0x01,
////          - Height: 1
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 1 (0x1)
//      (byte)0x02, (byte)0x03, (byte)0x00, (byte)0xFF, (byte)0xFF,
////          - MCSPDUsize: 65535
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 3, LengthOfLength = 0
////               Length: 3 bytes, LengthOfLength = 0
////             AsnInt: 65535 (0xFFFF)
//      (byte)0x02, (byte)0x01, (byte)0x02,
////          - protocolVersion: 2
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 2 (0x2)
//
////
////         - MinimumParameters: Length = 25, LengthOfLength = 0
//      (byte)0x30, (byte)0x19,
////          - DomainParametersHeader: 0x1
////           - AsnId: Sequence and SequenceOf types (Universal 16)
////            - LowTag:
////               Class:    (00......) Universal (0)
////               Type:     (..1.....) Constructed
////               TagValue: (...10000) 16
////           - AsnLen: Length = 25, LengthOfLength = 0
////              Length: 25 bytes, LengthOfLength = 0
//      (byte)0x02, (byte)0x01, (byte)0x01,
////          - ChannelIds: 1
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 1 (0x1)
//      (byte)0x02, (byte)0x01, (byte)0x01,
////          - UserIDs: 1
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 1 (0x1)
//      (byte)0x02, (byte)0x01, (byte)0x01,
////          - TokenIds: 1
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 1 (0x1)
//      (byte)0x02, (byte)0x01, (byte)0x01,
////          - NumPriorities: 1
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 1 (0x1)
//      (byte)0x02, (byte)0x01, (byte)0x00,
////          - MinThroughput: 0
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 0 (0x0)
//      (byte)0x02, (byte)0x01, (byte)0x01,
////          - Height: 1
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 1 (0x1)
//      (byte)0x02, (byte)0x02, (byte)0x04, (byte)0x20,
////          - MCSPDUsize: 1056
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 2, LengthOfLength = 0
////               Length: 2 bytes, LengthOfLength = 0
////             AsnInt: 1056 (0x420)
//      (byte)0x02, (byte)0x01, (byte)0x02,
////          - protocolVersion: 2
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 2 (0x2)
////         - MaximumParameters: Length = 31, LengthOfLength = 0
////          - DomainParametersHeader: 0x1
//      (byte)0x30, (byte)0x1F,
////           - AsnId: Sequence and SequenceOf types (Universal 16)
////            - LowTag:
////               Class:    (00......) Universal (0)
////               Type:     (..1.....) Constructed
////               TagValue: (...10000) 16
////           - AsnLen: Length = 31, LengthOfLength = 0
////              Length: 31 bytes, LengthOfLength = 0
//      (byte)0x02, (byte)0x03, (byte)0x00, (byte)0xFF, (byte)0xFF,
////          - ChannelIds: 65535
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 3, LengthOfLength = 0
////               Length: 3 bytes, LengthOfLength = 0
////             AsnInt: 65535 (0xFFFF)
//      (byte)0x02, (byte)0x02, (byte)0xFC, (byte)0x17,
////          - UserIDs: 64535
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 2, LengthOfLength = 0
////               Length: 2 bytes, LengthOfLength = 0
////             AsnInt: 64535 (0xFC17)
//      (byte)0x02, (byte)0x03, (byte)0x00, (byte)0xFF, (byte)0xFF,
////          - TokenIds: 65535
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 3, LengthOfLength = 0
////               Length: 3 bytes, LengthOfLength = 0
////             AsnInt: 65535 (0xFFFF)
//      (byte)0x02, (byte)0x01, (byte)0x01,
////          - NumPriorities: 1
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 1 (0x1)
//      (byte)0x02, (byte)0x01, (byte)0x00,
////          - MinThroughput: 0
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 0 (0x0)
//      (byte)0x02, (byte)0x01, (byte)0x01,
////          - Height: 1
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 1 (0x1)
//      (byte)0x02, (byte)0x03, (byte)0x00, (byte)0xFF, (byte)0xFF,
////          - MCSPDUsize: 65535
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 3, LengthOfLength = 0
////               Length: 3 bytes, LengthOfLength = 0
////             AsnInt: 65535 (0xFFFF)
//      (byte)0x02, (byte)0x01, (byte)0x02,
////          - protocolVersion: 2
////           - AsnIntegerHeader:
////            - AsnId: Integer type (Universal 2)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00010) 2
////            - AsnLen: Length = 1, LengthOfLength = 0
////               Length: 1 bytes, LengthOfLength = 0
////             AsnInt: 2 (0x2)
////         - UserData: Identifier=Generic Conference Control (0.0.20.124.0.1), ConnectPDULength=254
////          - UserDataHeader:
//      (byte)0x04, (byte)0x82, (byte)0x01, (byte)0x07,
////           - AsnId: OctetString type (Universal 4)
////            - LowTag:
////               Class:    (00......) Universal (0)
////               Type:     (..0.....) Primitive
////               TagValue: (...00100) 4
////           - AsnLen: Length = 263, LengthOfLength = 2
////              LengthType: LengthOfLength = 2
////              Length: 263 bytes
//      (byte)0x00, (byte)0x05, (byte)0x00, (byte)0x14, (byte)0x7C, (byte)0x00, (byte)0x01,
////          - AsnBerObjectIdentifier: Generic Conference Contro (0.0.20.124.0.1)
////           - AsnObjectIdentifierHeader:
////            - AsnId: Reserved for use by the encoding rules (Universal 0)
////             - LowTag:
////                Class:    (00......) Universal (0)
////                Type:     (..0.....) Primitive
////                TagValue: (...00000) 0
////            - AsnLen: Length = 5, LengthOfLength = 0
////               Length: 5 bytes, LengthOfLength = 0
////             First: 0 (0x0)
////             Final: 20 (0x14)
////             Final: 124 (0x7C)
////             Final: 0 (0x0)
////             Final: 1 (0x1)
//      (byte)0x80, (byte)0xFE,
////          - ConnectPDULength: 254
////             Align: No Padding
////             Length: 254
//      (byte)0x00, (byte)0x08, (byte)0x00, (byte)0x10,
////          - ConnectGCCPDU: conferenceCreateRequest
////             ExtensionBit: 0 (0x0)
////           - ChoiceValue: conferenceCreateRequest
////              Value: (000.....) 0x0
////           - conferenceCreateRequest:
////              ExtensionBit: 0 (0x0)
////              convenerPasswordPresent: 0 (0x0)
////              passwordPresent: 0 (0x0)
////              conductorPrivilegesPresent: 0 (0x0)
////              conductedPrivilegesPresent: 0 (0x0)
////              nonConductedPrivilegesPresent: 0 (0x0)
////              conferenceDescriptionPresent: 0 (0x0)
////              callerIdentifierPresent: 0 (0x0)
////              userDataPresent: 1 (0x1)
////            - conferenceName:
////               ExtensionBit: 0 (0x0)
////               textPresent: 0 (0x0)
////             - numeric: 1
////              - SimpleNumericString: 1
////               - NumericString: 1
////                - Align: No Padding
////                   Padding1: (0.......) 0x0
////                - Length: 1
////                   Value: (00000000) 0x0
////                - Restrictedstr: 1
////                   FourBits: (0001....) 0x1
////            - lockedConference: False
////               Value: False 0.......
////            - listedConference: False
////               Value: False 0.......
////            - conductibleConference: False
////               Value: False 0.......
////            - TerminationMethod: automatic
////               ExtensionBit: 0 (0x0)
////             - RootIndex: 0
////                Value: (0.......) 0x0
////            - userData:
//      (byte)0x00, (byte)0x01,
////             - Size: 1
////              - Align: No Padding
////                 Padding7: (0000000.) 0x0
////                Length: 1
////             - UserData: 0x44756361
//      (byte)0xC0, (byte)0x00, (byte)0x44, (byte)0x75, (byte)0x63, (byte)0x61,
////                valuePresent: 1 (0x1)
////              - key: h221NonStandard "Duca"
////               - ChoiceValue: h221NonStandard
////                  Value: (1.......) 0x1
////               - h221NonStandard:
////                - H221NonStandardIdentifier: length: 4
////                 - ConstrainedLength: 4
////                    Value: (00000000) 0x0
////                 - Align: No Padding
////                    Padding6: (000000..) 0x0
////                   Value: Binary Large Object (4 Bytes) "Duca"
////              - ClientMcsConnectInitialPdu:
//      (byte)0x80, (byte)0xF0,
////               - RDPGCCUserDataRequestLength: 240
////                  Align: No Padding
////                  Length: 240
////               - TsUd: CS_CORE
//      (byte)0x01, (byte)0xC0, (byte)0xD8, (byte)0x00,
////                - TsUdHeader: Type = CS_CORE, Length = 216
////                   Type: CS_CORE
////                   Length: 216 (0xD8)
////                - TsUdCsCore:
//      (byte)0x04, (byte)0x00, (byte)0x08, (byte)0x00,
////                   Version: RDP 5.0, 5.1, 5.2, 6.0, 6.1, and 7.0
//      (byte)0x00, (byte)0x04,
////                   DesktopWidth: 1024 (0x400)
//      (byte)0x00, (byte)0x03,
////                   DesktopHeight: 768 (0x300)
//      (byte)0x01, (byte)0xCA,
////                   ColorDepth: 8 bpp
//      (byte)0x03, (byte)0xAA,
////                   SASSequence: 0xaa03, SHOULD be set to RNS_UD_SAS_DEL(0xAA03)
//      (byte)0x09, (byte)0x04, (byte)0x00, (byte)0x00,
////                   KeyboardLayout: Language: English, Location: United States
//      (byte)0x28, (byte)0x0A, (byte)0x00, (byte)0x00,
////                   ClientBuild: 2600 (0xA28)
//      (byte)0x61, (byte)0x00, (byte)0x70, (byte)0x00, (byte)0x6F, (byte)0x00, (byte)0x6C, (byte)0x00, (byte)0x6C, (byte)0x00, (byte)0x6F, (byte)0x00, (byte)0x33, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
////                   ClientName: apollo3
//      (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
////                   KeyboardType: Undefined value: 0
//      (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
////                   KeyboardSubType: 0 (0x0)
//      (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
////                   KeyboardFunctionKey: 0 (0x0)
//      (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
////                   ImeFileName:
//      (byte)0x01, (byte)0xCA,
////                   PostBeta2ColorDepth: 8 bpp
//      (byte)0x01, (byte)0x00,
////                   ClientProductId: 0x1, SHOULD be set to initialized to 1
//      (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
////                   SerialNumber: 0x0, SHOULD be set to 0
//      (byte)0x10, (byte)0x00,
////                   HighColorDepth: 16-bit 565 RGB
//      (byte)0x07, (byte)0x00,
////                 - SupportedColorDepth: 7 (0x7)
////                    Support24BPP: (...............1) Support 24BPP
////                    Support16BPP: (..............1.) Support 16BPP
////                    Support15BPP: (.............1..) Support 15BPP
////                    Support32BPP: (............0...) Not Support 32BPP
////                    Reserved:     (000000000000....)
//      (byte)0x01, (byte)0x00,
////                 - EarlyCapabilityFlags: 1 (0x1)
////                    SupportSetErrorPdu:      (...............1) Indicates that the client supports the Set Error Info PDU
////                    Want32BppSession:        (..............0.) Client is not requesting 32BPP session
////                    SupportStatusInfoPdu:    (.............0..) Client not supports the Server Status Info PDU
////                    StrongAsymmetricKeys:    (............0...) Not support asymmetric keys larger than 512-bits
////                    Unused:                  (...........0....)
////                    ValidConnection:         (..........0.....) Not Indicates ConnectionType field contains valid data
////                    SupportMonitorLayoutPdu: (.........0......) Not Indicates that the client supports the Monitor Layout PDU
////                    Unused2:                 (000000000.......)
//      (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
////      ClientDigProductId:
//(byte)0x00,
////      connectionType: invalid connection type
//(byte)0x00,
////      pad1octet: 0 (0x0)
//(byte)0x01, (byte)0x00, (byte)0x00, (byte)0x00,
////      ServerSelectedProtocols: TLS 1.0
////
////  - TsUd: CS_CLUSTER
////   - TsUdHeader: Type = CS_CLUSTER, Length = 12
//(byte)0x04, (byte)0xC0,
////      Type: CS_CLUSTER
//(byte)0x0C, (byte)0x00,
////      Length: 12 (0xC)
//(byte)0x0D, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
////   - TsUdCsCluster:
////    - Flags: 13 (0xD)
////       RedirectedSupported: (...............................1) Support Redirected
////       SessionIDFieldValid: (..............................0.) SessionID Field not Valid
////       SupportedVersion:    (..........................0011..) REDIRECTION_VERSION4
////       RedirectedSmartcard: (.........................0......) Not Logon with Smartcard
////       Unused:           (0000000000000000000000000.......)
////      RedirectedSessionID: 0 (0x0)
////
////  - TsUd: CS_SECURITY
////   - TsUdHeader: Type = CS_SECURITY, Length = 12
//(byte)0x02, (byte)0xC0,
////      Type: CS_SECURITY
//(byte)0x0C, (byte)0x00,
////      Length: 12 (0xC)
////
////   - TsUdCsSec:
//(byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
////    - EncryptionMethod:
////       Support40Bit:  (...............................0) Not Support
////       Support128Bit: (..............................0.) Not Support 128-bit
////       Reserved1:     (.............................0..)
////       Support56Bit:  (............................0...) Not Support 56-bit
////       SupportFIPS:   (...........................0....) Not Support FIPS Compliant
////       Reserved2:     (000000000000000000000000000.....)
//(byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
////    - ExtEncryptionMethod:
////       Support40Bit:  (...............................0) Not Support
////       Support128Bit: (..............................0.) Not Support 128-bit
////       Reserved1:     (.............................0..)
////       Support56Bit:  (............................0...) Not Support 56-bit
////       SupportFIPS:   (...........................0....) Not Support FIPS Compliant
////       Reserved2:     (000000000000000000000000000.....)
//    });
        /* @formatter:on */

        buf.trimAtCursor();

        pushDataToOTOut(buf);

        switchOff();
    }
View Full Code Here

            return;

        int payloadLength = length - buf.cursor;

        // Extract payload
        ByteBuffer outBuf = buf.slice(buf.cursor, payloadLength, true);
        buf.unref();

        if (verbose) {
            outBuf.putMetadata("source", this);
        }

        pushDataToAllOuts(outBuf);
    }
View Full Code Here

        // Switch off after receiving response(s)
    }

    private void sendChannelRequest(int channel) {
        ByteBuffer buf = new ByteBuffer(5, true);

        buf.writeByte(0x38); // Channel Join request

        buf.writeShort(state.serverUserChannelId - 1001); // ChannelJoinRequest::initiator: 1004
        buf.writeShort(channel);

        pushDataToOTOut(buf);
    }
View Full Code Here

            System.out.println("[" + this + "] INFO: Data received: " + buf + ".");

        if (buf.length > 32767 - 3)
            throw new RuntimeException("Packet is too long: " + buf + ".");

        ByteBuffer data = new ByteBuffer(6);

        // FastPath, 1 event, no checksum, not encrypted
        data.writeByte(0x4);

        // Length of full packet, including length field, in network order.
        // Topmost bit of first byte indicates that field has 2 bytes
        data.writeShort((1 + 2 + buf.length) | 0x8000);
        data.trimAtCursor();

        buf.prepend(data);

        pushDataToAllOuts(buf);
    }
View Full Code Here

    @Override
    protected void onStart() {
        super.onStart();

        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)
                (byte)0x03, (byte)0xeb,
                // Data priority: high (0x40), segmentation: begin (0x20) | end (0x10)
                (byte)0x70,
                // Data length:  22 bytes (0x16, variable length field)
                (byte)0x80(byte)0x16,

                // RDP: total length: 22 bytes (LE)
                (byte)0x16, (byte)0x00,

                // PDU type: PDUTYPE_DATAPDU (0x7), TS_PROTOCOL_VERSION (0x10) (LE)
                (byte)0x17, (byte)0x00,

                // PDU source: 1007 (LE)
                (byte)0xec, (byte)0x03,
                // Share ID: 0x000103ea (LE)
                (byte)0xea, (byte)0x03, (byte)0x01(byte)0x00,
                // Padding: 1 byte
                (byte)0x00,
                // Stream ID: STREAM_LOW (1)
                (byte)0x01,
                // uncompressedLength : 8 bytes (LE)
                (byte)0x08, (byte)0x00,
                // pduType2 = PDUTYPE2_SYNCHRONIZE (31)
                (byte)0x1f,
                // generalCompressedType: 0
                (byte)0x00,
                // generalCompressedLength: 0 (LE?)
                (byte)0x00, (byte)0x00,
                //  messageType: SYNCMSGTYPE_SYNC (1) (LE)
                (byte)0x01, (byte)0x00,
                // targetUser: 0x03ea
                (byte)0xea, (byte)0x03,
        });
        /* @formatter:on */

        // Trim buffer to actual length of data written
        buf.trimAtCursor();

        pushDataToOTOut(buf);

        switchOff();
    }
View Full Code Here

     */
    public static ByteBuffer rleDecompress(ByteBuffer srcBuf, int imageWidth, int imageHeight, int colorDepth) {
        int bpp = getPixelSize(colorDepth);

        // Decompress image
        ByteBuffer destBuf = new ByteBuffer(new byte[imageWidth * imageHeight * bpp]);
        rleDecompress(srcBuf, destBuf, imageWidth, imageHeight, colorDepth);

        // Flip image
        return flipRawImage(destBuf, imageWidth, imageHeight, bpp);
    }
View Full Code Here

     */
    public static ByteBuffer flipRawImage(ByteBuffer src, int width, int height, int bpp) {
        if (width * height * bpp != src.length)
            throw new RuntimeException("Incorrect size of buffer. Expected size (imageWidth*imageHeight*bpp): " + (width * height * bpp) + ", actual size: "
                    + src.length + ".");
        ByteBuffer dest = new ByteBuffer(new byte[src.length]);

        int scanLine = width * bpp;

        for (int i = 0; i < height; i++) {
            // Copy one row
View Full Code Here

    public static void main(String args[]) {

        if (true) {
            // 16x1@8bpp, all black
            int width = 16, height = 1, depth = 8, bpp = depth / 8;
            ByteBuffer src = new ByteBuffer(new byte[] {0x10});
            ByteBuffer dest = new AssertingByteBuffer(new byte[width * height * bpp]);
            rleDecompress(src, dest, width, height, depth);
        }

        if (true) {
            // 16x1@16bpp, all black
            int width = 16, height = 1, depth = 16, bpp = depth / 8;
            ByteBuffer src = new ByteBuffer(new byte[] {0x0c, (byte)0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00});
            ByteBuffer dest = new AssertingByteBuffer(new byte[width * height * bpp]);
            rleDecompress(src, dest, width, height, depth);
        }

        if (true) {
            // 32x32@8
            int width = 32, height = 32, depth = 8, bpp = depth / 8;

            ByteBuffer src = new ByteBuffer(new byte[] {(byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x80, (byte)0x00, (byte)0x06, (byte)0x06,
                    (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0xec, (byte)0x6c, (byte)0x0e,
                    (byte)0x0e, (byte)0x44, (byte)0x0e, (byte)0x0e, (byte)0x0e, (byte)0x13, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06,
                    (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0xe4, (byte)0x04, (byte)0x06,
                    (byte)0x8e, (byte)0x60, (byte)0x0e, (byte)0x60, (byte)0x8c, (byte)0xb4, (byte)0xb5, (byte)0xdc, (byte)0xdc, (byte)0xbb, (byte)0xb4,
                    (byte)0x8c, (byte)0x66, (byte)0x0b, (byte)0x6c, (byte)0xe4, (byte)0x04, (byte)0x06, (byte)0x02, (byte)0x8b, (byte)0x06, (byte)0x06,
                    (byte)0xed, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0xf8, (byte)0x0e, (byte)0x66, (byte)0xb4, (byte)0xdc, (byte)0x68, (byte)0xe2,
                    (byte)0x97, (byte)0xdd, (byte)0xb4, (byte)0xa7, (byte)0x16, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0xed,
                    (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x06, (byte)0x0b, (byte)0xae,
                    (byte)0xdc, (byte)0xe9, (byte)0x6a, (byte)0xdc, (byte)0x96, (byte)0xe9, (byte)0xe9, (byte)0xb4, (byte)0x0e, (byte)0x00, (byte)0x06,
                    (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x06,
                    (byte)0x0e, (byte)0xae, (byte)0xdc, (byte)0xdb, (byte)0xdb, (byte)0xd0, (byte)0x09, (byte)0x07, (byte)0xcf, (byte)0x03, (byte)0x95,
                    (byte)0xdb, (byte)0xdb, (byte)0xdc, (byte)0xb4, (byte)0x66, (byte)0x6c, (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0x00,
                    (byte)0x00, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x0b, (byte)0xae, (byte)0xdb, (byte)0xd4, (byte)0xd5, (byte)0x6c,
                    (byte)0xdb, (byte)0x80, (byte)0xaf, (byte)0xd5, (byte)0xd4, (byte)0xdb, (byte)0xb4, (byte)0x66, (byte)0x04, (byte)0x06, (byte)0x04,
                    (byte)0x06, (byte)0x00, (byte)0x00, (byte)0xed, (byte)0x06, (byte)0xed, (byte)0x66, (byte)0xae, (byte)0xd5, (byte)0xad, (byte)0xd4,
                    (byte)0xd4, (byte)0xd5, (byte)0xd5, (byte)0xd5, (byte)0xdb, (byte)0xb4, (byte)0xb4, (byte)0xb4, (byte)0xb4, (byte)0xb4, (byte)0xd5,
                    (byte)0xd5, (byte)0xd5, (byte)0xd4, (byte)0xd4, (byte)0xad, (byte)0xd5, (byte)0xb4, (byte)0x0e, (byte)0x06, (byte)0x06, (byte)0x06,
                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x60, (byte)0xa7, (byte)0xb4, (byte)0xad, (byte)0xad, (byte)0xad, (byte)0xb3,
                    (byte)0xb3, (byte)0xd4, (byte)0xd4, (byte)0xb3, (byte)0x8c, (byte)0xb6, (byte)0x07, (byte)0xb6, (byte)0x8c, (byte)0xb3, (byte)0xd4,
                    (byte)0xb3, (byte)0xb3, (byte)0xad, (byte)0xad, (byte)0xad, (byte)0xb4, (byte)0xad, (byte)0x66, (byte)0x00, (byte)0x06, (byte)0x00,
                    (byte)0x00, (byte)0x06, (byte)0x06, (byte)0x66, (byte)0xae, (byte)0xad, (byte)0x8b, (byte)0xad, (byte)0xad, (byte)0xad, (byte)0xad,
                    (byte)0xad, (byte)0xb3, (byte)0xad, (byte)0xb5, (byte)0x07, (byte)0x07, (byte)0x07, (byte)0xf0, (byte)0x8b, (byte)0xad, (byte)0xad,
                    (byte)0xad, (byte)0xad, (byte)0xad, (byte)0x8b, (byte)0xa7, (byte)0xae, (byte)0xa7, (byte)0x6c, (byte)0x06, (byte)0x00, (byte)0x00,
                    (byte)0x04, (byte)0x6c, (byte)0xa7, (byte)0xad, (byte)0xa7, (byte)0xa7, (byte)0x8b, (byte)0xad, (byte)0xad, (byte)0xad, (byte)0xad,
                    (byte)0xad, (byte)0xad, (byte)0xb5, (byte)0xbd, (byte)0xbd, (byte)0xbd, (byte)0xbd, (byte)0xf0, (byte)0x8b, (byte)0x8b, (byte)0xad,
                    (byte)0x8b, (byte)0x8b, (byte)0xa7, (byte)0xa7, (byte)0xc8, (byte)0xc8, (byte)0x60, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x06,
                    (byte)0x66, (byte)0xc8, (byte)0xa7, (byte)0x66, (byte)0xa7, (byte)0xa7, (byte)0x8b, (byte)0x8b, (byte)0x8b, (byte)0x8b, (byte)0xad,
                    (byte)0x8b, (byte)0x92, (byte)0xf1, (byte)0xf1, (byte)0xf1, (byte)0xf1, (byte)0xf2, (byte)0x07, (byte)0xa7, (byte)0xa7, (byte)0x8b,
                    (byte)0xa7, (byte)0xa7, (byte)0x66, (byte)0x66, (byte)0xc8, (byte)0x66, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x60,
                    (byte)0xa7, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0xa7, (byte)0xa7, (byte)0xa7, (byte)0xa7, (byte)0x8b, (byte)0x8b, (byte)0x8b,
                    (byte)0xa7, (byte)0xb6, (byte)0xf3, (byte)0xf3, (byte)0xf3, (byte)0xf3, (byte)0xf3, (byte)0x07, (byte)0x66, (byte)0xa7, (byte)0xa7,
                    (byte)0x66, (byte)0x66, (byte)0x66, (byte)0xa7, (byte)0xa7, (byte)0x6c, (byte)0x00, (byte)0x00, (byte)0x6c, (byte)0x04, (byte)0xa7,
                    (byte)0x60, (byte)0x6b, (byte)0x66, (byte)0x99, (byte)0xb6, (byte)0xf5, (byte)0xf5, (byte)0xf5, (byte)0xf5, (byte)0xf5, (byte)0xef,
                    (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0xa7, (byte)0x66, (byte)0x00, (byte)0x00, (byte)0x60,
                    (byte)0xa7, (byte)0x66, (byte)0x60, (byte)0x66, (byte)0x66, (byte)0x8c, (byte)0xf1, (byte)0x6e, (byte)0xff, (byte)0x85, (byte)0xbd,
                    (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x60, (byte)0x05, (byte)0x87, (byte)0x13, (byte)0x04, (byte)0x66, (byte)0x66, (byte)0x66,
                    (byte)0x66, (byte)0xf4, (byte)0x70, (byte)0xff, (byte)0x84, (byte)0xbd, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x05, (byte)0x85,
                    (byte)0x0b, (byte)0xa7, (byte)0xb5, (byte)0xae, (byte)0x8c, (byte)0xd0, (byte)0x13, (byte)0xc1, (byte)0x01, (byte)0x00, (byte)0x08,
                    (byte)0x8e, (byte)0x8c, (byte)0xae, (byte)0xb5, (byte)0xae, (byte)0x66, (byte)0x00, (byte)0x00, (byte)0x6c, (byte)0xae, (byte)0xbc,
                    (byte)0xb5, (byte)0xb5, (byte)0xae, (byte)0xb5, (byte)0xd0, (byte)0x0e, (byte)0x0c, (byte)0x01, (byte)0x00, (byte)0x90, (byte)0xf2,
                    (byte)0xae, (byte)0xae, (byte)0xb5, (byte)0xb5, (byte)0xbc, (byte)0xb5, (byte)0x66, (byte)0x00, (byte)0x00, (byte)0x04, (byte)0xae,
                    (byte)0x0a, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0x68, (byte)0xae, (byte)0x82, (byte)0x8c, (byte)0x0a, (byte)0x05, (byte)0x8c,
                    (byte)0xf2, (byte)0xae, (byte)0xae, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xbc, (byte)0xb5, (byte)0x6c, (byte)0x00, (byte)0x00,
                    (byte)0x06, (byte)0x05, (byte)0x81, (byte)0xd0, (byte)0x06, (byte)0x9a, (byte)0x8c, (byte)0x0a, (byte)0xff, (byte)0xff, (byte)0xff,
                    (byte)0xff, (byte)0xff, (byte)0xf2, (byte)0xae, (byte)0xae, (byte)0xd0, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0x0a, (byte)0xb5,
                    (byte)0x6c, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x8b, (byte)0x0a, (byte)0xbc, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0x06,
                    (byte)0x9b, (byte)0xb6, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xf2, (byte)0xae, (byte)0xae, (byte)0xae,
                    (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb6, (byte)0x0a, (byte)0x8c, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x6c,
                    (byte)0xb5, (byte)0x0a, (byte)0xb6, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0x05, (byte)0x80, (byte)0x7d, (byte)0xbc, (byte)0xff,
                    (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xf2, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb6,
                    (byte)0x0a, (byte)0x0a, (byte)0x8b, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x04, (byte)0x06, (byte)0x87, (byte)0x0a, (byte)0xbc,
                    (byte)0xb6, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xd0, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xb6, (byte)0xff, (byte)0xff,
                    (byte)0xff, (byte)0xf2, (byte)0xd0, (byte)0xae, (byte)0xd0, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb6, (byte)0xbc, (byte)0x1a,
                    (byte)0xb5, (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0xed, (byte)0x06, (byte)0x6e, (byte)0xb5, (byte)0x0a, (byte)0xbc,
                    (byte)0xb6, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xd0, (byte)0xd0, (byte)0xd0, (byte)0xb5, (byte)0xf4, (byte)0xff, (byte)0xf2,
                    (byte)0xd0, (byte)0xd0, (byte)0xd0, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb6, (byte)0xbc, (byte)0x0a, (byte)0x0a, (byte)0x8b,
                    (byte)0x06, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x04, (byte)0x8b, (byte)0xbc, (byte)0x1a, (byte)0x0a,
                    (byte)0xb6, (byte)0xb6, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xd0, (byte)0xb5, (byte)0xb5, (byte)0xb5,
                    (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb6, (byte)0xb6, (byte)0x0a, (byte)0xde, (byte)0x0a, (byte)0xa7, (byte)0x06, (byte)0x00,
                    (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x8b, (byte)0xbc, (byte)0xf2, (byte)0x0a,
                    (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb6,
                    (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0x0a, (byte)0xf2, (byte)0x1a, (byte)0x8c, (byte)0xec, (byte)0x06, (byte)0x06, (byte)0x06,
                    (byte)0x00, (byte)0x00, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0xa7, (byte)0xbc, (byte)0x1a, (byte)0x0a,
                    (byte)0x0a, (byte)0x6a, (byte)0xb6, (byte)0x96, (byte)0x0a, (byte)0x0a, (byte)0xf2, (byte)0x0a, (byte)0x87, (byte)0x06, (byte)0x04,
                    (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0xed, (byte)0x06,
                    (byte)0x8c, (byte)0xb6, (byte)0xf4, (byte)0xf2, (byte)0xd0, (byte)0x09, (byte)0xbc, (byte)0x87, (byte)0x03, (byte)0x80, (byte)0x2c,
                    (byte)0xde, (byte)0xf4, (byte)0x0a, (byte)0x8b, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x00,
                    (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x06, (byte)0x04, (byte)0x6c, (byte)0x87, (byte)0x0a,
                    (byte)0xf4, (byte)0xf4, (byte)0xf2, (byte)0xde, (byte)0xbd, (byte)0xbd, (byte)0xde, (byte)0xf2, (byte)0xf4, (byte)0xf4, (byte)0x0a,
                    (byte)0xd0, (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x06, (byte)0x00, (byte)0x00,
                    (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x6c, (byte)0x8c,
                    (byte)0xb5, (byte)0xbc, (byte)0x0a, (byte)0xde, (byte)0xf2, (byte)0xbd, (byte)0x0a, (byte)0xb5, (byte)0x8c, (byte)0x6c, (byte)0x06,
                    (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0xe6,
                    (byte)0x04, (byte)0x06, (byte)0x86, (byte)0x04, (byte)0x6c, (byte)0x04, (byte)0x8b, (byte)0x04, (byte)0x6c, (byte)0xe6, (byte)0x04,
                    (byte)0x06, (byte)0x82, (byte)0x00, (byte)0x00

            });

            ByteBuffer flippedImage = new ByteBuffer(new byte[] {(byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x04,
                    (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x6c, (byte)0x04, (byte)0x8b, (byte)0x04, (byte)0x6c,
                    (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x04,
                    (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06,
                    (byte)0x06, (byte)0x6c, (byte)0x8c, (byte)0xb5, (byte)0xbc, (byte)0x0a, (byte)0xde, (byte)0xf2, (byte)0xbd, (byte)0x0a, (byte)0xb5,
                    (byte)0x8c, (byte)0x6c, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x06,
                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x06, (byte)0x04, (byte)0x6c, (byte)0x87,
                    (byte)0x0a, (byte)0xf4, (byte)0xf4, (byte)0xf2, (byte)0xde, (byte)0xbd, (byte)0xbd, (byte)0xde, (byte)0xf2, (byte)0xf4, (byte)0xf4,
                    (byte)0x0a, (byte)0xd0, (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x06, (byte)0x00,
                    (byte)0x00, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x8c, (byte)0xb6, (byte)0xf4, (byte)0xf2,
                    (byte)0x0a, (byte)0x0a, (byte)0x0a, (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0x0a, (byte)0x0a, (byte)0x0a, (byte)0xde,
                    (byte)0xf4, (byte)0x0a, (byte)0x8b, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x00, (byte)0x00,
                    (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0xa7, (byte)0xbc, (byte)0x1a, (byte)0x0a, (byte)0x0a, (byte)0xb6,
                    (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0x0a, (byte)0x0a,
                    (byte)0xf2, (byte)0x0a, (byte)0x87, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x06,
                    (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x8b, (byte)0xbc, (byte)0xf2, (byte)0x0a, (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0xb6,
                    (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0xb6, (byte)0x0a,
                    (byte)0xf2, (byte)0x1a, (byte)0x8c, (byte)0xec, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x06,
                    (byte)0x04, (byte)0x8b, (byte)0xbc, (byte)0x1a, (byte)0x0a, (byte)0xb6, (byte)0xb6, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb5,
                    (byte)0xb5, (byte)0xd0, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb6, (byte)0xb6, (byte)0x0a,
                    (byte)0xde, (byte)0x0a, (byte)0xa7, (byte)0x06, (byte)0x00, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0xed, (byte)0x06, (byte)0x6e,
                    (byte)0xb5, (byte)0x0a, (byte)0xbc, (byte)0xb6, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xd0, (byte)0xd0, (byte)0xd0, (byte)0xb5,
                    (byte)0xf4, (byte)0xff, (byte)0xf2, (byte)0xd0, (byte)0xd0, (byte)0xd0, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb6, (byte)0xbc,
                    (byte)0x0a, (byte)0x0a, (byte)0x8b, (byte)0x06, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x04, (byte)0x06, (byte)0x87, (byte)0x0a,
                    (byte)0xbc, (byte)0xb6, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xd0, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xb6, (byte)0xff,
                    (byte)0xff, (byte)0xff, (byte)0xf2, (byte)0xd0, (byte)0xae, (byte)0xd0, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb6, (byte)0xbc,
                    (byte)0x1a, (byte)0xb5, (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x6c, (byte)0xb5, (byte)0x0a, (byte)0xb6,
                    (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xbc, (byte)0xff, (byte)0xff,
                    (byte)0xff, (byte)0xff, (byte)0xf2, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb6, (byte)0x0a,
                    (byte)0x0a, (byte)0x8b, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x8b, (byte)0x0a, (byte)0xbc, (byte)0xb5, (byte)0xb5,
                    (byte)0xb5, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xb6, (byte)0xff, (byte)0xff, (byte)0xff,
                    (byte)0xff, (byte)0xff, (byte)0xf2, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xb6, (byte)0x0a,
                    (byte)0x8c, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0xae, (byte)0x0a, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xd0,
                    (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0x8c, (byte)0x0a, (byte)0xff, (byte)0xff, (byte)0xff,
                    (byte)0xff, (byte)0xff, (byte)0xf2, (byte)0xae, (byte)0xae, (byte)0xd0, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0x0a, (byte)0xb5,
                    (byte)0x6c, (byte)0x00, (byte)0x00, (byte)0x04, (byte)0xae, (byte)0x0a, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xae, (byte)0xae,
                    (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0xae, (byte)0x8c, (byte)0x0a, (byte)0xff, (byte)0xff, (byte)0xff,
                    (byte)0xff, (byte)0xff, (byte)0xf2, (byte)0xae, (byte)0xae, (byte)0xb5, (byte)0xb5, (byte)0xb5, (byte)0xbc, (byte)0xb5, (byte)0x6c,
                    (byte)0x00, (byte)0x00, (byte)0x6c, (byte)0xae, (byte)0xbc, (byte)0xb5, (byte)0xb5, (byte)0xae, (byte)0xb5, (byte)0xf3, (byte)0xff,
                    (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
                    (byte)0xff, (byte)0xff, (byte)0xf2, (byte)0xae, (byte)0xae, (byte)0xb5, (byte)0xb5, (byte)0xbc, (byte)0xb5, (byte)0x66, (byte)0x00,
                    (byte)0x00, (byte)0x0b, (byte)0xa7, (byte)0xb5, (byte)0xae, (byte)0x8c, (byte)0xa7, (byte)0xf4, (byte)0xff, (byte)0xff, (byte)0xff,
                    (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
                    (byte)0xff, (byte)0xff, (byte)0xbd, (byte)0xa7, (byte)0x8c, (byte)0xae, (byte)0xb5, (byte)0xae, (byte)0x66, (byte)0x00, (byte)0x00,
                    (byte)0x13, (byte)0x04, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0xf4, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
                    (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
                    (byte)0xff, (byte)0xbd, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0xa7, (byte)0x66, (byte)0x00, (byte)0x00, (byte)0x60,
                    (byte)0xa7, (byte)0x66, (byte)0x60, (byte)0x66, (byte)0x66, (byte)0x8c, (byte)0xf1, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
                    (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xbd,
                    (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x60, (byte)0x66, (byte)0xa7, (byte)0x66, (byte)0x00, (byte)0x00, (byte)0x6c, (byte)0x04,
                    (byte)0xa7, (byte)0x60, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x66,
                    (byte)0x66, (byte)0x66, (byte)0xb6, (byte)0xf5, (byte)0xf5, (byte)0xf5, (byte)0xf5, (byte)0xf5, (byte)0xef, (byte)0x66, (byte)0x66,
                    (byte)0x66, (byte)0x66, (byte)0x66, (byte)0x66, (byte)0xa7, (byte)0x66, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x60, (byte)0xa7,
                    (byte)0x66, (byte)0x66, (byte)0x66, (byte)0xa7, (byte)0xa7, (byte)0xa7, (byte)0xa7, (byte)0x8b, (byte)0x8b, (byte)0x8b, (byte)0xa7,
                    (byte)0xb6, (byte)0xf3, (byte)0xf3, (byte)0xf3, (byte)0xf3, (byte)0xf3, (byte)0x07, (byte)0x66, (byte)0xa7, (byte)0xa7, (byte)0x66,
                    (byte)0x66, (byte)0x66, (byte)0xa7, (byte)0xa7, (byte)0x6c, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x66, (byte)0xc8, (byte)0xa7,
                    (byte)0x66, (byte)0xa7, (byte)0xa7, (byte)0x8b, (byte)0x8b, (byte)0x8b, (byte)0x8b, (byte)0xad, (byte)0x8b, (byte)0x92, (byte)0xf1,
                    (byte)0xf1, (byte)0xf1, (byte)0xf1, (byte)0xf2, (byte)0x07, (byte)0xa7, (byte)0xa7, (byte)0x8b, (byte)0xa7, (byte)0xa7, (byte)0x66,
                    (byte)0x66, (byte)0xc8, (byte)0x66, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x04, (byte)0x6c, (byte)0xa7, (byte)0xad, (byte)0xa7,
                    (byte)0xa7, (byte)0x8b, (byte)0xad, (byte)0xad, (byte)0xad, (byte)0xad, (byte)0xad, (byte)0xad, (byte)0xb5, (byte)0xbd, (byte)0xbd,
                    (byte)0xbd, (byte)0xbd, (byte)0xf0, (byte)0x8b, (byte)0x8b, (byte)0xad, (byte)0x8b, (byte)0x8b, (byte)0xa7, (byte)0xa7, (byte)0xc8,
                    (byte)0xc8, (byte)0x60, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x06, (byte)0x66, (byte)0xae, (byte)0xad, (byte)0x8b,
                    (byte)0xad, (byte)0xad, (byte)0xad, (byte)0xad, (byte)0xad, (byte)0xb3, (byte)0xad, (byte)0xb5, (byte)0x07, (byte)0x07, (byte)0x07,
                    (byte)0xf0, (byte)0x8b, (byte)0xad, (byte)0xad, (byte)0xad, (byte)0xad, (byte)0xad, (byte)0x8b, (byte)0xa7, (byte)0xae, (byte)0xa7,
                    (byte)0x6c, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x60, (byte)0xa7, (byte)0xb4, (byte)0xad, (byte)0xad,
                    (byte)0xad, (byte)0xb3, (byte)0xb3, (byte)0xd4, (byte)0xd4, (byte)0xb3, (byte)0x8c, (byte)0xb6, (byte)0x07, (byte)0xb6, (byte)0x8c,
                    (byte)0xb3, (byte)0xd4, (byte)0xb3, (byte)0xb3, (byte)0xad, (byte)0xad, (byte)0xad, (byte)0xb4, (byte)0xad, (byte)0x66, (byte)0x00,
                    (byte)0x06, (byte)0x00, (byte)0x00, (byte)0xed, (byte)0x06, (byte)0xed, (byte)0x66, (byte)0xae, (byte)0xd5, (byte)0xad, (byte)0xd4,
                    (byte)0xd4, (byte)0xd5, (byte)0xd5, (byte)0xd5, (byte)0xdb, (byte)0xb4, (byte)0xb4, (byte)0xb4, (byte)0xb4, (byte)0xb4, (byte)0xd5,
                    (byte)0xd5, (byte)0xd5, (byte)0xd4, (byte)0xd4, (byte)0xad, (byte)0xd5, (byte)0xb4, (byte)0x0e, (byte)0x06, (byte)0x06, (byte)0x06,
                    (byte)0x00, (byte)0x00, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x0b, (byte)0xae, (byte)0xdb, (byte)0xd4, (byte)0xd5,
                    (byte)0xdb, (byte)0xdb, (byte)0xdb, (byte)0xdb, (byte)0xdb, (byte)0xdb, (byte)0xdb, (byte)0xdb, (byte)0xdb, (byte)0xdb, (byte)0xdb,
                    (byte)0xdb, (byte)0xd5, (byte)0xd4, (byte)0xdb, (byte)0xb4, (byte)0x66, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x00,
                    (byte)0x00, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x0e, (byte)0xae, (byte)0xdc, (byte)0xdb, (byte)0xdb,
                    (byte)0xdb, (byte)0xdb, (byte)0xdb, (byte)0xdb, (byte)0xdc, (byte)0xdc, (byte)0xdb, (byte)0xdb, (byte)0xdb, (byte)0xdb, (byte)0xdb,
                    (byte)0xdb, (byte)0xdc, (byte)0xb4, (byte)0x66, (byte)0x6c, (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0x00, (byte)0x00,
                    (byte)0x00, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x06, (byte)0x0b, (byte)0xae, (byte)0xdc, (byte)0xe9, (byte)0xdc,
                    (byte)0xdc, (byte)0xdc, (byte)0xdc, (byte)0xdc, (byte)0xdc, (byte)0xdc, (byte)0xdc, (byte)0xdc, (byte)0xdc, (byte)0xe9, (byte)0xe9,
                    (byte)0xb4, (byte)0x0e, (byte)0x00, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x06,
                    (byte)0x06, (byte)0xed, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0xf8, (byte)0x0e, (byte)0x66, (byte)0xb4, (byte)0xdc, (byte)0xe2,
                    (byte)0xe2, (byte)0xe2, (byte)0xe2, (byte)0xe2, (byte)0xe2, (byte)0xe2, (byte)0xe2, (byte)0xdd, (byte)0xb4, (byte)0xa7, (byte)0x16,
                    (byte)0x06, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x04, (byte)0x06,
                    (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x60, (byte)0x0e, (byte)0x60, (byte)0x8c, (byte)0xb4,
                    (byte)0xb5, (byte)0xdc, (byte)0xdc, (byte)0xbb, (byte)0xb4, (byte)0x8c, (byte)0x66, (byte)0x0b, (byte)0x6c, (byte)0x04, (byte)0x06,
                    (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x04, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x06, (byte)0x06, (byte)0xed,
                    (byte)0x06, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0xec, (byte)0x6c, (byte)0x0e, (byte)0x0e,
                    (byte)0x44, (byte)0x0e, (byte)0x0e, (byte)0x0e, (byte)0x13, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x06,
                    (byte)0x06, (byte)0xed, (byte)0x06, (byte)0x06, (byte)0x06, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00});
            ByteBuffer dest = new AssertingByteBuffer(flipRawImage(flippedImage, width, height, bpp).data);

            rleDecompress(src, dest, width, height, depth);

        }

        if (true) {
            // 32x32@16
            int width = 32, height = 32, depth = 16;

            ByteBuffer src = new ByteBuffer(new byte[] {(byte)0x85, (byte)0xff, (byte)0xff, (byte)0x99, (byte)0xd6, (byte)0x99, (byte)0xd6, (byte)0x99,
                    (byte)0xd6, (byte)0x99, (byte)0xd6, (byte)0x06, (byte)0x8b, (byte)0x99, (byte)0xd6, (byte)0x99, (byte)0xd6, (byte)0x99, (byte)0xd6,
                    (byte)0x10, (byte)0x84, (byte)0x08, (byte)0x42, (byte)0x08, (byte)0x42, (byte)0x10, (byte)0x84, (byte)0x99, (byte)0xd6, (byte)0x99,
                    (byte)0xd6, (byte)0x99, (byte)0xd6, (byte)0x99, (byte)0xd6, (byte)0x06, (byte)0x84, (byte)0x99, (byte)0xd6, (byte)0x99, (byte)0xd6,
                    (byte)0x99, (byte)0xd6, (byte)0xff, (byte)0xff, (byte)0x16, (byte)0x69, (byte)0x99, (byte)0xd6, (byte)0x06, (byte)0x69, (byte)0x99,
                    (byte)0xd6, (byte)0x04, (byte)0xcc, (byte)0x89, (byte)0x52, (byte)0x03, (byte)0x6e, (byte)0xff, (byte)0xff, (byte)0x02, (byte)0x6e,
                    (byte)0x08, (byte)0x42, (byte)0x01, (byte)0x70, (byte)0x08, (byte)0x42, (byte)0x71, (byte)0xff, (byte)0xff, (byte)0xce, (byte)0x18,
                    (byte)0xc6, (byte)0x01, (byte)0x81, (byte)0x08, (byte)0x42, (byte)0xce, (byte)0x66, (byte)0x29, (byte)0x02, (byte)0xcd, (byte)0x89,
                    (byte)0x52, (byte)0x03, (byte)0x88, (byte)0x10, (byte)0x84, (byte)0x99, (byte)0xd6, (byte)0x99, (byte)0xd6, (byte)0x99, (byte)0xd6,
                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xd8, (byte)0x99, (byte)0xd6,
                    (byte)0x03, (byte)0xf8, (byte)0x01, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xf0, (byte)0x66, (byte)0x99, (byte)0xd6,
                    (byte)0x05, (byte)0x6a, (byte)0x99, (byte)0xd6, (byte)0x00, (byte)0xc4, (byte)0xcc, (byte)0x89, (byte)0x52, (byte)0x03, (byte)0x6e,
                    (byte)0xff, (byte)0xff, (byte)0x02, (byte)0x6e, (byte)0x08, (byte)0x42, (byte)0x01, (byte)0x70, (byte)0x08, (byte)0x42, (byte)0x71,
                    (byte)0xff, (byte)0xff, (byte)0xce, (byte)0x18, (byte)0xc6, (byte)0x01, (byte)0x81, (byte)0x08, (byte)0x42, (byte)0xce, (byte)0x66,
                    (byte)0x29, (byte)0x02, (byte)0xcd, (byte)0x89, (byte)0x52, (byte)0x03, (byte)0x00, (byte)0x04, (byte)0xd6, (byte)0x99, (byte)0xd6,
                    (byte)0xc3, (byte)0x80, (byte)0x61, (byte)0x00, (byte)0xa5, (byte)0x80, (byte)0x40, (byte)0xec, (byte)0x52, (byte)0x00, (byte)0x5a,
                    (byte)0x00, (byte)0x2d, (byte)0x00, (byte)0x24, (byte)0x00, (byte)0x12, (byte)0x00, (byte)0x24, (byte)0x00, (byte)0x12, (byte)0x00,
                    (byte)0x5a, (byte)0x00, (byte)0x2d, (byte)0x00, (byte)0xa5, (byte)0x80, (byte)0x52, (byte)0x00, (byte)0xc3, (byte)0x80, (byte)0x61,
                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0xcc, (byte)0x89, (byte)0x52, (byte)0x03, (byte)0x6e, (byte)0xff,
                    (byte)0xff, (byte)0x02, (byte)0xcb, (byte)0x18, (byte)0xc6, (byte)0x84, (byte)0x08, (byte)0x42, (byte)0x08, (byte)0x42, (byte)0x08,
                    (byte)0x42, (byte)0xff, (byte)0xff,});

            ByteBuffer dest = new AssertingByteBuffer(new byte[] {(byte)0xff, (byte)0xff, (byte)0x99, (byte)0xd6, (byte)0x99, (byte)0xd6, (byte)0x99,
                    (byte)0xd6, (byte)0x99, (byte)0xd6, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x99, (byte)0xd6, (byte)0x99, (byte)0xd6, (byte)0x99, (byte)0xd6, (byte)0x10,
                    (byte)0x84, (byte)0x08, (byte)0x42, (byte)0x08, (byte)0x42, (byte)0x10, (byte)0x84, (byte)0x99, (byte)0xd6, (byte)0x99, (byte)0xd6,
                    (byte)0x99, (byte)0xd6, (byte)0x99, (byte)0xd6, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
                    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x99, (byte)0xd6, (byte)0x99, (byte)0xd6, (byte)0x99, (byte)0xd6,
View Full Code Here

        if ((options & X224_TPDU_LAST_DATA_UNIT) != X224_TPDU_LAST_DATA_UNIT)
            throw new RuntimeException("Unexepcted X224 packet options. Expected options: " + X224_TPDU_LAST_DATA_UNIT
                    + " (X224_TPDU_LAST_DATA_UNIT), actual packet options: " + options + ", buf: " + buf + ".");

        ByteBuffer payload = buf.readBytes(buf.length - buf.cursor);

        buf.unref();

        pushDataToAllOuts(payload);
    }
View Full Code Here

TOP

Related Classes of streamer.ByteBuffer

Copyright © 2018 www.massapicom. 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.