[Webfunds-commits] java/webfunds/ricardian SOXServer.java
Ian Grigg
iang@cypherpunks.ai
Sat, 24 Mar 2001 12:26:59 -0400 (AST)
iang 01/03/24 12:26:59
Modified: webfunds/ricardian SOXServer.java
Log:
cleanup only
Revision Changes Path
1.18 +9 -63 java/webfunds/ricardian/SOXServer.java
Index: SOXServer.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/ricardian/SOXServer.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- SOXServer.java 2000/10/14 01:23:51 1.17
+++ SOXServer.java 2001/03/24 16:26:59 1.18
@@ -1,5 +1,5 @@
/*
- * $Id: SOXServer.java,v 1.17 2000/10/14 01:23:51 iang Exp $
+ * $Id: SOXServer.java,v 1.18 2001/03/24 16:26:59 iang Exp $
*
* Copyright (c) Systemics Ltd 1995-1999 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -15,19 +15,20 @@
import java.util.Enumeration;
import java.util.Vector;
-import webfunds.utils.*;
+import webfunds.utils.Diagnostics;
+import webfunds.comms.RawHttp;
+import webfunds.comms.RawReplyException;
+import webfunds.comms.RawURLException;
+import webfunds.comms.RawConnectException;
+import webfunds.sox.Encodable;
import webfunds.sox.Issuer;
import webfunds.sox.SmartIssuer;
import webfunds.sox.SOXIssuerException;
import webfunds.sox.SOXLaterException;
-// import webfunds.sox.HttpAgent;
-import webfunds.sox.Encodable;
import webfunds.sox.SOXPacketException;
-import webfunds.sox.SOXLaterException;
-// import webfunds.utils.Debug;
-import webfunds.utils.Diagnostics;
+
/**
* SOX Server File.
* Every SOX server has a file on the web somewhere which
@@ -77,20 +78,6 @@
/////// Constructors /////////////////////////////////////////////
-// Sorry, place taken by Encodable constructor!
-// /**
-// * Create a new SOX Server File from data.
-// * @except SOXServerException if the data is not IniFile Format
-// */
-// public SOXServer(byte[] fileData)
-// throws SOXServerException
-// {
-// debug();
-// this.fileData = fileData;
-// this.originalName = null;
-// init();
-// }
-
public SOXServer(byte[] fileData, String name, PrintWriter bug)
throws SOXServerException
{
@@ -142,34 +129,9 @@
};
refreshServerData();
}
-
-////////////////////////////////////////////////////////////////////
-// Doesn't work. Dunno why, length read back is negative.
-// //
-// // Not sure about this. Store requires it.
-// // We only need the data, not the rest.
-// //
-// private void writeObject(java.io.ObjectOutputStream out)
-// throws IOException
-// {
-// int len = fileData.length;
-//logmsg ("LEN == " + len);
-// out.write(len);
-// out.write(fileData);
-// }
-// private void readObject(java.io.ObjectInputStream in)
-// throws IOException, ClassNotFoundException
-// {
-// int len = in.readInt();
-//logmsg ("LEN == " + len);
-// fileData = new byte[len];
-// in.read(fileData, 0, len);
-// this.originalName = null;
-// }
-////////////////////////////////////////////////////////////////////
+
-
////// Recover, Save /////////////////////////////////////
public void encode(OutputStream os)
@@ -263,22 +225,6 @@
ex.printStackTrace();
throw new SOXServerException("bad url?\n" + ex);
}
-// try {
-// // do a Get on the URL
-// InputStream is = url.openStream();
-// data = new byte[is.available()];
-// is.read(data);
-// is.close();
-// } catch (FileNotFoundException ex) {
-// throw new SOXServerException(ex.getMessage() +
-// "\n\nThe server file <<" + url + ">> is not found.\n" +
-// "Check this URL (as found in the contract local file).");
-// } catch (java.net.ConnectException ex) {
-// throw new SOXLaterException("no net!\n" + ex);
-// } catch (IOException ex) {
-// ex.printStackTrace();
-// throw new SOXServerException("bad net?\n" + ex);
-// }
return new SOXServer(data, url+"", bug) ;
}