@Test public void encode_withNonAsciiArgument_shouldReturnEncodedString() throws Exception { String folderName = "über"; String result = folderNameCode.encode(folderName); assertEquals("&APw-ber", result); }
public String encode(String folderName) { ByteBuffer byteBuffer = modifiedUtf7Charset.encode(folderName); byte[] bytes = new byte[byteBuffer.limit()]; byteBuffer.get(bytes); return new String(bytes, asciiCharset); }
FolderNameCodec { public String encode(String folderName) { ByteBuffer byteBuffer = modifiedUtf7Charset.encode(folderName); byte[] bytes = new byte[byteBuffer.limit()]; byteBuffer.get(bytes); return new String(bytes, asciiCharset); } }
FolderNameCodec { public String encode(String folderName) { ByteBuffer byteBuffer = modifiedUtf7Charset.encode(folderName); byte[] bytes = new byte[byteBuffer.limit()]; byteBuffer.get(bytes); return new String(bytes, asciiCharset); } private  FolderNameCodec(); }
FolderNameCodec { public String encode(String folderName) { ByteBuffer byteBuffer = modifiedUtf7Charset.encode(folderName); byte[] bytes = new byte[byteBuffer.limit()]; byteBuffer.get(bytes); return new String(bytes, asciiCharset); } private  FolderNameCodec(); static FolderNameCodec newInstance(); String encode(String folderName); String decode(String encodedFolderName); }
FolderNameCodec { public String encode(String folderName) { ByteBuffer byteBuffer = modifiedUtf7Charset.encode(folderName); byte[] bytes = new byte[byteBuffer.limit()]; byteBuffer.get(bytes); return new String(bytes, asciiCharset); } private  FolderNameCodec(); static FolderNameCodec newInstance(); String encode(String folderName); String decode(String encodedFolderName);  }