Examples of toCharArray()


Examples of com.alibaba.fastjson.serializer.SerializeWriter.toCharArray()

    public void test_12() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
        out.append("abc");
        Assert.assertEquals("abc", out.toString());
        Assert.assertEquals(3, out.toCharArray().length);
        Assert.assertEquals(3, out.size());
        out.reset();
        Assert.assertEquals("", out.toString());
        Assert.assertEquals(0, out.toCharArray().length);
        Assert.assertEquals(0, out.size());
View Full Code Here

Examples of com.aptana.shared_core.string.FastStringBuffer.toCharArray()

        this.doc = doc;
        this.ps = new PySelection(this.doc, selection);
        FastStringBuffer buf = new FastStringBuffer(ps.getSelectedText(), 0);
        ParsingUtils.removeCommentsAndWhitespaces(buf);
        buf.replaceAll("\\", ""); //Remove all the \\
        selectedText = buf.toCharArray();
        parsingUtils = ParsingUtils.create(this.doc);
    }

    protected boolean unhandled_node(SimpleNode node) throws Exception {
        this.addLastFound(node);
View Full Code Here

Examples of com.humaorie.dollar.ArrayWrapper.ByteArrayWrapper.toCharArray()

    @Test
    public void unboxByteArrayToCharArray() {
        Byte[] boxed = new Byte[] { 'f', 'o', 'o' };
        ByteArrayWrapper arrayWrapper = new ByteArrayWrapper(boxed);
        Assert.assertArrayEquals(new char[] { 'f', 'o', 'o' },
                arrayWrapper.toCharArray());
    }

    @Test
    public void unboxByteArrayToShortArray() {
        Byte[] boxed = new Byte[]{42, 43, 44};
View Full Code Here

Examples of com.humaorie.dollar.ArrayWrapper.CharArrayWrapper.toCharArray()

    // unboxing
    @Test
    public void unboxCharacterArray() {
        Character[] boxed = new Character[]{'f', 'o', 'o'};
        CharArrayWrapper arrayWrapper = new CharArrayWrapper(boxed);
        Assert.assertArrayEquals(new char[]{'f', 'o', 'o'}, arrayWrapper.toCharArray());
    }

    @Test
    public void unboxCharacterArrayToByteArray() {
        Character[] boxed = new Character[] { 'f', 'o', 'o' };
View Full Code Here

Examples of com.jacob.com.SafeArray.toCharArray()

   */
  public void testCharSafeArray() {
    char sourceData[] = new char[] { 'a', 'b', 'c', 'd' };
    SafeArray saUnderTest = new SafeArray(Variant.VariantVariant, 3);
    saUnderTest.fromCharArray(sourceData);
    char[] extractedFromSafeArray = saUnderTest.toCharArray();
    for (int i = 0; i < extractedFromSafeArray.length; i++) {
      assertEquals("" + i, sourceData[i], extractedFromSafeArray[i]);
    }
    assertEquals("single get failed: ", sourceData[2], saUnderTest
        .getChar(2));
View Full Code Here

Examples of com.sgfj.SGFPropertyName.toCharArray()

    public void testToCharArray() {
        char[] ca1 = new char[]{'B'};
        char[] ca2 = new char[]{'S', 'Z'};
        SGFPropertyName n1 = SGFParser.parsePropertyName(ca1);
        assertTrue(equal(ca1, n1.toCharArray()));
        n1 = SGFParser.parsePropertyName(ca2);
        assertTrue(equal(ca2, n1.toCharArray()));
    }

    public void testAllowingRange() {
View Full Code Here

Examples of java.io.ByteArrayOutputStream.toCharArray()

          CharArrayWriter out = new CharArrayWriter();

          for (int ch = reader.read(); ch >= 0; ch = reader.read())
            out.write(ch);

          return Base64.encode(new String(out.toCharArray()));
        }
      }

      throw new JAXBException(e);
    }
View Full Code Here

Examples of java.io.CharArrayWriter.toCharArray()

        }
        i++;
    } while (i < s.length() && !dontNeedEncoding.get((c = (int) s.charAt(i))));

    charArrayWriter.flush();
    String str = new String(charArrayWriter.toCharArray());
    byte[] ba = str.getBytes(charset);
    for (int j = 0; j < ba.length; j++) {
        out.append('%');
        char ch = Character.forDigit((ba[j] >> 4) & 0xF, 16);
        // converting to use uppercase letter as part of
View Full Code Here

Examples of java.io.CharArrayWriter.toCharArray()

    {
      bufWriter.write(buf, 0, read);
    }
    bufWriter.flush();
   
    return new CharArrayReader(bufWriter.toCharArray());
  }

  protected byte[] readBytes(Integer columnIndex) throws SQLException, IOException
  {
    InputStream is = null;
View Full Code Here

Examples of java.io.CharArrayWriter.toCharArray()

      CharArrayWriter writer = new CharArrayWriter();
      PrintWriter pw = new PrintWriter(writer);
      e.printStackTrace(pw);
      pw.flush();
     
      res.getWriter().print(writer.toCharArray());
    }
    else if (e instanceof ServletException)
      throw (ServletException) e;
    else if (e instanceof IOException)
      throw (IOException) e;
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.