com.sapportals.wcm.util.http
Interface IResponse
- public interface IResponse
IWDResponse represents the response to a HTTP request, as performed with an
IWDRequest.
Whether the IWDResponse keeps a Document is influenced by
two factors:
- when the IWDRequest indicated that a response document is expected
- when the response carried a 207 status code with content type text/xml
However the document may still be null due to missing response
body, etc.
Whether the IWDResponse keeps a InputStream is influenced mainly by the
indication in the IWDRequest, namely if the client indicates that he would
like to get the response as a InputStream.
Copyright (c) SAP AG 2001-2002
getDocument
public Document getDocument()
- Returns:
- the parsed XML Document from the HTTP response or
null
getStream
public InputStream getStream()
- Returns:
- an InputStream to read the body of a HTTP response from or
null
getContentType
public String getContentType()
- Returns:
- the mime type of the response body or
null if not
specified
getContentLength
public long getContentLength()
- Returns:
- the length of the HTTP response body or
-1 if not
specified
getHeader
public String getHeader(String name)
- Parameters:
name - TBD: Description of the incoming method parameter
- Returns:
- the HTTP header field with given name or
null if not
specified
getHeaderNames
public Iterator getHeaderNames()
- Returns:
- enumeration of all header fields in HTTP response
getHttpVersion
public String getHttpVersion()
- Returns:
- HTTP version string (RFC2616, section 3.1)
getStatus
public int getStatus()
- Returns:
- HTTP status code of response
getStatusDescription
public String getStatusDescription()
- Returns:
- HTTP status description of response
hasDocument
public boolean hasDocument()
- Returns:
- if HTTP response contained a valid XML document
hasStream
public boolean hasStream()
- Returns:
- if InputStream for HTTP body is available
Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.