Gunzip a Socket InputStream

Hi all,
I have a little problem with the GZIPInputStream class. In my application I extend the BufferedInputStream to read the InputStream from a Socket.
If the content-encoding of the HTML response if gzip, I want to gunzip it, but I don't know how I must do!
I create a new GZIPInputStream object and I passed it the InputStream (I initialize the class calling super(socket.getInputStream()) where socket is a constructor parameter). The code of my function is:
public String gunzip() {
  try {...
     GZIPInputStream zipin = new GZIPInputStream(super.in);
  catch(...){...}
}But, when I try to create the Object I get a java.net.SocketTimeoutException: Read timed outand I don't understand why?!?!
Please help!
Ciao

OK,
I have the complete compressed file in a String, but the GZIPInputStream wants an InputStream, and I don't know how I can pass the file to GZIPInputStream constructor.

Similar Messages

  • Reading from socket inputstream returns -1

    I'm using a socket in order to connect to a chat server. The code is:
    Socket socket;
    InputStreamReader isr;
    OutputStreamWriter osw;
    try {
      socket = new Socket(sHost, iPort);
      isr = new InputStreamReader(socket.getInputStream());
      osw = new OutputStreamWriter(socket.getOutputStream());
      int iCharRead;
      char[] buffer = new char[512];
      while((iCharRead=isr.read(buffer, 0, 512))!=-1) {
          // do something
      System.err.println("Error: InputStream has returned -1.");
      System.err.println("\tsocket.isBound()=" + socket.isBound());
      System.err.println("\tsocket.isClosed()=" + socket.isClosed());
      System.err.println("\tsocket.isConnected()=" + socket.isConnected());
      System.err.println("\tsocket.isInputShutdown()=" + socket.isInputShutdown());
      System.err.println("\tsocket.isOutputShutdown()=" + socket.isOutputShutdown());
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      try {if (isr!=null) isr.close();} catch (Exception ex) {}
      try {if (osw!=null) osw.close();} catch (Exception ex) {}
      try {if (socket!=null) socket.close();} catch (Exception ex) {}
    }Ther server is supposed to be sending data continuously but sometimes, after being connected successfully for a while, the read method returns -1. As you can see in the previous code then I'm checking out some socket information and I get:
    Error: InputStream has returned -1.
         socket.isBound()=true
         socket.isClosed()=false
         socket.isConnected()=true
         socket.isInputShutdown()=false
         socket.isOutputShutdown()=falseThe socket seems to be bounded, it is not closed and isConnected also returns true. Besides, input and output streams are not closed. So, why does the read method return -1? What does it really mean? Is it a problem in the server side, that is overloaded or simply malfunctioning? What can I do in order to keep on reading data from the socket connection? Do I have to close the current socket and reconnect again to the server or is there any other way to recover from this situation?
    Thanks.

    isConnected means was ever connected.
    Check whether isr is closed. If so, the server has disconnected/closed the connection.

  • Socket InputStream read , slow performance

    Hi ,
    We have developed a java socket appliction ,
    This application will be connected to a configured client socket .
    client socket will send huge no of messages to our application , our application will receive the messages and do the need full things,and send the acknowledgement to the client.
    In order to receive the messages we are using the code like this
    public void run(){
    socket_InputSteram = Socket.getInputStream()
    while(true){
    // read the message from the connected socket input stream.
    readMessage( socket_InputSteram );
    now comes the actual problem , for some number of messages our application is stable and doing well , after some time our application is taking almost 100% CPU and very slow.
    can any body help me why our application is taking 100% CPU , why it is faster in the initail stage and it is very slow after some time . what are the necessary steps we have to take inorder to read the socket input stream.
    i would be very thank full, if any body can provide the solution
    Thanks,
    SPK Srinivas.

    Is it actually using CPU time or only wallclock time? In the latter case it's probably just waiting for more data to arrive and you should concentrate on the next method(s) in the list.
    If it's actually using up CPU, then you might want to check if you're using it inefficiently.
    Prime examples: Reading a single byte at a time. If you do something like this:
    int b;
    while ((b = in.read()) != -1) {
      // do something
    }Then you're doing something wrong and should read into a buffer (byte-array) instead.

  • Socket.InputStream.read()

    public ServerThread(ThreadGroup t, Socket con,lServer master, int clientId) {
         super(t, "server");
         this.con = con;
         this.master = master;
         this.clientId = clientId;
    void run(){
        int task = 0;
        try {
            out = new DataOutputStream(con.getOutputStream());
            in = con.getInputStream();
            out.write(job.KN_NewClientID);
            out.write(clientId);
        } catch (IOException e) {
            melde("\nIOException  in run : " + e);
            return;
         * Start waiting for input
        while (true) {
            try {
           *   next line conecersn my question
           *===========================
                task = in.read();
                switch (task) {
                  // more          
            } catch (IOException e) {
                System.out.println("IOException  Serverthread  : " + );
                return;
    }When the above ( code-snippet) Thread is waiting for input
    task = in.read();
    In I create another thread, which will try to send and receive with the same socket in and -out.
    does the above thread block the second ?
    and if so, how do I avoid this
    TIA
    Hanns

    i like this forum: http://forum.java.sun.com/forum.jspa?forumID=11
    as for the question,
    http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/socket.html#sockets
    what i can get from this, is have a listener, listen for new connections, every connection established, create a new thread, these threads will have their own input and output streams, so you wont have to worry bout watchyamacallits
    then again, your threadgroups, im not following your code, but all i can say, is the socket examples work

  • How to avoid thread stops ? ( when try to read sockets inputstream ...)

    Hi ,
    When I try to call :
    Socket sok=new Socket (adres,poort);
    the thread looks to stop...
    How to avoid this ?
    Thx for tip etc !

    Take a look at NIO:
    http://www.google.com/search?num=100&hl=en&c2coff=1&q=non-blocking+java+socket

  • Problem with inputstreams from socket

    Hi
    This is probably a stupid question, but I really don't know much about server-client programming, and I'm a bit stuck when it comes to helping a friend (who is even more lost than me :p).
    In the code, there is a socket, mySocket. For some reason, there is two objects, one BufferedReader and one ObjectInputStream, both using the same sockets inpustream.
    mySocket = new Socket(servermaskin, PORT);
    in = new BufferedReader(new InputStreamReader(mySocket.getInputStream()));     
    out = new PrintWriter(mySocket.getOutputStream(),true);
    clientOutputStream = new ObjectOutputStream(mySocket.getOutputStream());
    clientInputStream = new ObjectInputStream(mySocket.getInputStream());"in" is used to write strings, and clientInputStream to write other objects. I really don't see why not use just the ObjectInputStream to write string as well, since strings are object too. What I am really wondering about is wether having two such object open at the same time, using the same sockets inputstream can be the cause of the problems?
    ~Ulvhild~

    When you create an ObjectOutputStream you have to flush it. Otherwise the header it writes at the start of the stream is not sent for the ObjectInputStream to read.
    clientOutputStream = new ObjectOutputStream(mySocket.getOutputStream());
    clientOutputStream.flush();

  • Right way to communicate with a socket server (TCP/IP)

    Hi,
    I used to write data from my J2ME socket client to a J2EE socket server with writeUTF(). In this way I can send (and receive) directly Strings.
    When I need an XML file I ask the server with something like os.writeUTF(GIVE_ME_XML_FILE) and I use an XML parser with this socket InputStream.
    I was wondering if it's the right way to proceed ....?
    How do you guys communicate with a server when you need "to talk" a lot ? Do you use only HTTP requests or (if you are allowed to) do you use Socket with writeUTF ?
    Just to know if I'm completely wrong....and if I gonna have unsolicited issues ...
    Thanks..

    AdrienD wrote:
    When I need an XML file I ask the server with something like os.writeUTF(GIVE_ME_XML_FILE) and I use an XML parser with this socket InputStream.
    I was wondering if it's the right way to proceed ....?No, it is not. Read the writeUTF api docs, and you'll know why!
    How do you guys communicate with a server when you need "to talk" a lot ? Do you use only HTTP requests or (if you are allowed to) do you use Socket with writeUTF ?There is answer to this question. it al depends on what data gets send where, how often, and how large..

  • Parse method of JAXP DocumentBuilder using InputStream

    I am having some problem. I am working on a generic XML messaging client server pair. The crux of it is that I am using the Transformer object to send data from the client to the server, using a Socket InputStream. The I do exactly the same from the server side to the client side.
    Example (client side):
    OutputStream out = socket.getOutputStream();
    Transformer transformer =
    TransformerFactory.newInstance().newTransformer();
    transformer.transform(new DOMSource(request),
    new StreamResult(out));
    Example (server side, in the thread for the connection):
    InputStream in = socket.getInputStream();
    DocumentBuilder builder =
    DocumentBuilderFactory.newInstance
    ().newDocumentBuilder();
    Document request = builder.parse(in);
    The problem I am experiencing is that the parse method on the server side is never completing. The parse method does not return at all. I can understand that this is due to the InputStream still being open, and need to know how can I let the parse method know that I am done writing to the OutputStream at the client side. Should I be sending an EOF character of sorts? If I should, what byte value represents this, and what do I need to do?
    Thank you
    Heinrich Pool

    Sorry hadn't noticed the Code Tags before. So the code formatted
    package de.gaskin.xml;
    import de.gaskin.buf.Buffer;
    import de.gaskin.io.LineArray;
    import de.gaskin.util.Debug;
    import java.net.Socket;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.io.ByteArrayOutputStream;
    import java.io.ByteArrayInputStream;
    import java.io.File;
    import java.util.Vector;
    import org.w3c.dom.Document;
    A Simple to use generic XML Document transfer based on sockets.
    <H2>Theory of Operation.</h2>
    <p>A client sends an array of lines (an XML document) prepended by a line
    that ONLY contains an integer (the number of lines in the document that
    follows).
    <p>The server reads the first line (so that it knows how many lines belong to
    the next document) it then reads the specified number of lines into memory and
    when all lines have been read in passes them (as an InputStream) to an
    XMLParser to produce an XML DOM that is made available through the<br>
    <code>getDocument()</code> method.
    <h2>API</h2>
    The API is very simple to use as the following templates demonstrate.
    <h3>Client</h3>
    <pre>
        public class MyXmlSocketClient extends XmlSocket {
           MyXmlSocketClient(String serverAddress, String fileName) {
              super(serverAddress, 4711);
              run(fileName);
    </pre>
    <h3>Server Worker</h3>
        <pre>
        public class MyXmlSocketServer extends XmlSocket {
           MyXmlSocketServer(Socket s) {
              super(s);
           public void run() {
              Document doc = getDocument();
              // Process document
        </pre>
    <h3>Server Listener</h3>
        <pre>
        public class MyXmlServer {
           ServerSocket ss;
           boolean      stop;
           MyXmlSocketServer() {
              stop = false;
              try {
                 ss = new ServerSocket(4711);
                 while (! stop) {
                    Socket s = ss.accept();
                    new Thread(new MyXmlServerSocket(s));
              catch (Exception x) {
                 x.printStackTrace();
        </pre>
    <P>Last updated 10th Jan 2001.
    @author  David. M. Gaskin.
    @version Version 1.0 Oct 2000
    @since    Version 1.0
    public class XmlSocket implements Runnable {
       final static boolean debug = false;
       protected BufferedReader  data;
      /* protected */ public PrintWriter     pw;
                 Socket          socket;
       public XmlSocket(String domain, int port) {
          try {
             socket = new Socket(domain, port);
             common(socket);
          catch (Exception x) {
    //       x.printStackTrace();
             throw new Error(x.toString());
       public XmlSocket(Socket s) {
          socket = s;
          common(s);
       void common(Socket s) {
          try {
             data = new BufferedReader(new InputStreamReader(s.getInputStream()));
             pw   = new PrintWriter(s.getOutputStream(), true);
          catch (Exception x) {
    //       x.printStackTrace();
             throw new Error(x.toString());
       public Document getDocument() {
          Document rc = null;
          try {
             String line = data.readLine();
             int    linesInDoc = Integer.parseInt(line.trim());
             if (linesInDoc != -1) {
                ByteArrayOutputStream os = new ByteArrayOutputStream();
                for (int i = 0;i < linesInDoc;i++) {
                   line = data.readLine();
                   System.out.println(line);
                   byte[] byteLine = line.getBytes();
                   os.write(byteLine, 0, byteLine.length);
    //          System.out.println("END");
                rc = XmlFactory.readIn(new ByteArrayInputStream(os.toByteArray()));
          catch (Exception x) {
             x.printStackTrace();
          return rc;
       public void run(Vector lines) {
          int loopCnt = lines.size();
          if (debug) {
             println("" + loopCnt);
             for (int i = 0;i < loopCnt;i++) {
                println((String)lines.elementAt(i));
    //       pw.flush();
             println("-1");
          else {
             pw.println("" + loopCnt);
             for (int i = 0;i < loopCnt;i++) {
                pw.println((String)lines.elementAt(i));
    //       pw.flush();
             pw.println("-1");
          pw.flush();
       void println(String s) {
          System.out.println(s);
          pw.println(s);
       public void run() {
          Debug.d(this, "run", "S H O U L D   N E V E R   B E   I N V O K E D");
       public void run(String filename) {
          Buffer[] input = LineArray.readIn(filename);
          send(input);
       public void run(File file) {
          Buffer[] input = LineArray.readIn(file.getAbsolutePath());
          send(input);
       void send(Buffer[] input) {
          int loopCnt = input.length;
          pw.println("" + loopCnt);
          for (int i = 0;i < loopCnt;i++) {
             pw.println(input.toString());
    pw.flush();
    pw.println("-1");
    pw.flush();
    public int getDocIdx(String[] roots, Document doc) {
    int rc = -1;
    String rootName = doc.getDocumentElement().getTagName();
    int loopCnt = roots.length;
    for (int i = 0;i < loopCnt;i++) {
    if (rootName.equals(roots[i])) {
    rc = i;
    break;
    if (rc < 0)
    System.out.println(rootName + " N O T F O U N D");
    return rc;
    public Socket getSocket() {
    return socket;
    For testing only
    public static void main(String[] args) {
    XmlSocket xmlS = new XmlSocket("localhost", 36);
    xmlS.getDocument();

  • Socket puzzles

    1. Socket sock = new Socket();
    InputStream in = sock.getInputStream();
    byte[] b = new byte[1024];
    int getLen = in.read(b);
    Why the getLen had never return -1 when the end of the stream is reached as Java 1.3 API said.Instead of that, the program is blocked at the read method.
    2.I wrote a block of simple code segment which transmit the request sent from IE to the destined server,just as a very simple http agent server.In fact ,I wrote it by socket not instead of URLConnection just for studying how a request gets a session information.
    I found my program can work in the way as I think when visits some websites,such as yahoo.com.But it returns 404 error when I visited the site in the lan.
    Who can show me why?

    as the subject

  • Socket puzzle...

    1. Socket sock = new Socket();
    InputStream in = sock.getInputStream();
    byte[] b = new byte[1024];
    int getLen = in.read(b);
    Why the getLen had never return -1 when the end of the stream is reached as Java 1.3 API said.Instead of that, the program is blocked at the read method.
    2.I wrote a block of simple code segment which transmit the request sent from IE to the destined server,just as a very simple http agent server.In fact ,I wrote it by socket not instead of URLConnection just for studying how a request gets a session information.
    I found my program can work in the way as I think when visits some websites,such as yahoo.com.But it returns 404 error when I visited the site in the lan.
    Who can show me why?

    try this using a datainputstream and the readFully method
    worked for me when i was experiencing difficulties with inputstreams

  • Socket read fails but write is successful. Why?

    Hi once more!
    I have a Java application, reading and writing from/to a client socket:
    InputStream is = socket.getInputStream();
    BufferedReader br = new BufferedReader(new InputStreamReader(is));
    i = br.read();
    ...If i is equal to -1, it means there's no connection or that somehow the connection is unavailable right? So, how come is it possible to write to the socket's output stream with success after that read( ) returning -1? Shouldn't it also fail?
    I'm trying a "persistent" TCP connection, so I use that condition (read () == -1) to determine when the connection is down (read() is only blocking a certain amount of time).
    Thanks!

    I suggest you to have a process constantly
    sending a byte just to check that you still have
    the ability to send a packetNow you've got it.That's what I'm doing, yet I feel in my case it's not enough.
    I communicate with the server asynchronously. I send packets.. somewhen the server sends packets to my client.
    This way, I have to be continuously reading from the socket's Input Stream, in order to check for incoming packets (which may arrive at any time)... Thus, I have to be sure I can read from the socket..
    As the connection may timeout (if neither my client nor the server write anything to the socket) I send a dummy packet once per minute.
    However:
    1) This is too long to check connection status (only 1 time each minute)
    2) It doesn't tell me I can read ok from the socket - check the case where I could write but read ( ) returned -1. This is abnormal behaviour in my case.. do you think if the server was sending some packets, my read ( ) would be able to capture them (even after returning -1 for quite a while)? It seemed to me I was able to send, yet unable to receive.. or my packets weren't actually reaching the server even though they seemed to be.
    What write does is cause packets to be sent which
    require acknowledgement, and if the ACKs don't
    arrive, eventually a subsequent write() will fail. A
    read doesn't engage in any wire protocol at all,
    which is why it can't be used to detect a connection
    failure other than via a read timeout, or as a result
    of prior writes.Why does write ( ) doesn't fail when I unplug the cable? Either way this situation isn't quite important, as long as my packets start actually reaching the server after the cable is plugged back in. Curious, however, how write ( ) doesn't fail..

  • Socket, setSoTimeout and SocketTimeoutException

    I am experimenting with different Socket.setSoTimeout settings while reading the inputstream with BufferedReader.readLine. I have tried to provoke a SocketTimeoutException while reading a string from the Socket.inputStream.
    I have noticed that if a timeout happens after I have flushed some strings with a BufferedWriter.write, but before I have generated a string with EOL, the BufferedReader.readLine first generates a SocketTimeoutException, and then readLine-method returns the flushed strings even though none of them had a "\n", "\r" or "\r\n".
    Now, what I have not been able to do (or at least was not aware of), is to generate a Timeout before an entire string is read by the Socket.inputStream.
    1. Is it possible that if I write "this is a test\n" that a Timeout could produce (with repetitive BufferedReader.readLine) "this i" and "s a test"?
    2. What would happen if I was using ObjectOutputStream.writeObject and ObjectInputStream.readObject?
    I have looked at the source-code of BufferedReader, but I think I could spend several days to try to understand it. If anyone has any experience or ideas regarding question 1 or 2, feel free to share them.

    Moved topic to:
    http://forum.java.sun.com/thread.jspa?threadID=666967

  • Using thread and socket connection with other machines

    Hi all!
    we are using weblgoic 5.1 SP9 JDK1.2.2
    we already using java.net.Socket and java.lang.Thread
    to communication TANDEM Machine on the weblogic.
    the reason why we use to socket and thread even though it is not
    recommanded is that below
    1. once we connect Socket, then we using until server shutdown or
    connection may has the problem, so we're using thread to wait
    java.io.Inputstream to read from socket.(if I using EJB, It can't
    wait socket inputstream indefinetly, because it has timeout)
    2. we're logging Database date sent or received with TANDEM Machine.
    so we need Database Access. so we using Database Access
    thru Weblogic.
    3. EJB Application using (other EJB Application - send Module)
    to send data to TANDEM Machine. So "Send Module" should
    be implemented EJB.
    but. Now I see there might be problem this framework.
    so, is there some way by just using J2EE spec, to implement this kind of
    framework.
    wait for your great help !!
    regards.

    Yes i've tried interrupt method and it doesn't have any effects on the thread... it stay in connect() method...
    And for the timeouts, in fact i use an API : J2SSH, to connect with SSH protocol, and the setting of connection timeouts is not implemented yet... and the default timeout is about 4 minutes...
    so i don't know how to solve this problem...

  • Java 1.3.1 and Detecting Socket Closure (A Popular Question, I Know)

    Hi, all. I've been skimming the web looking at various commentary on how it is impossible to detect whether or not a Socket has closed without calling the read of Socket.getInputStream() or the write of Socket.getOutputStream(). I wrote a networking package some months ago that would spawn one Thread for each Socket so I could spare the Threads to block on the I/O, thus following this suggestion. I also understand that Java 1.4 contains various elements of the java.nio package that are supposed to take care of nonblocking I/O. I think, however, that this is entirely possible with Sockets in Java 1.3.1.
    I wrote a program that calls Socket.setSoTimeout(), setting the timeout of the socket to 1 millisecond. I then have one Thread looking at a series of open Sockets. The Thread calls the read method on each of the Sockets' InputStream objects and does one of three things based upon the result:
    If the result is a successful read, the data is handled as is appropriate.
    If the result is a -1, the Socket has been closed and is formally shut down on this side.
    If the result is an InterruptedIOException, the Socket is open but has no available data.
    The Socket is then ignored until the next pass.
    I've tested this idea on an Athalon XP 2100+ and not seen a significant use of processing power.
    Therefore, my question is as follows: what's wrong with this idea? We've looked at it and it seems to be an appropriate solution to the problem. Yet, I've seen little mention of this way to work around blocking Socket I/O in Java 1.3.1. It seems appropriate and certainly cuts back on Thread overhead... but does anyone see a catch?
    Thanks! Best of luck!

    This approach to multiplexing seems to not work under the 1.3.1 release for Windows. I have found I still get a -1 on my input stream read, instead of the InterruptedIOException. It's pretty frustrating.
    The axact same code appears to work fine on Linux . So this may be dependent on the native code layer for the sockets implementation, or we may be encountering a bug in our or Sun's code. I haven't found documentation of the expected behaviour of the SocketInputStream (the actual class returned by Socket.getInputStream) or the socket implementation in general for each platform.
    Note that in general, your approach is not really scalable for the kind of situations the Non-blocking IO package was introduced for. Your approach means that 500 sockets will have a 1/2 second intrinsic delay. You would have to start thread-pooling, etc. You can see why something like an internet audio streaming application would benefit from lower level support in the java libraries.
    Neil

  • TCP Socket Reading Problem-

    Hi,
    I am reading a response from the Socket by using InputStream and BufferedReader object. Reading it byte by byte. But as my response data ( bytes) is very large (6000- 7000 bytes). The reading time is almost 5-6 minutes.
    As i dont know the socket inputstreams size ( no of bytes) i can't use readFully() method of DataInputStream becoz byte array size is to be specified . If the array size > reponse size, it throws EOF exception,
    So my problem is that reading the response should be fast . Can you please tell any way of reading the response fast or knowing the socket inputstreams size in prior before reading it .
    Awaiting your reply,
    Regards,
    Prakash.

    balramprakash wrote:
    Hi,
    I am reading a response from the Socket by using InputStream and BufferedReader object. Reading it byte by byte. BufferedReaders read text (16-bit char) not bytes.
    But as my response data ( bytes) is very large (6000- 7000 bytes). This isn't very large unless you network is very slow. Even with 1 Mb broadband this would take 0.07 seconds to download. On a dial modem it would take 1.5 second.
    The reading time is almost 5-6 minutes. You have a serious problem with your setup. Even reading one character at a time (which is the slowest way to do this) it shouldn't take anywhere near that long.
    Perhaps you don't know when the response ends so you ware waiting for a disconnect or the connection to timeout.
    As i dont know the socket inputstreams size ( no of bytes) i can't use readFully() method of DataInputStream becoz byte array size is to be specified If you can change the format, you can send the size before you send the data and the reader know how much data to expect.
    So my problem is that reading the response should be fastSend the size with the response. Don't use BufferedReader if you have binary data. (e.g. byte data) It it should take about 7 ms to load on a 10 Mb connection.
    BTW: if you are opening a new connection each time it can take about 20 ms to establish, so the time to download the response is small in this case.

Maybe you are looking for

  • Trigger a sy-ucomm...in the processing of another

    Hi, Based on some conditions...inside the VL01/VL02n transaction...i have to trigger Post goods receipt... when document is saved inside user exit.. How can i do this

  • Account type D is not defined for document type RE

    Hi can any one tell me use of the field " Account with vendor" in table LFB1? Regards

  • I just downloaded ios7 for iphone 4s but phone wont activate ?

    recently just downloaded ios7 but when i go to activate my phone it says your iphone could not be activated because the activation server  cannot be reached . try connecting your iphone to itunes to activate it or try again in a few minutes . wheneve

  • Bridge to photoshop

    hello i ve installed trial version of photoshop cc and bridrge cc. when i want to open a file from bridge in photoshop , a message error appears telling me  that that "patchmatch.dll" cannot be found in the library of the dynamic link. how can I fix

  • Premiere update failed--Error Code: U44M1I2I0

    Recieved an 'Update Failed' notice when trying to update Premiere Pro - with a the code above and a 'please try again later' notice. That was 24 hours ago - same problem just now. Anyone know how I get around this?