Home | History | Annotate | Download | only in dicttool
      1 /**
      2  * Copyright (C) 2012 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
      5  * use this file except in compliance with the License. You may obtain a copy of
      6  * the License at
      7  *
      8  * http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
     12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
     13  * License for the specific language governing permissions and limitations under
     14  * the License.
     15  */
     16 
     17 package com.android.inputmethod.latin.dicttool;
     18 
     19 import java.io.InputStream;
     20 import java.io.OutputStream;
     21 
     22 public class Crypt {
     23     private Crypt() {
     24         // This container class is not publicly instantiable.
     25     }
     26 
     27     public static OutputStream getCryptedStream(final OutputStream out) {
     28         // Encryption is not supported
     29         return out;
     30     }
     31 
     32     public static InputStream getDecryptedStream(final InputStream in) {
     33         // Decryption is not supported
     34         return in;
     35     }
     36 
     37     static public class Encrypter extends Dicttool.Command {
     38         public static final String COMMAND = "encrypt";
     39 
     40         public Encrypter() {
     41         }
     42 
     43         @Override
     44         public String getHelp() {
     45             return COMMAND + " <src_filename> <dst_filename>: Encrypts a file";
     46         }
     47 
     48         @Override
     49         public void run() {
     50             throw new UnsupportedOperationException();
     51         }
     52     }
     53 
     54     static public class Decrypter extends Dicttool.Command {
     55         public static final String COMMAND = "decrypt";
     56 
     57         public Decrypter() {
     58         }
     59 
     60         @Override
     61         public String getHelp() {
     62             return COMMAND + " <src_filename> <dst_filename>: Decrypts a file";
     63         }
     64 
     65         @Override
     66         public void run() {
     67             throw new UnsupportedOperationException();
     68         }
     69     }
     70 }
     71