943,491 Members | Top Members by Rank

Ad:
Apr 10th, 2003
0

Random Programming Script

Expand Post »
Whilst wondering around aimlessly, I came across a pack of "Afterworld" cards, and printed on these cards in quite a few places, was this script:
textOutput.append("Date : "+ new Date(usedURLConn.getDate())+"\n");
textOutput.append("Content-Type: "+usedURLConn.getContentType()+"\n");
len = usedURLConn.getContentLength();
textOutput.append("Content length: "+len+"\n\n");

if(len>0)
{
textOutput.append("The file's contents is as follows: \n--------------------\n");
InputStream input = usedURLConn.getInputStream();;
int i=len;
while (((c=input.read()) != -1) && (--i>0))
{
textOutput.append(""+(char)c);
}
input.close();
textOutput.append("\n--------------------\n");
}
else
{
textOutput.append("Sorry! That file is EMPTY, or that file does not exist!");
}
   }
});

}

}
Can anyone tell me what it is?
Similar Threads
pete
Reputation Points:
Solved Threads:
Guest
n/a posts
Jun 10th, 2004
0

Re: Random Programming Script

Looks like Java code that dumps the contents of a URL-referenced file to a text box. No idea what it might be part of.
Reputation Points: 182
Solved Threads: 71
Posting Pro in Training
gusano79 is offline Offline
475 posts
since May 2004

Has this thread been answered?

If this thread has been successfully resolved, please Mark this Thread as Solved so that it can be added to our Knowledge Base and help others. Also, posters who replied appreciate knowing that they were helpful.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Computer Science Forum Timeline: p2p network ????
Next Thread in Computer Science Forum Timeline: QuickSort





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC