Examples of CodeSet


Examples of org.jacorb.orb.CodeSet

        CodeSetComponentInfo info = pior.getCodeSetComponentInfo();
        if (info != null && !ignoreComponentInfo)
        {
            connection.markTCSNegotiated(); // even if this aborts, we should not try negotiating again.
            CodeSet c1 = CodeSet.getNegotiatedCodeSet((org.jacorb.orb.ORB)orb, info, /* wide */ false );
            CodeSet c2 = CodeSet.getNegotiatedCodeSet((org.jacorb.orb.ORB)orb, info, /* wide */ true );

            connection.setCodeSets( c1, c2);

            logger.info ("Negotiated char codeset of " + c1 +
                         " and wchar of " + c2);
View Full Code Here

Examples of org.jacorb.orb.CodeSet

*/
public class CodesetWriteStringTest {

  @Test
  public void testStringWith1Byte() {
    CodeSet codeSet = CodeSet.getCodeSet("utf8");

    CDROutputStream cdrOutputStream = new CDROutputStream();
    byte[] expected = new byte[] {(byte)0x61};
    String string = "a";

    codeSet.write_string(cdrOutputStream, string, false, false, 2);
    byte[] bufferCopy = cdrOutputStream.getBufferCopy();
    Assert.assertArrayEquals(expected, bufferCopy);
  }
View Full Code Here

Examples of org.jacorb.orb.CodeSet

    Assert.assertArrayEquals(expected, bufferCopy);
  }

  @Test
  public void testStringWith2Byte() {
    CodeSet codeSet = CodeSet.getCodeSet("utf8");

    CDROutputStream cdrOutputStream = new CDROutputStream();
    byte[] expected = new byte[] {(byte)0xc2, (byte)0xae};
    String string = "ยฎ";

    codeSet.write_string(cdrOutputStream, string, false, false, 2);
    byte[] bufferCopy = cdrOutputStream.getBufferCopy();
    Assert.assertArrayEquals(expected, bufferCopy);
  }
View Full Code Here

Examples of org.jacorb.orb.CodeSet

    Assert.assertArrayEquals(expected, bufferCopy);
  }

  @Test
  public void testStringWith3Byte() {
    CodeSet codeSet = CodeSet.getCodeSet("utf8");

    CDROutputStream cdrOutputStream = new CDROutputStream();
    byte[] expected = new byte[] {(byte)0xe0, (byte)0xa4, (byte)0xbf};
    String string = "เคฟ";

    codeSet.write_string(cdrOutputStream, string, false, false, 2);
    byte[] bufferCopy = cdrOutputStream.getBufferCopy();
    Assert.assertArrayEquals(expected, bufferCopy);
  }
View Full Code Here

Examples of org.jacorb.orb.CodeSet

    Assert.assertArrayEquals(expected, bufferCopy);
  }

  @Test
  public void testStringWith4Byte() {
    CodeSet codeSet = CodeSet.getCodeSet("utf8");

    CDROutputStream cdrOutputStream = new CDROutputStream();
    byte[] expected = new byte[] {(byte)0xf0, (byte)0x9f, (byte)0x98, (byte)0x8e};
    String string = "๐Ÿ˜Ž";

    codeSet.write_string(cdrOutputStream, string, false, false, 2);
    byte[] bufferCopy = cdrOutputStream.getBufferCopy();
    Assert.assertArrayEquals(expected, bufferCopy);
  }
View Full Code Here

