X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=android%2Fsrc%2Fnet%2Fsf%2Fopenrocket%2Fandroid%2Fthrustcurve%2FDownloadResponseParser.java;h=abf9d99f87a6a1e6952b49e8da98e9fed5c1164f;hb=4095cb0dd61a75b7b6b0bd811f8e803af5b27919;hp=82997829f3fc3bd0f76781711c8b2f5b34475d9a;hpb=d8c0c88eb3c2d07610d1e066de25d436fc49d245;p=debian%2Fopenrocket diff --git a/android/src/net/sf/openrocket/android/thrustcurve/DownloadResponseParser.java b/android/src/net/sf/openrocket/android/thrustcurve/DownloadResponseParser.java index 82997829..abf9d99f 100644 --- a/android/src/net/sf/openrocket/android/thrustcurve/DownloadResponseParser.java +++ b/android/src/net/sf/openrocket/android/thrustcurve/DownloadResponseParser.java @@ -2,6 +2,8 @@ package net.sf.openrocket.android.thrustcurve; import java.io.InputStream; +import net.sf.openrocket.android.util.AndroidLogWrapper; + import org.xml.sax.Attributes; import android.sax.Element; @@ -9,13 +11,10 @@ import android.sax.EndElementListener; import android.sax.EndTextElementListener; import android.sax.RootElement; import android.sax.StartElementListener; -import android.util.Log; import android.util.Xml; public class DownloadResponseParser { - private static final String TAG = "DownloadResponseParser"; - private static final String thrustcurveURI = "http://www.thrustcurve.org/2009/DownloadResponse"; private static final String root_tag = "download-response"; @@ -45,7 +44,7 @@ public class DownloadResponseParser { rootEl.setStartElementListener( new StartElementListener() { public void start(Attributes arg0) { - Log.d(TAG,"Start Element error"); + AndroidLogWrapper.d(TAG,"Start Element error"); ret.setError("IsError"); } } @@ -57,7 +56,7 @@ public class DownloadResponseParser { new StartElementListener() { @Override public void start(Attributes arg0) { - Log.d(TAG,"Start Element result"); + AndroidLogWrapper.d(DownloadResponseParser.class,"Start Element result"); currentMotor.init(); } } @@ -73,11 +72,11 @@ public class DownloadResponseParser { try { s = Base64Decoder.decodeData(current_data.s); } catch ( Exception ex ) { - Log.d(TAG,"base64: " + ex.getMessage()); + AndroidLogWrapper.d(DownloadResponseParser.class,"base64: " + ex.getMessage()); } currentMotor.decodeFile( s ); + ret.add((MotorBurnFile)currentMotor.clone()); } - ret.add((MotorBurnFile)currentMotor.clone()); } } );