@Override public void write(OutputStream outputStream,Storable obj) throws IOException {
  Writer writer=new OutputStreamWriter(outputStream);
  gson.toJson(obj,obj.getClass(),writer);
  writer.close();
}

@ Override public void write ( OutputStream outputStream , Storable obj ) throws IOException { Writer writer = new OutputStreamWriter ( outputStream ) ; gson . toJson ( obj , obj . getClass ( ) , writer ) ; writer . close ( ) ; }
stores the given object on the output stream as json .
