00001 00002 import java.nio.*; 00003 import java.nio.charset.CharacterCodingException; 00004 import java.nio.charset.Charset; 00005 import java.nio.charset.CharsetEncoder; 00006 00007 import umontreal.iro.lecuyer.probdist.BetaDist; 00008 import edu.tum.cs.bayesnets.core.BeliefNetworkEx; 00009 00010 public class Test { 00011 00012 private static class InnerA { 00013 private int foo; 00014 } 00015 00016 private static class InnerB { 00017 void doSomething(InnerA a) { 00018 a.foo = 1; 00019 } 00020 } 00021 00022 public static void main(String[] args) throws CharacterCodingException { 00023 Charset charset = Charset.forName("UTF-8"); 00024 CharsetEncoder encoder = charset.newEncoder(); 00025 byte[] array = new byte[]{65, 66, 67}; 00026 ByteBuffer bbuf = ByteBuffer.allocate(array.length); 00027 bbuf.put(array); 00028 ByteBuffer encoded = encoder.encode(bbuf.asCharBuffer()); 00029 String s = bbuf.asCharBuffer().toString(); 00030 System.out.println(s); 00031 } 00032 }