X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.fastlz%2Fsrc%2Forg%2Fsimantics%2Ffastlz%2Fimpl%2FFastLZInputStream.java;h=73f291ad38c192a755f64336ac893921393a349c;hb=0807209928f01e95669af6aeb671110209774bc6;hp=1c6ec2e6827588018654c32df14d5c4759b737bc;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.fastlz/src/org/simantics/fastlz/impl/FastLZInputStream.java b/bundles/org.simantics.fastlz/src/org/simantics/fastlz/impl/FastLZInputStream.java index 1c6ec2e68..73f291ad3 100644 --- a/bundles/org.simantics.fastlz/src/org/simantics/fastlz/impl/FastLZInputStream.java +++ b/bundles/org.simantics.fastlz/src/org/simantics/fastlz/impl/FastLZInputStream.java @@ -1,52 +1,52 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 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.fastlz.impl; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.nio.ByteBuffer; -import java.nio.channels.ReadableByteChannel; - -import org.simantics.compressions.impl.DecompressingInputStream; -import org.simantics.fastlz.FastLZ; - -/** - * @author Hannu Niemistö - */ -public class FastLZInputStream extends DecompressingInputStream { - - public FastLZInputStream(File file) throws FileNotFoundException { - super(file); - } - - public FastLZInputStream(FileInputStream stream) { - super(stream); - } - - public FastLZInputStream(InputStream stream) { - super(stream); - } - - public FastLZInputStream(InputStream stream, ReadableByteChannel channel) { - super(stream, channel); - } - - @Override - public void decompress(ByteBuffer compressed, int compressedOffset, int compressedSize, - ByteBuffer uncompressed, int uncompressedOffset, int uncompressedSize) throws IOException { - FastLZ.decompressBuffer(compressed, 0, compressedSize, uncompressed, 0, uncompressedSize); - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 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.fastlz.impl; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.nio.ByteBuffer; +import java.nio.channels.ReadableByteChannel; + +import org.simantics.compressions.impl.DecompressingInputStream; +import org.simantics.fastlz.FastLZ; + +/** + * @author Hannu Niemistö + */ +public class FastLZInputStream extends DecompressingInputStream { + + public FastLZInputStream(File file) throws FileNotFoundException { + super(file); + } + + public FastLZInputStream(FileInputStream stream) { + super(stream); + } + + public FastLZInputStream(InputStream stream) { + super(stream); + } + + public FastLZInputStream(InputStream stream, ReadableByteChannel channel) { + super(stream, channel); + } + + @Override + public void decompress(ByteBuffer compressed, int compressedOffset, int compressedSize, + ByteBuffer uncompressed, int uncompressedOffset, int uncompressedSize) throws IOException { + FastLZ.decompressBuffer(compressed, 0, compressedSize, uncompressed, 0, uncompressedSize); + } + +}