diff --git a/source/net/yacy/cora/protocol/http/HTTPConnector.java b/source/net/yacy/cora/protocol/http/HTTPConnector.java deleted file mode 100644 index 19f85dfd8..000000000 --- a/source/net/yacy/cora/protocol/http/HTTPConnector.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * HttpConnector - * Copyright 2010 by Michael Peter Christen - * First released 25.05.2010 at http://yacy.net - * - * $LastChangedDate$ - * $LastChangedRevision$ - * $LastChangedBy$ - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program in the file lgpl21.txt - * If not, see . - */ - - -package net.yacy.cora.protocol.http; - -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; - -import net.yacy.cora.document.MultiProtocolURI; - -import org.apache.http.entity.mime.content.ContentBody; - -/** - * This Connector is a convenience class to access the protocol-specific http client class. - * @deprecated this class is not used anymore - */ -public class HTTPConnector { - - private static final ConcurrentMap cons = new ConcurrentHashMap(); - private String userAgent; - - private HTTPConnector(String userAgent) { - this.userAgent = userAgent; - } - - public static final HTTPConnector getConnector(String userAgent) { - HTTPConnector c = cons.get(userAgent); - if (c != null) return c; - c = new HTTPConnector(userAgent); - return c; - } - - /** - * send data to the server named by vhost - * - * @param url address of the server - * @param timeout in milliseconds - * @param vhost name of the server at address which should respond - * @param post data to send (name-value-pairs) - * @return response body - * @throws IOException - */ - public byte[] post(final MultiProtocolURI url, final int timeout, final String vhost, final Map post) throws IOException { - return post(url, timeout, vhost, post, false); - } - - /** - * send data to the server named by vhost - * - * @param url address of the server - * @param timeout in milliseconds - * @param vhost name of the server at address which should respond - * @param post data to send (name-value-pairs) - * @param usegzip if the body should be gzipped - * @return response body - * @throws IOException - */ - public byte[] post(final MultiProtocolURI url, final int timeout, final String vhost, final Map post, final boolean usegzip) throws IOException { - final HTTPClient client = new HTTPClient(this.userAgent); - client.setTimout(timeout); - return client.POSTbytes(url, vhost, post, usegzip); - } - -} diff --git a/source/net/yacy/document/parser/html/Evaluation.java b/source/net/yacy/document/parser/html/Evaluation.java index 14735451c..431b6ec58 100644 --- a/source/net/yacy/document/parser/html/Evaluation.java +++ b/source/net/yacy/document/parser/html/Evaluation.java @@ -1,3 +1,27 @@ +/** + * Evaluation + * Copyright 2011 by Michael Peter Christen + * First released 28.04.2011 at http://yacy.net + * + * $LastChangedDate: 2011-03-08 02:51:51 +0100 (Di, 08 Mrz 2011) $ + * $LastChangedRevision: 7567 $ + * $LastChangedBy: low012 $ + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program in the file lgpl21.txt + * If not, see . + */ + package net.yacy.document.parser.html; import java.io.File;