00001 package Decoder;
00002
00003 import java.io.IOException;
00004 import java.io.InputStream;
00005 import java.io.PrintStream;
00006
00007 import CodingUtils.ByteConvertor;
00008
00009 import flatFileToBinaryPackage.LogDecayNormalIndexFlatToBin;
00010
00011 public class MyTestDataInputStream extends MyDataInPutStream {
00012
00013 PrintStream printStream;
00014 public MyTestDataInputStream(InputStream inputStream,PrintStream printStream) {
00015 super(inputStream);
00016 this.printStream=printStream;
00017
00018 }
00019
00020 public synchronized int readMyShort(){
00021 int read= super.readMyShort();
00022 printStream.println(read);
00023 return read;
00024 }
00025
00026 public void close() throws IOException{
00027 super.close();
00028 printStream.flush();
00029 printStream.close();
00030 }
00031
00032 public synchronized int readMyByte() throws IOException{
00033 int integ=super.readMyByte();
00034 String[] strarray=ByteConvertor.getStringArrayOfBitsFor(integ,8);
00035 for(String str:strarray){
00036 printStream.print(str);
00037 }
00038 printStream.println();
00039 return integ;
00040 }
00041
00042 public synchronized void readMyBytes(int[] bytes) throws IOException{
00043 super.readMyBytes(bytes);
00044 }
00045
00046
00047 }