Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
replaced tmp file extensions by prt
orbiterbead0006da08
diff --git a/source/de/anomic/content/dao/PhpBB3Dao.java b/source/de/anomic/content/dao/PhpBB3Dao.javaindex 6ecbe0d26..ae02f6a65 100644--- a/source/de/anomic/content/dao/PhpBB3Dao.java+++ b/source/de/anomic/content/dao/PhpBB3Dao.java@@ -319,7 +319,7 @@ public class PhpBB3Dao implements Dao {int c = 0;while ((e = queue.take()) != DCEntry.poison) {if (osw == null) {- outputfiletmp = new File(targetdir, targethost + "." + versioninfo + "." + fc + ".xml.tmp");+ outputfiletmp = new File(targetdir, targethost + "." + versioninfo + "." + fc + ".xml.prt");outputfile = new File(targetdir, targethost + "." + versioninfo + "." + fc + ".xml");if (outputfiletmp.exists()) outputfiletmp.delete();if (outputfile.exists()) outputfile.delete();diff --git a/source/de/anomic/kelondro/blob/BLOBArray.java b/source/de/anomic/kelondro/blob/BLOBArray.javaindex 5b2d8ea13..d19e25ad0 100755--- a/source/de/anomic/kelondro/blob/BLOBArray.java+++ b/source/de/anomic/kelondro/blob/BLOBArray.java@@ -108,7 +108,7 @@ public class BLOBArray implements BLOB {// delete unused temporary filesboolean deletions = false;for (int i = 0; i < files.length; i++) {- if (files[i].endsWith(".tmp")) {+ if (files[i].endsWith(".tmp") || files[i].endsWith(".prt")) {FileUtils.deletedelete(new File(heapLocation, files[i]));deletions = true;}@@ -642,7 +642,7 @@ public class BLOBArray implements BLOB {}assert i1.hasNext();assert i2.hasNext();- File tmpFile = new File(newFile.getParentFile(), newFile.getName() + ".tmp");+ File tmpFile = new File(newFile.getParentFile(), newFile.getName() + ".prt");HeapWriter writer = new HeapWriter(tmpFile, newFile, keylength, order, writeBuffer);merge(i1, i2, order, writer);try {diff --git a/source/de/anomic/kelondro/blob/Gap.java b/source/de/anomic/kelondro/blob/Gap.javaindex 1c75bdd04..973d0c163 100644--- a/source/de/anomic/kelondro/blob/Gap.java+++ b/source/de/anomic/kelondro/blob/Gap.java@@ -84,7 +84,7 @@ public class Gap extends TreeMap<Long, Integer> {* @throws IOException*/public int dump(File file) throws IOException {- File tmp = new File(file.getParentFile(), file.getName() + ".tmp");+ File tmp = new File(file.getParentFile(), file.getName() + ".prt");Iterator<Map.Entry<Long, Integer>> i = this.entrySet().iterator();DataOutputStream os = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(tmp), 4 * 1024 * 1024));int c = 0;diff --git a/source/de/anomic/kelondro/index/LongHandleIndex.java b/source/de/anomic/kelondro/index/LongHandleIndex.javaindex 70ed6ccd5..03eb839c9 100644--- a/source/de/anomic/kelondro/index/LongHandleIndex.java+++ b/source/de/anomic/kelondro/index/LongHandleIndex.java@@ -101,7 +101,7 @@ public class LongHandleIndex {// we must use an iterator from the combined index, because we need the entries sorted// otherwise we could just write the byte[] from the in kelondroRowSet which would make// everything much faster, but this is not an option here.- File tmp = new File(file.getParentFile(), file.getName() + ".tmp");+ File tmp = new File(file.getParentFile(), file.getName() + ".prt");Iterator<Row.Entry> i = this.index.rows(true, null);OutputStream os = new BufferedOutputStream(new FileOutputStream(tmp), 4 * 1024 * 1024);if (file.getName().endsWith(".gz")) os = new GZIPOutputStream(os);diff --git a/source/de/anomic/kelondro/text/ReferenceContainerCache.java b/source/de/anomic/kelondro/text/ReferenceContainerCache.javaindex ff75fe564..f77e437d7 100644--- a/source/de/anomic/kelondro/text/ReferenceContainerCache.java+++ b/source/de/anomic/kelondro/text/ReferenceContainerCache.java@@ -91,7 +91,7 @@ public final class ReferenceContainerCache<ReferenceType extends Reference> exteassert this.cache != null;Log.logInfo("indexContainerRAMHeap", "creating rwi heap dump '" + heapFile.getName() + "', " + cache.size() + " rwi's");if (heapFile.exists()) FileUtils.deletedelete(heapFile);- File tmpFile = new File(heapFile.getParentFile(), heapFile.getName() + ".tmp");+ File tmpFile = new File(heapFile.getParentFile(), heapFile.getName() + ".prt");HeapWriter dump;try {dump = new HeapWriter(tmpFile, heapFile, payloadrow.primaryKeyLength, Base64Order.enhancedCoder, writeBuffer);diff --git a/source/de/anomic/kelondro/util/FileUtils.java b/source/de/anomic/kelondro/util/FileUtils.javaindex 912e8da37..9e4c76269 100644--- a/source/de/anomic/kelondro/util/FileUtils.java+++ b/source/de/anomic/kelondro/util/FileUtils.java@@ -435,7 +435,7 @@ public final class FileUtils {}public static void saveSet(final File file, final String format, final Set<byte[]> set, final String sep) throws IOException {- final File tf = new File(file.toString() + ".tmp" + (System.currentTimeMillis() % 1000));+ final File tf = new File(file.toString() + ".prt" + (System.currentTimeMillis() % 1000));OutputStream os = null;if ((format == null) || (format.equals("plain"))) {os = new BufferedOutputStream(new FileOutputStream(tf));@@ -459,7 +459,7 @@ public final class FileUtils {}public static void saveSet(final File file, final String format, final RowSet set, final String sep) throws IOException {- final File tf = new File(file.toString() + ".tmp" + (System.currentTimeMillis() % 1000));+ final File tf = new File(file.toString() + ".prt" + (System.currentTimeMillis() % 1000));OutputStream os = null;if ((format == null) || (format.equals("plain"))) {os = new BufferedOutputStream(new FileOutputStream(tf));diff --git a/source/de/anomic/kelondro/util/XMLTables.java b/source/de/anomic/kelondro/util/XMLTables.javaindex 100b81d32..4ae68c20b 100644--- a/source/de/anomic/kelondro/util/XMLTables.java+++ b/source/de/anomic/kelondro/util/XMLTables.java@@ -80,7 +80,7 @@ public class XMLTables {throw new RuntimeException("Microtables.commit: no file specified");// write first to a temporary file- final File tmpFile = new File(this.propFile.toString() + ".tmp");+ final File tmpFile = new File(this.propFile.toString() + ".prt");// write filefinal XMLEncoder xmlenc = new XMLEncoder(new FileOutputStream(tmpFile));diff --git a/source/de/anomic/plasma/parser/mimeType/mimeTypeParser.java b/source/de/anomic/plasma/parser/mimeType/mimeTypeParser.javaindex 24209c927..27ed518e3 100644--- a/source/de/anomic/plasma/parser/mimeType/mimeTypeParser.java+++ b/source/de/anomic/plasma/parser/mimeType/mimeTypeParser.java@@ -171,7 +171,7 @@ public class mimeTypeParser extends AbstractParser implements Parser {public plasmaParserDocument parse(final yacyURL location, final String mimeType,final String charset, final InputStream source) throws ParserException, InterruptedException {File dstFile = null;try {- dstFile = File.createTempFile("mimeTypeParser",".tmp");+ dstFile = File.createTempFile("mimeTypeParser",".prt");FileUtils.copy(source,dstFile);return parse(location,mimeType,charset,dstFile);} catch (final IOException e) {diff --git a/source/de/anomic/plasma/parser/mimeType/odtDetector.java b/source/de/anomic/plasma/parser/mimeType/odtDetector.javaindex 1b8a6f661..fac15b858 100644--- a/source/de/anomic/plasma/parser/mimeType/odtDetector.java+++ b/source/de/anomic/plasma/parser/mimeType/odtDetector.java@@ -60,7 +60,7 @@ public class odtDetector implements MagicDetector {public String[] process(final byte[] data, final int offset, final int length, final long bitmask, final char comparator, final String mimeType, final Map params) {File dstFile = null;try {- dstFile = File.createTempFile("mimeTypeParser",".tmp");+ dstFile = File.createTempFile("mimeTypeParser",".prt");FileUtils.copy(data,dstFile);return process(dstFile, offset, length, bitmask, comparator, mimeType, params);} catch (final IOException e) {diff --git a/source/de/anomic/plasma/parser/odt/odtParser.java b/source/de/anomic/plasma/parser/odt/odtParser.javaindex 03f13dc0d..65e3e6798 100644--- a/source/de/anomic/plasma/parser/odt/odtParser.java+++ b/source/de/anomic/plasma/parser/odt/odtParser.java@@ -112,7 +112,7 @@ public class odtParser extends AbstractParser implements Parser {// creating a writer for outputif ((contentSize == -1) || (contentSize > Parser.MAX_KEEP_IN_MEMORY_SIZE)) {- writerFile = File.createTempFile("odtParser",".tmp");+ writerFile = File.createTempFile("odtParser",".prt");writer = new OutputStreamWriter(new FileOutputStream(writerFile),"UTF-8");} else {writer = new serverCharBuffer();diff --git a/source/de/anomic/plasma/parser/pdf/pdfParser.java b/source/de/anomic/plasma/parser/pdf/pdfParser.javaindex 5566443cc..55d952b44 100644--- a/source/de/anomic/plasma/parser/pdf/pdfParser.java+++ b/source/de/anomic/plasma/parser/pdf/pdfParser.java@@ -120,7 +120,7 @@ public class pdfParser extends AbstractParser implements Parser {// creating a writer for outputif ((this.contentLength == -1) || (this.contentLength > Parser.MAX_KEEP_IN_MEMORY_SIZE)) {- writerFile = File.createTempFile("pdfParser",".tmp");+ writerFile = File.createTempFile("pdfParser",".prt");writer = new OutputStreamWriter(new FileOutputStream(writerFile),"UTF-8");} else {writer = new serverCharBuffer();diff --git a/source/de/anomic/plasma/parser/rpm/rpmParser.java b/source/de/anomic/plasma/parser/rpm/rpmParser.javaindex af3f15806..e0577d15e 100644--- a/source/de/anomic/plasma/parser/rpm/rpmParser.java+++ b/source/de/anomic/plasma/parser/rpm/rpmParser.java@@ -79,7 +79,7 @@ public class rpmParser extends AbstractParser implements Parser {final InputStream source) throws ParserException {File dstFile = null;try {- dstFile = File.createTempFile("rpmParser",".tmp");+ dstFile = File.createTempFile("rpmParser",".prt");FileUtils.copy(source,dstFile);return parse(location,mimeType,charset,dstFile);} catch (final Exception e) {diff --git a/source/de/anomic/plasma/parser/tar/tarParser.java b/source/de/anomic/plasma/parser/tar/tarParser.javaindex bc0a8b284..14690b040 100644--- a/source/de/anomic/plasma/parser/tar/tarParser.java+++ b/source/de/anomic/plasma/parser/tar/tarParser.java@@ -87,7 +87,7 @@ public class tarParser extends AbstractParser implements Parser {plasmaParserDocument subDoc = null;try {if ((this.contentLength == -1) || (this.contentLength > Parser.MAX_KEEP_IN_MEMORY_SIZE)) {- outputFile = File.createTempFile("zipParser",".tmp");+ outputFile = File.createTempFile("zipParser",".prt");docText = new BufferedOutputStream(new FileOutputStream(outputFile));} else {docText = new ByteBuffer();diff --git a/source/de/anomic/plasma/parser/zip/zipParser.java b/source/de/anomic/plasma/parser/zip/zipParser.javaindex 246d9da55..c6920ed36 100644--- a/source/de/anomic/plasma/parser/zip/zipParser.java+++ b/source/de/anomic/plasma/parser/zip/zipParser.java@@ -85,7 +85,7 @@ public class zipParser extends AbstractParser implements Parser {plasmaParserDocument subDoc = null;try {if ((this.contentLength == -1) || (this.contentLength > Parser.MAX_KEEP_IN_MEMORY_SIZE)) {- outputFile = File.createTempFile("zipParser",".tmp");+ outputFile = File.createTempFile("zipParser",".prt");docText = new BufferedOutputStream(new FileOutputStream(outputFile));} else {docText = new ByteBuffer();diff --git a/source/de/anomic/plasma/plasmaRankingCRProcess.java b/source/de/anomic/plasma/plasmaRankingCRProcess.javaindex 69d174365..1de71aeae 100644--- a/source/de/anomic/plasma/plasmaRankingCRProcess.java+++ b/source/de/anomic/plasma/plasmaRankingCRProcess.java@@ -301,9 +301,9 @@ public class plasmaRankingCRProcess {// save accumulator to temporary fileFile tmp_file;if (to_file.toString().endsWith(".gz")) {- tmp_file = new File(to_file.toString() + "." + (System.currentTimeMillis() % 1000) + ".tmp.gz");+ tmp_file = new File(to_file.toString() + "." + (System.currentTimeMillis() % 1000) + ".prt.gz");} else {- tmp_file = new File(to_file.toString() + "." + (System.currentTimeMillis() % 1000) + ".tmp");+ tmp_file = new File(to_file.toString() + "." + (System.currentTimeMillis() % 1000) + ".prt");}// store the fileacc.toFile(tmp_file);diff --git a/source/de/anomic/tools/mediawikiIndex.java b/source/de/anomic/tools/mediawikiIndex.javaindex 19d3eed21..4bdb17f9e 100644--- a/source/de/anomic/tools/mediawikiIndex.java+++ b/source/de/anomic/tools/mediawikiIndex.java@@ -680,7 +680,7 @@ public class mediawikiIndex extends Thread {if (osw == null) {// start writing a new file- this.outputfilename = targetstub + "." + fc + ".xml.tmp";+ this.outputfilename = targetstub + "." + fc + ".xml.prt";this.osw = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(new File(targetdir, outputfilename))), "UTF-8");osw.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<surrogates xmlns:dc=\"http://purl.org/dc/elements/1.1/\">\n");}@@ -694,7 +694,7 @@ public class mediawikiIndex extends Thread {new File(targetdir, outputfilename).renameTo(new File(targetdir, finalfilename));rc = 0;fc++;- outputfilename = targetstub + "." + fc + ".xml.tmp";+ outputfilename = targetstub + "." + fc + ".xml.prt";osw = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(new File(targetdir, outputfilename))), "UTF-8");osw.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<surrogates xmlns:dc=\"http://purl.org/dc/elements/1.1/\">\n");}