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 b20e359e10bda3c58aa1cbb8988f693c5392d647..f105f1aaa0e21e7d990bf782c2d2cb2e19f3a114 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);