*) Trying to set the document title properly

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@154 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
theli 2005-05-23 08:32:22 +00:00
parent 285936d778
commit 7994c485f1

View File

@ -125,6 +125,14 @@ public class pdfParser extends AbstractParser implements Parser {
byte[] contents = out.toByteArray();
if ((docTitle == null) || (docTitle.length() == 0)) {
docTitle = ((contents.length > 80)? new String(contents, 0, 80):new String(contents)).
replaceAll("\r\n"," ").
replaceAll("\n"," ").
replaceAll("\r"," ").
replaceAll("\t"," ");
}
/*
* public document(URL location, String mimeType,
String keywords, String shortTitle, String longTitle,