| CS 455/555 - Intro to Networks and Communications
Fall 2008: Tues/Thurs 3-4:15pm, Dragas 1117 |
|
Syllabus (pdf) |
AnnouncementsTuesday/Thursday 3-4:15pm, Dragas 1117, Fall 2008Tue, Nov 25 @ 11:48 am - Final Exam Study Guide Mon, Nov 24 @ 11:00 am - Chapter 5 Questions Wed, Nov 5 @ 9:06am - Program 3 FAQ
The web server will close the socket when it has finished sending the response (according to the HTTP/1.0 specification). This will result in an IOException when you next try to read from the socket.
No, you cannot use readLineBytes() to handle binary data.
It allows you to read directly from a DataInputStream instead of a BufferedReader wrapped around an InputStreamReader. You'll need this to read the data part of a binary object correctly.
Hint: Once you've finished reading the HTTP response header (with readLineBytes()), you need to read one byte at a time from the DataInputStream you created and then send that one byte to the socket (using the DataOutputStream). Repeat this until you've read every byte that the server has sent.
Make sure that you include any lines that start with 'Cookie', 'Host', 'User-Agent', and 'Accept' (including 'Accept-Encoding' and others). Do not modify these lines.
Sun, Oct 12 @ 6:37pm - Midterm Exam Grades Posted Fri, Sep 26 @ 5:37pm - Midterm Study Guide Posted Sun, Sep 21 @ 3:15pm - Homework 1/Program 1 Grades Posted Thu, Sep 18 @ 7:40pm - Homework 2, Problem 4 Thu, Sep 11 @ 12:32pm - Homework 2 Wed, Sep 10 @ 2:54pm - Out of Town Sep 15-17 Mon, Sep 08 @ 12:35pm - Program 1 FAQ
As long as your program doesn't crash, it doesn't matter to me how you handle this case. You can print an error message, or you can accept it.
Put the URL in quotes. Ex: java UrlParser "http://www.youtube.com/watch?v=WEov7-asdf"
No. You are just parsing the URL, you do not need to validate that the hostname actually exists. Think about it this way, what does your browser do if you enter an invalid hostname? It tries to contact that host anyway.
No. The goal is for you to become familiar with parsing strings yourselves using Java.
Fri, Sep 05 @ 12:42pm - ODU-CS Machines for Networking Projects Tue, Sep 02 @ 8:30pm - Blackboard Possible Issues Tue, Sep 02 @ 8:25pm - Accessing CS Unix from Home Fri, Aug 29 @ 9:19am - CS Unix Access
To log in to the CS Unix system, ssh to fast.cs.odu.edu. Mon, Jul 14 @ 11:30am - Welcome! |