fix in html parser and bookmark generation

pull/1/head
Michael Peter Christen 12 years ago
parent 51e7ab4f70
commit 6a4878940b

@ -32,6 +32,7 @@ package net.yacy.data;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@ -104,7 +105,7 @@ public class BookmarkDate {
public Entry(final String mydate){
//round to seconds, but store as milliseconds (java timestamp)
date = String.valueOf((Long.parseLong(mydate)/1000)*1000);
date = String.valueOf(((mydate == null ? System.currentTimeMillis() : Long.parseLong(mydate))/1000)*1000);
mem = new HashMap<String, String>();
mem.put(URL_HASHES, "");
}

@ -493,6 +493,7 @@ public final class TransformerWriter extends Writer {
@Override
public void close() throws IOException {
flush();
final char quotechar = (this.inSingleQuote) ? singlequote : doublequote;
if (this.buffer != null) {
if (this.buffer.length() > 0) {

@ -208,7 +208,7 @@ public class htmlParser extends AbstractParser implements Parser {
} finally {
writer.flush();
sourceStream.close();
//writer.close();
writer.close();
}
//OutputStream hfos = new htmlFilterOutputStream(null, scraper, null, false);
//serverFileUtils.copy(sourceFile, hfos);

Loading…
Cancel
Save