Examples of org.jacorb.orb.CodeSet

    Assert.assertArrayEquals(expected, bufferCopy);
  }

  @Test
  public void testMixedString() {
    CodeSet codeSet = CodeSet.getCodeSet("utf8");

    CDROutputStream cdrOutputStream = new CDROutputStream();
    byte[] expected = new byte[] {
        (byte)0x61,                      // a
        (byte)0x73,                      // s
        (byte)0x64,                      // d
        (byte)0x66,                      // f
        (byte)0x20,                      // space
        (byte)0xe0, (byte)0xa4, (byte)0x91,          // DEVANAGARI LETTER CANDRA O
        (byte)0x20,                      // space
        (byte)0xe1, (byte)0x85, (byte)0x93,          // HANGUL CHOSEONG CHIEUCH-HIEUH
        (byte)0x20,                      // space
        (byte)0xf0, (byte)0x90, (byte)0x90, (byte)0xa7,   // DESERET CAPITAL LETTER EW
        (byte)0x20,                      // space
        (byte)0xf0, (byte)0x90, (byte)0x91, (byte)0x89,    // DESERET SMALL LETTER ER
        (byte)0x20,                      // space
        (byte)0xf0, (byte)0x9d, (byte)0x96, (byte)0x84,    // MATHEMATICAL BOLD FRAKTUR CAPITAL Y
        (byte)0x20,                      // space
        (byte)0xf0, (byte)0x9f, (byte)0x88, (byte)0xb3,    // SQUARED CJK UNIFIED IDEOGRAPH-7A7A
        (byte)0x20,                      // space
        (byte)0xcd, (byte)0xb2,                // GREEK CAPITAL LETTER ARCHAIC SAMPI
        (byte)0xd1, (byte)0xbe                // CYRILLIC CAPITAL LETTER OT
        };
    String string = "asdf เค‘ แ…“ ๐ง ๐‘‰ ๐–„ ๐Ÿˆณ อฒัพ";

    codeSet.write_string(cdrOutputStream, string, false, false, 2);
    byte[] bufferCopy = cdrOutputStream.getBufferCopy();
    Assert.assertArrayEquals(expected, bufferCopy);
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.wizard.gettingstarted.content.CodeSet

      System.out.println("name   : "+item.getName());
      System.out.println("type    : "+buildtype);
      System.out.println();
     
      String projectName = item.getName();
      CodeSet codeset = item.getCodeSet();
      IRunnableWithProgress importOp = buildtype.getImportStrategy().createOperation(importConfig(
          /*location*/
          Platform.getLocation().append(projectName),
          /*name*/
          projectName,
 
View Full Code Here

Examples of org.springframework.ide.eclipse.wizard.gettingstarted.content.CodeSet

  public static void validateZipStructure(ReferenceApp app) throws IOException, Exception {
    File zipFile = app.getZip().getFile();
    assertTrue("Could not download "+ app.getZip(),
        zipFile!=null && zipFile.exists());
   
    CodeSet allData = CodeSet.fromZip("all", app.getZip(), new Path("/"));
    assertTrue("ZipFile is empty", allData.exists());
   
//    CodeSet.Processor<Void> printEntry = new CodeSet.Processor<Void>() {
//      public Void doit(CodeSetEntry e) {
//        System.out.println(e);
//        return null;
//      };
//    };
//    allData.each(printEntry);
   
    assertFolder(allData, app.getRootPath());
    String readme = app.getReadme();
    assertNotNull("No README.md file", readme);
   
    CodeSet codeset = app.getCodeSet();
    String codesetName = codeset.getName();
    assertTrue("No '"+codeset.getName()+"' codeset", codeset.exists());
   
    boolean isGradle = codeset.hasFile("build.gradle");
    boolean isMaven = codeset.hasFile("pom.xml");
    assertTrue("Codeset "+codesetName+" has neither a build.gradle nor a pom.xml", isGradle||isMaven);

  }
View Full Code Here

Examples of org.springframework.ide.eclipse.wizard.gettingstarted.content.CodeSet

        public void doit(IProgressMonitor mon) throws Exception {
          File zipFile = guide.getZip().getFile();
          assertTrue("Could not download "+ guide.getZip(),
              zipFile!=null && zipFile.exists());
         
          CodeSet allData = CodeSet.fromZip("all", guide.getZip(), new Path("/"));
          assertTrue("ZipFile is empty", allData.exists());
         
  //        CodeSet.Processor<Void> printEntry = new CodeSet.Processor<Void>() {
  //          public Void doit(CodeSetEntry e) {
  //            System.out.println(e);
  //            return null;
View Full Code Here

Examples of org.springframework.ide.eclipse.wizard.gettingstarted.content.CodeSet

    try {
      downloader = new DownloadManager().allowUIThread(allowUIThread);

      DownloadableItem zip = new DownloadableItem(newURL(downloadUrl .getValue()), downloader);
      String projectNameValue = projectName.getValue();
      CodeSet cs = CodeSet.fromZip(projectNameValue, zip, new Path("/"));

      IRunnableWithProgress oper = getImportStrategy().createOperation(ImportUtils.importConfig(
          new Path(location.getValue()),
          projectNameValue,
          cs
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.