public void encode(OutputStream os, Object obj) throws Exception {
OutputStreamWriter osw = new OutputStreamWriter(os, Constants.SC_CHARACTER_SET);
BufferedWriter bw = new BufferedWriter(osw);
SCMPKeepAlive keepAlive = (SCMPKeepAlive) obj;
if (keepAlive.isReply()) {
SCMPHeaderKey headerKey = SCMPHeaderKey.KRS;
this.writeHeadLine(keepAlive.getSCMPVersion(), bw, headerKey, 0, 0);
} else {
SCMPHeaderKey headerKey = SCMPHeaderKey.KRQ;
this.writeHeadLine(keepAlive.getSCMPVersion(), bw, headerKey, 0, 0);
}
return;
}