Examples of UnpackString()


Examples of com.ngt.jopenmetaverse.shared.sim.rendering.mesh.BitPack.UnpackString()

            }

            morphs.add(morph);

            // Grab the next name
            morphName = Utils.TrimAt0(input.UnpackString(64));
        }

        _morphs = morphs.toArray(new Morph[0]);

        // Check if there are remaps or if we're at the end of the file
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.sim.rendering.mesh.BitPack.UnpackString()

        public void LoadMesh(String filename) throws IOException
        {
            byte[] buffer = FileUtils.readBytes(new File(filename));
            BitPack input = new BitPack(buffer, 0);

            _header = Utils.TrimAt0(input.UnpackString(24));
            if (!_header.equalsIgnoreCase(MESH_HEADER))
                throw new IOException("Unrecognized mesh format");

            // Populate base mesh variables
            _hasWeights = (input.UnpackByte() != 0);
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.sim.rendering.mesh.BitPack.UnpackString()

    public void LoadMesh(String filename) throws IOException
    {
        byte[] buffer = FileUtils.readBytes(new File(filename));
        BitPack input = new BitPack(buffer, 0);

        _header = Utils.TrimAt0(input.UnpackString(24));
        if (!_header.equalsIgnoreCase(MESH_HEADER))
            throw new IOException("Unrecognized mesh format");

        // Populate base mesh variables
        _hasWeights = (input.UnpackByte() != 0);
View Full Code Here

Examples of org.msgpack.core.MessageUnpacker.unpackString()

        long bitmap = 0;
        byte[] bytes = objectMapper.writeValueAsBytes(hashMap);
        MessageUnpacker messageUnpacker = new MessageUnpacker(new ArrayBufferInput(bytes));
        assertEquals(hashMap.size(), messageUnpacker.unpackMapHeader());
        for (int i = 0; i < hashMap.size(); i++) {
            String key = messageUnpacker.unpackString();
            if (key.equals("str")) {
                // #1
                assertEquals("komamitsu", messageUnpacker.unpackString());
                bitmap |= 0x1 << 0;
            }
View Full Code Here

Examples of org.msgpack.core.MessageUnpacker.unpackString()

        assertEquals(hashMap.size(), messageUnpacker.unpackMapHeader());
        for (int i = 0; i < hashMap.size(); i++) {
            String key = messageUnpacker.unpackString();
            if (key.equals("str")) {
                // #1
                assertEquals("komamitsu", messageUnpacker.unpackString());
                bitmap |= 0x1 << 0;
            }
            else if (key.equals("boolean")) {
                // #2
                assertTrue(messageUnpacker.unpackBoolean());
View Full Code Here

Examples of org.msgpack.core.MessageUnpacker.unpackString()

            }
            else if (key.equals("childObj")) {
                // #8
                assertEquals(2, messageUnpacker.unpackMapHeader());
                for (int j = 0; j < 2; j++) {
                    String childKey = messageUnpacker.unpackString();
                    if (childKey.equals("co_str")) {
                        assertEquals("child#0", messageUnpacker.unpackString());
                        bitmap |= 0x1 << 7;
                    }
                    else if (childKey.equals("co_int")) {
View Full Code Here

Examples of org.msgpack.core.MessageUnpacker.unpackString()

                // #8
                assertEquals(2, messageUnpacker.unpackMapHeader());
                for (int j = 0; j < 2; j++) {
                    String childKey = messageUnpacker.unpackString();
                    if (childKey.equals("co_str")) {
                        assertEquals("child#0", messageUnpacker.unpackString());
                        bitmap |= 0x1 << 7;
                    }
                    else if (childKey.equals("co_int")) {
                        assertEquals(12345, messageUnpacker.unpackInt());
                        bitmap |= 0x1 << 8;
View Full Code Here

Examples of org.msgpack.core.MessageUnpacker.unpackString()

                }
            }
            else if (key.equals("childArray")) {
                // #9
                assertEquals(2, messageUnpacker.unpackArrayHeader());
                assertEquals("child#1", messageUnpacker.unpackString());
                assertEquals(1.23f, messageUnpacker.unpackFloat(), 0.01f);
                bitmap |= 0x1 << 9;
            }
            else {
                assertTrue(false);
View Full Code Here

Examples of org.msgpack.core.MessageUnpacker.unpackString()

        long bitmap = 0;
        byte[] bytes = objectMapper.writeValueAsBytes(array);
        MessageUnpacker messageUnpacker = new MessageUnpacker(new ArrayBufferInput(bytes));
        assertEquals(array.size(), messageUnpacker.unpackArrayHeader());
        // #1
        assertEquals("komamitsu", messageUnpacker.unpackString());
        // #2
        assertEquals(Integer.MAX_VALUE, messageUnpacker.unpackInt());
        // #3
        assertEquals(Long.MIN_VALUE, messageUnpacker.unpackLong());
        // #4
View Full Code Here

Examples of org.msgpack.core.MessageUnpacker.unpackString()

        // #5
        assertEquals(3.14159d, messageUnpacker.unpackDouble(), 0.01f);
        // #6
        assertEquals(2, messageUnpacker.unpackMapHeader());
        for (int i = 0; i < childObject.size(); i++) {
            String key = messageUnpacker.unpackString();
            if (key.equals("str")) {
                assertEquals("foobar", messageUnpacker.unpackString());
                bitmap |= 0x1 << 0;
            }
            else if (key.equals("num")) {
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.