KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > h2 > compress > CompressNo


1 /*
2  * Copyright 2004-2006 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
3  * Initial Developer: H2 Group
4  */

5 package org.h2.compress;
6
7 public class CompressNo implements Compresser {
8
9     public int getAlgorithm() {
10         return Compresser.NO;
11     }
12
13     public void setOptions(String JavaDoc options) {
14     }
15     
16     public int compress(byte[] in, int inLen, byte[] out, int outPos) {
17         System.arraycopy(in, 0, out, outPos, inLen);
18         return outPos + inLen;
19     }
20
21     public void expand(byte[] in, int inPos, int inLen, byte[] out, int outPos, int outLen) {
22         System.arraycopy(in, inPos, out, outPos, outLen);
23     }
24
25 }
26
Popular Tags