![JAR search and dependency download from the Maven repository](/logo.png)
test.it.unimi.di.mg4j.tool.TestDowncaseTermProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mg4j Show documentation
Show all versions of mg4j Show documentation
MG4J (Managing Gigabytes for Java) is a free full-text search engine for large document collections written in Java.
package it.unimi.di.mg4j.tool;
import static org.junit.Assert.assertTrue;
import it.unimi.di.mg4j.index.DowncaseTermProcessor;
import it.unimi.di.mg4j.index.TermProcessor;
import it.unimi.dsi.fastutil.io.BinIO;
import it.unimi.dsi.fastutil.io.FastByteArrayInputStream;
import it.unimi.dsi.fastutil.io.FastByteArrayOutputStream;
import java.io.IOException;
import org.junit.Test;
public class TestDowncaseTermProcessor {
@Test
public void testReadResolve() throws IOException, ClassNotFoundException {
TermProcessor t = DowncaseTermProcessor.getInstance();
FastByteArrayOutputStream os = new FastByteArrayOutputStream();
BinIO.storeObject( t, os );
assertTrue( t == (TermProcessor)BinIO.loadObject( new FastByteArrayInputStream( os.array ) ) );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy