Package com.ngt.jopenmetaverse.shared.structureddata

Examples of com.ngt.jopenmetaverse.shared.structureddata.OSD.asString()


          public void DeserializeUUID() throws OSDException, IOException
          {
              String uuidOne = "u97f4aeca-88a1-42a1-b385-b97b18abb255";
              OSD llsdOne = NotationalLLSDOSDParser.DeserializeLLSDNotation(uuidOne);
              Assert.assertEquals(OSDType.UUID, llsdOne.getType());
              Assert.assertEquals("97f4aeca-88a1-42a1-b385-b97b18abb255", llsdOne.asString());

              String uuidTwo = "u00000000-0000-0000-0000-000000000000";
              OSD llsdTwo = NotationalLLSDOSDParser.DeserializeLLSDNotation(uuidTwo);
              Assert.assertEquals(OSDType.UUID, llsdTwo.getType());
              Assert.assertEquals("00000000-0000-0000-0000-000000000000", llsdTwo.asString());
View Full Code Here


              Assert.assertEquals("97f4aeca-88a1-42a1-b385-b97b18abb255", llsdOne.asString());

              String uuidTwo = "u00000000-0000-0000-0000-000000000000";
              OSD llsdTwo = NotationalLLSDOSDParser.DeserializeLLSDNotation(uuidTwo);
              Assert.assertEquals(OSDType.UUID, llsdTwo.getType());
              Assert.assertEquals("00000000-0000-0000-0000-000000000000", llsdTwo.asString());
          }

          @Test
          public void SerializeUUID() throws IOException, OSDException
          {
View Full Code Here

          {
              OSD llsdOne = OSD.FromUUID(new UUID("97f4aeca-88a1-42a1-b385-b97b18abb255"));
              String sOne = NotationalLLSDOSDParser.SerializeLLSDNotation(llsdOne);
              OSD llsdOneDS = NotationalLLSDOSDParser.DeserializeLLSDNotation(sOne);
              Assert.assertEquals(OSDType.UUID, llsdOneDS.getType());
              Assert.assertEquals("97f4aeca-88a1-42a1-b385-b97b18abb255", llsdOneDS.asString());

              OSD llsdTwo = OSD.FromUUID(new UUID("00000000-0000-0000-0000-000000000000"));
              String sTwo = NotationalLLSDOSDParser.SerializeLLSDNotation(llsdTwo);
              OSD llsdTwoDS = NotationalLLSDOSDParser.DeserializeLLSDNotation(sTwo);
              Assert.assertEquals(OSDType.UUID, llsdTwoDS.getType());
View Full Code Here

              OSD llsdTwo = OSD.FromUUID(new UUID("00000000-0000-0000-0000-000000000000"));
              String sTwo = NotationalLLSDOSDParser.SerializeLLSDNotation(llsdTwo);
              OSD llsdTwoDS = NotationalLLSDOSDParser.DeserializeLLSDNotation(sTwo);
              Assert.assertEquals(OSDType.UUID, llsdTwoDS.getType());
              Assert.assertEquals("00000000-0000-0000-0000-000000000000", llsdTwoDS.asString());
          }

          public void DeserializeString() throws OSDException, IOException
          {
              String sOne = "''";
View Full Code Here

          public void DeserializeString() throws OSDException, IOException
          {
              String sOne = "''";
              OSD llsdOne = NotationalLLSDOSDParser.DeserializeLLSDNotation(sOne);
              Assert.assertEquals(OSDType.String, llsdOne.getType());
              Assert.assertEquals("", llsdOne.asString());

              // This is double escaping. Once for the encoding, and once for csharp. 
              String sTwo = "'test\\'\"test'";
              OSD llsdTwo = NotationalLLSDOSDParser.DeserializeLLSDNotation(sTwo);
              Assert.assertEquals(OSDType.String, llsdTwo.getType());
View Full Code Here

              // This is double escaping. Once for the encoding, and once for csharp. 
              String sTwo = "'test\\'\"test'";
              OSD llsdTwo = NotationalLLSDOSDParser.DeserializeLLSDNotation(sTwo);
              Assert.assertEquals(OSDType.String, llsdTwo.getType());
              Assert.assertEquals("test'\"test", llsdTwo.asString());

              // "test \\lest"
              char[] cThree = { (char)0x27, (char)0x74, (char)0x65, (char)0x73, (char)0x74, (char)0x20, (char)0x5c,
                                  (char)0x5c, (char)0x6c, (char)0x65, (char)0x73, (char)0x74, (char)0x27 };
              String sThree = new String(cThree);
View Full Code Here

                                  (char)0x5c, (char)0x6c, (char)0x65, (char)0x73, (char)0x74, (char)0x27 };
              String sThree = new String(cThree);

              OSD llsdThree = NotationalLLSDOSDParser.DeserializeLLSDNotation(sThree);
              Assert.assertEquals(OSDType.String, llsdThree.getType());
              Assert.assertEquals("test \\lest", llsdThree.asString());

              String sFour = "'aa\t la'";
              OSD llsdFour = NotationalLLSDOSDParser.DeserializeLLSDNotation(sFour);
              Assert.assertEquals(OSDType.String, llsdFour.getType());
              Assert.assertEquals("aa\t la", llsdFour.asString());
View Full Code Here

              Assert.assertEquals("test \\lest", llsdThree.asString());

              String sFour = "'aa\t la'";
              OSD llsdFour = NotationalLLSDOSDParser.DeserializeLLSDNotation(sFour);
              Assert.assertEquals(OSDType.String, llsdFour.getType());
              Assert.assertEquals("aa\t la", llsdFour.asString());

              char[] cFive = { (char)0x27, (char)0x5c, (char)0x5c, (char)0x27 };
              String sFive = new String(cFive);
              OSD llsdFive = NotationalLLSDOSDParser.DeserializeLLSDNotation(sFive);
              Assert.assertEquals(OSDType.String, llsdFive.getType());
View Full Code Here

              char[] cFive = { (char)0x27, (char)0x5c, (char)0x5c, (char)0x27 };
              String sFive = new String(cFive);
              OSD llsdFive = NotationalLLSDOSDParser.DeserializeLLSDNotation(sFive);
              Assert.assertEquals(OSDType.String, llsdFive.getType());
              Assert.assertEquals("\\", llsdFive.asString());


              String sSix = "s(10)\"1234567890\"";
              OSD llsdSix = NotationalLLSDOSDParser.DeserializeLLSDNotation(sSix);
              Assert.assertEquals(OSDType.String, llsdSix.getType());
View Full Code Here


              String sSix = "s(10)\"1234567890\"";
              OSD llsdSix = NotationalLLSDOSDParser.DeserializeLLSDNotation(sSix);
              Assert.assertEquals(OSDType.String, llsdSix.getType());
              Assert.assertEquals("1234567890", llsdSix.asString());

              String sSeven = "s(5)\"\\\\\\\\\\\"";
              OSD llsdSeven = NotationalLLSDOSDParser.DeserializeLLSDNotation(sSeven);
              Assert.assertEquals(OSDType.String, llsdSeven.getType());
              Assert.assertEquals("\\\\\\\\\\", llsdSeven.asString());
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.