KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > nutch > net > protocols > Response


1 /* Copyright (c) 2004 The Nutch Organization. All rights reserved. */
2 /* Use subject to the conditions in http://www.nutch.org/LICENSE.txt. */
3
4 package net.nutch.net.protocols;
5
6 import java.net.URL JavaDoc;
7
8
9 /** A response inteface. Makes all protocols model HTTP. */
10
11 public interface Response {
12
13   /** Returns the URL used to retrieve this response. */
14   public URL JavaDoc getUrl();
15
16   /** Returns the response code. */
17   public int getCode();
18
19   /** Returns the value of a named header. */
20   public String JavaDoc getHeader(String JavaDoc name);
21
22   /** Returns the full content of the response. */
23   public byte[] getContent();
24
25   /**
26    * Returns the compressed version of the content if the server
27    * transmitted a compressed version, or <code>null</code>
28    * otherwise.
29    */

30   public byte[] getCompressedContent();
31
32   /**
33    * Returns the number of 100/Continue headers encountered
34    */

35   public int getNumContinues();
36
37 }
38
Popular Tags