00001 package commandline.flatFileToBinaryPackage;
00002
00003 import java.io.DataOutputStream;
00004 import java.io.IOException;
00005 import java.io.OutputStream;
00006
00007 public class MyDataOutPutStream extends DataOutputStream{
00008
00009 public MyDataOutPutStream(OutputStream arg0) {
00010 super(arg0);
00011 }
00012
00013 public void writeMyShort(int getal) throws IOException{
00014 super.writeShort(getal);
00015 }
00016
00017 public void writeMyFloat(float getal) throws IOException{
00018 super.writeFloat(getal);
00019 }
00020
00021
00025 public void write(byte[] b) throws IOException{
00026 super.write(b);
00027 }
00028
00034 public void writeMyInt(int getal) throws IOException{
00035 super.writeInt(getal);
00036 }
00037
00044 public static int getPositiveIntOfNegativeShort(int getal){
00045
00046 if(getal>0) return getal;
00047 int waarde= getal+(int)Math.pow(2,16);
00048 return waarde;
00049 }
00050
00051 }