### Question:
PECharsetUtils { public static String getString(byte[] bytesIn, Charset cs) { return getString(bytesIn, cs, false); } private  PECharsetUtils(); static String getString(byte[] bytesIn, Charset cs); static String getString(byte[] bytesIn, Charset cs, boolean checkIfValid ); static byte[] getBytes(String stringIn, Charset cs); static byte[] getBytes(String stringIn, Charset cs, boolean checkIfValid); static final Charset UTF_8; static final Charset ISO_8859_1; static final Charset latin1; }### Answer:
@Ignore @Test public void blobTest() throws Exception { Charset cs = PECharsetUtils.UTF_8; for ( int i = 0; i<255; i++ ) { ByteBuffer bb = ByteBuffer.allocate(2); byte b = (byte) i; if (b == '\\' || b == '\'') { byte p = '\\'; bb.put(p); } bb.put((byte) i); System.out.println("Trying " + new String(bb.array(),cs)); if ( PECharsetUtils.getString(bb.array(), cs, true) == null ) System.out.println("************** Failed on character " + i); } }