]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.lz4/src/org/simantics/lz4/impl/LZ4OutputStream.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.lz4 / src / org / simantics / lz4 / impl / LZ4OutputStream.java
index e9c8510684243b7f074b98165f6a80c51abe10a8..5ce6211087ff7e78756a22fe674a7266391e816a 100644 (file)
@@ -1,62 +1,62 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2012 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.lz4.impl;\r
-\r
-import java.io.File;\r
-import java.io.FileNotFoundException;\r
-import java.io.FileOutputStream;\r
-import java.io.IOException;\r
-import java.io.OutputStream;\r
-import java.nio.ByteBuffer;\r
-import java.nio.channels.WritableByteChannel;\r
-\r
-import org.simantics.compressions.impl.CompressingOutputStream;\r
-import org.simantics.lz4.LZ4;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class LZ4OutputStream extends CompressingOutputStream {\r
-\r
-    public LZ4OutputStream(File file) throws FileNotFoundException {\r
-        super(file);\r
-    }\r
-\r
-    public LZ4OutputStream(FileOutputStream stream) {\r
-        super(stream);\r
-    }\r
-    \r
-    public LZ4OutputStream(OutputStream output) {\r
-        super(output);\r
-    }\r
-\r
-    \r
-    public LZ4OutputStream(OutputStream stream, WritableByteChannel channel) {\r
-        super(stream, channel);\r
-    }\r
-\r
-    @Override\r
-    protected int compressBound(int inputSize) {\r
-        return LZ4.compressBound(inputSize);\r
-    }\r
-\r
-    @Override\r
-    protected int compress(ByteBuffer uncompressed, int uncompressedOffset, int uncompressedSize,\r
-            ByteBuffer compressed, int compressedOffset) throws IOException {\r
-        return LZ4.compressBuffer(uncompressed, uncompressedOffset, uncompressedSize, compressed, compressedOffset);\r
-    }\r
-\r
-    protected ByteBuffer allocateBuffer(int capacity) {\r
-        return ByteBuffer.allocateDirect(capacity);\r
-    }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2012 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.lz4.impl;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.ByteBuffer;
+import java.nio.channels.WritableByteChannel;
+
+import org.simantics.compressions.impl.CompressingOutputStream;
+import org.simantics.lz4.LZ4;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class LZ4OutputStream extends CompressingOutputStream {
+
+    public LZ4OutputStream(File file) throws FileNotFoundException {
+        super(file);
+    }
+
+    public LZ4OutputStream(FileOutputStream stream) {
+        super(stream);
+    }
+    
+    public LZ4OutputStream(OutputStream output) {
+        super(output);
+    }
+
+    
+    public LZ4OutputStream(OutputStream stream, WritableByteChannel channel) {
+        super(stream, channel);
+    }
+
+    @Override
+    protected int compressBound(int inputSize) {
+        return LZ4.compressBound(inputSize);
+    }
+
+    @Override
+    protected int compress(ByteBuffer uncompressed, int uncompressedOffset, int uncompressedSize,
+            ByteBuffer compressed, int compressedOffset) throws IOException {
+        return LZ4.compressBuffer(uncompressed, uncompressedOffset, uncompressedSize, compressed, compressedOffset);
+    }
+
+    protected ByteBuffer allocateBuffer(int capacity) {
+        return ByteBuffer.allocateDirect(capacity);
+    }
+
+}