sb.append('\n');
Iterator<IoSession> sessionIterator = sessions.values().iterator();
while (sessionIterator.hasNext()) {
FtpIoSession managedSession = new FtpIoSession(sessionIterator
.next(), context);
if (!managedSession.isLoggedIn()) {
continue;
}
User tmpUsr = managedSession.getUser();
sb.append(StringUtils.pad(tmpUsr.getName(), ' ', true, 16));
if (managedSession.getRemoteAddress() instanceof InetSocketAddress) {
sb.append(StringUtils.pad(((InetSocketAddress) managedSession
.getRemoteAddress()).getAddress().getHostAddress(),
' ', true, 16));
}
sb.append(StringUtils.pad(DateUtils.getISO8601Date(managedSession
.getLoginTime().getTime()), ' ', true, 20));
sb.append(StringUtils.pad(DateUtils.getISO8601Date(managedSession
.getLastAccessTime().getTime()), ' ', true, 20));
sb.append('\n');
}
sb.append('\n');
session.write(new DefaultFtpReply(FtpReply.REPLY_200_COMMAND_OKAY, sb