Package de.sfuhrm.radiorecorder.http
Schnittstelle HttpConnection
- Alle Superschnittstellen:
AutoCloseable
Wrapper for an open HTTP protocol connection.
- Autor:
- Stephan Fuhrmann
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidclose()Get the content type of the stream.Get the response header fields from the HTTP server.Get the input stream reading the HTTP response body.intGet the HTTP server response code.Get the HTTP server response status message.getURI()Get the URL being associated to this connection.
-
Methodendetails
-
getURI
Get the URL being associated to this connection.- Gibt zurück:
- the URL associated with this connection.
- Löst aus:
IOException- if resolving the URL resulted in an error.
-
getHeaderFields
Get the response header fields from the HTTP server.- Gibt zurück:
- a map with the keys being headers field names and the values being header field values. If a header field is given multiple times the value list will contain all values.
-
getInputStream
Get the input stream reading the HTTP response body.- Gibt zurück:
- the input stream of the connection.
- Löst aus:
IOException- if there's a problem getting or opening the input stream.
-
getContentType
String getContentType()Get the content type of the stream.- Gibt zurück:
- the content type, for example "audio/mpeg", or
nullif not sent by the server.
-
getResponseCode
Get the HTTP server response code.- Gibt zurück:
- the numerical response code, for example 200 for "OK".
- Löst aus:
IOException- if there is a problem getting the response code.- Siehe auch:
-
getResponseMessage
Get the HTTP server response status message.- Gibt zurück:
- the textual response message, for example "OK".
- Löst aus:
IOException- if there is a problem getting the response message.- Siehe auch:
-
close
- Angegeben von:
closein SchnittstelleAutoCloseable- Löst aus:
IOException
-