Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java method creation help (http header and buffered writer)

807601May 11 2008 — edited May 11 2008
Hi all,

I'm trying to write code to create a stand alone webserver (very small and limited but it's for a class assignment). One part says that I need to:

Create a header method that takes a BufferedWriter, an integer status code, and an integer content length, and writes an HTTP header to the buffered writer. This method has a void return type.

So I need something like:
public void header(BufferedWriter bwriter, 
but how do I code the other two parameters (I'm not sure on the syntax of them). Also what does it mean when it's asking me to write the HTTP header to the buffered writer? Just create the header and pass it through the writer?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 8 2008
Added on May 11 2008
4 comments
184 views