Network Utilities Realease-Notes Author: Manfred Duchrow Copyright (c) 2002-2017, by Manfred Duchrow. All rights reserved. ======================================================================= ----------------------------------------------------------------------- VERSION 3.1.0 (09/11/2017), 147 Unit Tests * Dependencies upgrade * Upgrade from Junit3 to 4 ----------------------------------------------------------------------- VERSION 3.0.1 (05/05/2017), 147 Unit Tests * Fixed query parameter handling Supports now parameters without values and with multiple values. UniformResourceLocator > Added - public String asString() - public void addToParameter(String name, String... values) - public List getQueryParameterNames() > Changed signature - public void setParameter(String name, String... values) ----------------------------------------------------------------------- VERSION 3.0.0 (18/02/2017), 143 Unit Tests * Migrated > Maven -> Gradle > SVN -> Git * Package renaming 'org.pf' -> 'org.pfsw' * Bugfix > UserAgent.retrieveResponse(HttpURLConnection, IResponseStreamHandler) - use error stream if response code is >= 400 ----------------------------------------------------------------------- VERSION 2.2.1 (30/12/2016), 143 Unit Tests * CommunicationData > Changed methods to be based on header "Content-Type" rather than instance variables > Added - public void setContentType(MediaType contentType, Charset charset) - public MediaType getContentMediaType() - public void setContentMediaType(MediaType contentType) - public Charset getCharset() - public void setCharset(Charset charset) > Deprecated - public MediaType getContentType() - public void setContentType(MediaType contentType) - public Charset getEncoding() - public void setEncoding(Charset encoding) ----------------------------------------------------------------------- VERSION 2.2.0 (11/06/2016), 135 Unit Tests * HttpUtil > Added - public long download(URL url, File file) - public long download(URL url, File file, Proxy proxy) - public long download(URL url, File file, IProgressListener listener) - public long download(URL url, File file, Proxy proxy, IProgressListener listener) - public long download(URL url, File file, Proxy proxy, int bufferSize, IProgressListener listener) - public long download(URL url, OutputStream outputStream, Proxy proxy, int bufferSize, IProgressListener listener) - public long download(final ClientRequest request, final OutputStream outputStream, final Proxy proxy, final int bufferSize, final IProgressListener listener) * UserAgent > Added - inst-var proxy with getter/setter - public UserAgent(Proxy proxy) - public ServerResponse sendRequest(ClientRequest request, IResponseStreamHandler responseStreamHandler) ----------------------------------------------------------------------- VERSION 2.1.1 (28/02/2016), 134 Unit Tests * Bugfix: Support "Transport-Encoding: chunked" in responses. ----------------------------------------------------------------------- VERSION 2.1.0 (22/05/2015), 130 Unit Tests * New classes > AuthorizationHeader * HttpUtil > Added - public AuthorizationHeader parseAuthorizationHeaderValue(String headerValue) ----------------------------------------------------------------------- VERSION 2.1.0 (10/05/2015), 117 Unit Tests * NetUtil > Added - public String withLeadingSlash(String string) - public String withTrailingSlash(String string) - public String withoutLeadingSlash(String string) - public String withoutTrailingSlash(String string) ----------------------------------------------------------------------- VERSION 2.0.0 (29/11/2014), 109 Unit Tests * Upgraded to Java 6 * Moved all classes (except UniformResourceLocator) to other component (PF-Server). * UniformResourceLocator > Added - public static int getDefaultPortForScheme(String scheme) - public void appendPath(String path) - public void setPathRelative(String path) > Added new constructors - public UniformResourceLocator(String scheme, String serverName, String requestURI, String... queryParams) - public UniformResourceLocator(String scheme, String serverName, int port, String requestURI, String... queryParams) > Improved check for malformed URLs when parsing > Added Serializable * New classes > NetUtil > HttpUtil > HttpMethod > UserAgent > ClientRequest > ServerResponse > RequestHeaderNames > ResponseHeaderNames ----------------------------------------------------------------------- VERSION 1.6 (September 30, 2012), 39 Unit Tests * RequestServer > Added - inst-var connectionIdleTimeout with getter/setter - public RequestServer(int port, int idleTimeout) - public RequestServer(int port, int idleTimeout, ExceptionHandler exHandler) - public int getPort() > Changed methods to handle SocketTimeoutException by closing the connection - BinarySocketConnection.getData() - TextSocketConnection.readLine() * BinaryRequestServer > Added constructors - public BinaryRequestServer(int port, ExceptionHandler exHandler) - public BinaryRequestServer(int port, int idleTimeout, ExceptionHandler exHandler) - public BinaryRequestServer(int port, int idleTimeout) - public BinaryRequestServer(int port) * TextRequestServer > Added constructors - public TextRequestServer(int port, ExceptionHandler exHandler) - public TextRequestServer(int port, int idleTimeout, ExceptionHandler exHandler) - public TextRequestServer(int port, int idleTimeout) - public TextRequestServer(int port) * UniformResourceLocator > Added - public void clearParameters() - public int getNumberOfParameters() > Changed signature public Enumeration getParameterNames() to public Enumeration getParameterNames() ----------------------------------------------------------------------- VERSION 1.5 ( September 15, 2011 ) * UniformResourceLocator > Added - public void removeParameter(String name) ----------------------------------------------------------------------- VERSION 1.4 ( November 17, 2010 ) * New dependency > PF-Text * New classes > UniformResourceLocator ----------------------------------------------------------------------- VERSION 1.3 ( August 23, 2006 ) * BinarySocketConnection > Changed public byte[] getData() to block until data comes in which avoids unnecessary cpu time consuming looping * PortListener > Added - public boolean isOpen() - public int getPort() * RequestServer > Changed initialize() to check isOpen() of PortListener and to react accordingly > Changed return value of initialize() to boolean > Moved all logic from run() to new method - protected void listen() > Changed run() to close the socket in case of a RuntimeException ----------------------------------------------------------------------- VERSION 1.2 ( July 30, 2004 ) * New classes - SocketConnection - RequestProcessor - RequestServer - BinarySocketConnection - BinaryRequestServer * TextSocketConnection - Changed superclass to SocketConnection - Moved many methods to new superclass SocketConnection * TextRequestProcessor - Changed super interface to RequestProcessor ----------------------------------------------------------------------- VERSION 1.1 ( February 28, 2003 ) * Moved interface ExceptionHandler from PF-Net to PF-Utilities * Moved class ExceptionIgnorer from PF-Net to PF-Utilities ----------------------------------------------------------------------- VERSION 1.0 ( December 3, 2002 ) * Initial version with the following classes - BaseTextRequestProcessor - ConnectionPool - ExceptionHandler - ExceptionIgnorer - PortListener - TextRequestProcessor - TextRequestServer - TextSocketConnection -----------------------------------------------------------------------