@Override public Response onLine(SMTPSession session, ByteBuffer line) { String charset = session.getCharset().name(); try { byte[] l; if (line.hasArray()) { l = line.array(); } else { l = new byte[line.remaining()]; line.get(l); } return handleCommand(session, new String(l, charset)); } catch (UnsupportedEncodingException e) { throw new RuntimeException("No " + charset + " support!"); } }
String charset = session.getCharset().name();