19 package org.sleuthkit.datamodel;
21 import java.io.BufferedOutputStream;
22 import java.io.IOException;
23 import java.io.OutputStream;
34 private long encodedDataLength;
47 encodedDataLength = 0;
67 private void writeHeader() throws IOException {
69 write(EncodedFileUtil.getEncodedHeader(type), 0, EncodedFileUtil.getHeaderLength());
70 encodedDataLength -= EncodedFileUtil.getHeaderLength();
74 public void write(
int b)
throws IOException {
75 super.write((
int) EncodedFileUtil.encodeByte((byte) b, type));
84 byte[] encodedData =
new byte[b.length];
85 for (
int i = 0; i < b.length; i++) {
86 encodedData[i] = EncodedFileUtil.encodeByte(b[i], type);
89 super.write(encodedData, off, len);
90 encodedDataLength += len;
101 return encodedDataLength;
EncodedFileOutputStream(OutputStream out, int size, TskData.EncodingType type)
EncodedFileOutputStream(OutputStream out, TskData.EncodingType type)
void write(byte[] b, int off, int len)