fork(1) download
  1. import java.io.*;
  2. import java.util.*;
  3. class Ideone
  4. {
  5. public static void main(String[] args) throws Exception
  6. {
  7. String s = "𝟘𝟙𝟚𝟛";
  8. dos.writeUTF(s);
  9. dos.flush();
  10. byte[] buf = baos.toByteArray();
  11. System.out.println(buf.length);
  12. System.out.println(Arrays.toString(buf));
  13. System.out.println(Arrays.toString(s.getBytes()));
  14. System.out.println(s.getBytes().length);
  15. System.out.println(new String(s.getBytes()));
  16. System.out.println(dis.readUTF());
  17. System.out.println(s.length());
  18. char[] chars = s.toCharArray();
  19. int[] codes = new int[chars.length];
  20. for (int i=0; i<chars.length;i++)
  21. codes[i]=chars[i];
  22. System.out.println(Arrays.toString(codes));
  23. }
  24. }
  25.  
Success #stdin #stdout 0.08s 32464KB
stdin
Standard input is empty
stdout
26
[0, 24, -19, -96, -75, -19, -65, -104, -19, -96, -75, -19, -65, -103, -19, -96, -75, -19, -65, -102, -19, -96, -75, -19, -65, -101]
[-16, -99, -97, -104, -16, -99, -97, -103, -16, -99, -97, -102, -16, -99, -97, -101]
16
𝟘𝟙𝟚𝟛
𝟘𝟙𝟚𝟛
8
[55349, 57304, 55349, 57305, 55349, 57306, 55349, 57307]