mirror of
https://github.com/Febbweiss/logstash-forwarder-java.git
synced 2026-03-04 22:25:39 +00:00
Changed java.io.RandomAccessFile to ucar.unidata.io.RandomAccessFile.
This commit is contained in:
@@ -21,7 +21,7 @@ import info.fetter.logstashforwarder.util.AdapterException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
//import java.io.RandomAccessFile;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
@@ -29,6 +29,8 @@ import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import ucar.unidata.io.RandomAccessFile;
|
||||
|
||||
public class FileReader extends Reader {
|
||||
private static Logger logger = Logger.getLogger(FileReader.class);
|
||||
private static final byte[] ZIP_MAGIC = new byte[] {(byte) 0x50, (byte) 0x4b, (byte) 0x03, (byte) 0x04};
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package info.fetter.logstashforwarder;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
//import java.io.RandomAccessFile;
|
||||
import java.util.zip.Adler32;
|
||||
|
||||
import ucar.unidata.io.RandomAccessFile;
|
||||
|
||||
public class FileSigner {
|
||||
private static final Adler32 adler32 = new Adler32();
|
||||
|
||||
|
||||
@@ -20,10 +20,13 @@ package info.fetter.logstashforwarder;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
//import java.io.RandomAccessFile;
|
||||
|
||||
|
||||
import org.apache.commons.lang.builder.ToStringBuilder;
|
||||
|
||||
import ucar.unidata.io.RandomAccessFile;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
public class FileState {
|
||||
@@ -56,7 +59,7 @@ public class FileState {
|
||||
this.file = file;
|
||||
directory = file.getCanonicalFile().getParent();
|
||||
fileName = file.getName();
|
||||
randomAccessFile = new RandomAccessFile(file, "r");
|
||||
randomAccessFile = new RandomAccessFile(file.getPath(), "r");
|
||||
lastModified = file.lastModified();
|
||||
size = file.length();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user