/*
- * jSite2 - FcpConnectionHandler.java -
- * Copyright © 2008 David Roden
+ * jFCPlib - FcpConnectionHandler.java - Copyright © 2008 David Roden
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* Handles an FCP connection to a node.
- *
+ *
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
class FcpConnectionHandler implements Runnable {
/**
* Creates a new connection handler that operates on the given connection
* and input stream.
- *
+ *
* @param fcpConnection
* The underlying FCP connection
* @param remoteInputStream
fcpMessage = new FcpMessage(line);
continue;
}
- if ("EndMessage".equals(line) || "Data".equals(line)) {
+ if ("EndMessage".equalsIgnoreCase(line) || "Data".equalsIgnoreCase(line)) {
fcpConnection.handleMessage(fcpMessage);
fcpMessage = null;
}
/**
* Reads bytes from {@link #remoteInputStream} until ‘\r’ or ‘\n’ are
* encountered and decodes the read bytes using UTF-8.
- *
+ *
* @return The decoded line
* @throws IOException
* if an I/O error occurs