Permalink
Browse files

writeRaw() added to LogFileWriter

  • Loading branch information...
1 parent 7b564ec commit 2e58611d95e2c0b10524b9a5697ba2be13ab391a @jjenkov committed Jul 11, 2016
Showing with 5 additions and 3 deletions.
  1. +1 −1 pom.xml
  2. +4 −2 src/main/java/com/jenkov/iap/file/LogFileWriter.java
View
@@ -6,7 +6,7 @@
<groupId>com.jenkov</groupId>
<artifactId>iap-tools</artifactId>
- <version>0.8.5</version>
+ <version>0.8.6</version>
<dependencies>
@@ -28,9 +28,7 @@ public LogFileWriter(FileWriter fileWriter, byte[] tempBuffer) {
}
-
public void writeRecord(byte[] source, int sourceOffset, int sourceLength) {
-
this.calendar.setTimeInMillis(System.currentTimeMillis());
this.ionWriter.writeUtc(this.calendar, 9); // time stamp including milliseconds
@@ -44,4 +42,8 @@ public void flushToDisk() throws IOException {
this.ionWriter.setDestination(this.buffer, 0);
}
+ public void writeRaw(byte[] source, int sourceOffset, int sourceLength) throws IOException {
+ this.fileWriter.write(source, sourceOffset, sourceLength);
+ this.fileWriter.flush();
+ }
}

0 comments on commit 2e58611

Please sign in to comment.