chiark / gitweb /
write jarrg-debug-pctb-marketdata.gz
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 5 Sep 2010 11:59:36 +0000 (12:59 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 5 Sep 2010 11:59:36 +0000 (12:59 +0100)
src/com/tedpearson/ypp/market/MarketUploader.java

index b20e359..f105f1a 100644 (file)
@@ -557,7 +557,15 @@ public class MarketUploader implements TopLevelWindowListener, GUIInitializedLis
                    writeBuySellOffers(buys,sells,offerCount,out);
                    out.finish();
                    progresslog("pctb send...");
-                   InputStream in = sendInitialData(new ByteArrayInputStream(outStream.toByteArray()));
+
+                   byte[] ba = outStream.toByteArray();
+                   if (dtxt!=null) {
+                       FileOutputStream dbgdata = new FileOutputStream(new File("jarrg-debug-pctb-marketdata.gz"));
+                       dbgdata.write(ba);
+                       dbgdata.close();
+                   }
+
+                   InputStream in = sendInitialData(new ByteArrayInputStream(ba));
                    progresslog("pctb sent.");
                    if (in == null) return;
                    pm.setProgress(80);