00001 package Decoder;
00002
00003 import java.io.BufferedInputStream;
00004 import java.io.DataInputStream;
00005 import java.io.IOException;
00006 import java.io.InputStream;
00007
00008 import CodingUtils.ByteConvertor;
00009
00010 import flatFileToBinaryPackage.LogDecayNormalIndexFlatToBin;
00011
00012 public class MyDataInPutStream extends DataInputStream{
00013
00014 public MyDataInPutStream(InputStream inputStream) {
00015 super(new BufferedInputStream(inputStream));
00016 }
00017
00018 public synchronized int readMyShort(){
00019 int getal=0;
00020 try{
00021 getal=(int)super.readShort();
00022 }catch(IOException exception){
00023 exception.printStackTrace(System.out);
00024 }
00025
00026 return getal;
00027 }
00028
00029
00030 public synchronized void readMyBytes(int[] bytes) throws IOException{
00031 for(int i=0;i!=bytes.length;i++){
00032 bytes[i]=readMyByte();
00033 }
00034 }
00035
00036 public synchronized int readMyByte() throws IOException{
00037 byte b=super.readByte();
00038 return ByteConvertor.javabyteToMyByte(b);
00039 }
00040
00041
00042 }