MCPcopy Create free account

hub / github.com/curtcox/JLHTTP / functions

Functions145 in github.com/curtcox/JLHTTP

↓ 35 callersMethodget
Returns the value of the first header with the given name. @param name the header name (case insensitive) @return the header value, or null if none e
src/main/java/net/freeutils/httpserver/HTTPServer.java:1174
↓ 28 callersMethodadd
Adds a header with the given name and value to the end of this collection of headers. Leading and trailing whitespace are trimmed. @param name the he
src/main/java/net/freeutils/httpserver/HTTPServer.java:1214
↓ 25 callersMethodaddContentType
Adds a Content-Type mapping for the given path suffixes. If any of the path suffixes had a previous Content-Type associated with it, it is replaced wi
src/main/java/net/freeutils/httpserver/HTTPServer.java:2265
↓ 18 callersMethodcontains
Returns whether there exists a header with the given name. @param name the header name (case insensitive) @return whether there exists a header with
src/main/java/net/freeutils/httpserver/HTTPServer.java:1203
↓ 14 callersMethodwrite
(byte[] b, int off, int len)
src/main/java/net/freeutils/httpserver/HTTPServer.java:1653
↓ 13 callersMethodgetHeaders
Returns the request headers. @return the request headers
src/main/java/net/freeutils/httpserver/HTTPServer.java:1386
↓ 11 callersMethodsendError
Sends an error response with the given status and detailed message. An HTML body is created containing the status and its description, as well as the
src/main/java/net/freeutils/httpserver/HTTPServer.java:1796
↓ 10 callersMethodgetName
Returns this header's name. @return this header's name
src/main/java/net/freeutils/httpserver/HTTPServer.java:1132
↓ 10 callersMethodsendHeaders
Sends the response headers with the given response status. A Date header is added if it does not already exist. If the response has a body, the Conten
src/main/java/net/freeutils/httpserver/HTTPServer.java:1689
↓ 9 callersMethodgetPath
Returns the path component of the request URI, after URL decoding has been applied (using the UTF-8 charset). @return the decoded path component of t
src/main/java/net/freeutils/httpserver/HTTPServer.java:1401
↓ 8 callersMethodsplitElements
Splits the given element list string (comma-separated header value) into its constituent non-empty trimmed elements. (RFC2616#2.1: element lists are d
src/main/java/net/freeutils/httpserver/HTTPServer.java:2516
↓ 7 callersMethodgetVirtualHost
Returns the virtual host with the given name. @param name the name of the virtual host to return, or null for the default virtual host @return
src/main/java/net/freeutils/httpserver/HTTPServer.java:1982
↓ 7 callersMethodparseULong
Parses an unsigned long value. This method behaves the same as calling {@link Long#parseLong(String, int)}, but considers the string invalid if it sta
src/main/java/net/freeutils/httpserver/HTTPServer.java:2449
↓ 6 callersMethodclose
()
src/main/java/net/freeutils/httpserver/HTTPServer.java:1651
↓ 6 callersMethodgetBytes
Converts strings to bytes by casting the chars to bytes. This is a fast way to encode a string as ISO-8859-1/US-ASCII bytes. If multiple strings are p
src/main/java/net/freeutils/httpserver/HTTPServer.java:2683
↓ 6 callersMethodread
()
src/main/java/net/freeutils/httpserver/HTTPServer.java:255
↓ 6 callersMethodsplit
Splits the given string into its constituent non-empty trimmed elements, which are delimited by any of the given delimiter characters. This is a more
src/main/java/net/freeutils/httpserver/HTTPServer.java:2531
↓ 5 callersMethodreadLine
Reads the ISO-8859-1 encoded string starting at the current stream position and ending at the first occurrence of the LF character. @param in the str
src/main/java/net/freeutils/httpserver/HTTPServer.java:2778
↓ 4 callersMethodaddAll
Adds all given headers to the end of this collection of headers, in their original order. @param headers the headers to add
src/main/java/net/freeutils/httpserver/HTTPServer.java:1231
↓ 4 callersMethodfill
Fills the buffer with more data from the underlying stream. @return true if there is available data for the current part, or false if the cur
src/main/java/net/freeutils/httpserver/HTTPServer.java:583
↓ 4 callersMethodgetBody
Returns the input stream containing the request body. @return the input stream containing the request body
src/main/java/net/freeutils/httpserver/HTTPServer.java:1393
↓ 4 callersMethodgetMethod
Returns the request method. @return the request method
src/main/java/net/freeutils/httpserver/HTTPServer.java:1365
↓ 4 callersMethodgetValue
Returns this header's value. @return this header's value
src/main/java/net/freeutils/httpserver/HTTPServer.java:1139
↓ 4 callersMethodgetVersion
Returns the request version string. @return the request version string
src/main/java/net/freeutils/httpserver/HTTPServer.java:1379
↓ 4 callersMethodtransfer
Transfers data from an input stream to an output stream. @param in the input stream to transfer from @param out the output stream to transfer to (or
src/main/java/net/freeutils/httpserver/HTTPServer.java:2705
↓ 4 callersMethodtrimRight
Returns the given string with all occurrences of the given character removed from its right side. @param s the string to trim @param c the character
src/main/java/net/freeutils/httpserver/HTTPServer.java:2586
↓ 3 callersMethodaddContext
Adds a context and its corresponding context handler to this server. Paths are normalized by removing trailing slashes (except the root). @param path
src/main/java/net/freeutils/httpserver/HTTPServer.java:966
↓ 3 callersMethodformatDate
Formats the given time value as a string in RFC 1123 format. @param time the time in milliseconds since January 1, 1970, 00:00:00 GMT @return the giv
src/main/java/net/freeutils/httpserver/HTTPServer.java:2487
↓ 3 callersMethodgetContext
Returns the info of the context handling this request. @return the info of the context handling this request, or an empty context
src/main/java/net/freeutils/httpserver/HTTPServer.java:1564
↓ 3 callersMethodgetDate
Returns the Date value of the header with the given name. @param name the header name (case insensitive) @return the header value as a Date, or null
src/main/java/net/freeutils/httpserver/HTTPServer.java:1188
↓ 3 callersMethodgetHeaders
Returns the request headers collection. @return the request headers collection
src/main/java/net/freeutils/httpserver/HTTPServer.java:1613
↓ 3 callersMethodgetOutputStream
Returns the underlying output stream to which the response is written. Except for special cases, you should use {@link #getBody()} instead. @return t
src/main/java/net/freeutils/httpserver/HTTPServer.java:1621
↓ 3 callersMethodgetParams
Returns a header's parameters. Parameter order is maintained, and the first key (in iteration order) is the header's value without the parameters. @p
src/main/java/net/freeutils/httpserver/HTTPServer.java:1293
↓ 3 callersMethodhasNext
()
src/main/java/net/freeutils/httpserver/HTTPServer.java:750
↓ 3 callersMethodreadHeaders
Reads headers from the given stream. Headers are read according to the RFC, including folded headers, element lists, and multiple headers (which are c
src/main/java/net/freeutils/httpserver/HTTPServer.java:2793
↓ 3 callersMethodreadToken
Reads the token starting at the current stream position and ending at the first occurrence of the given delimiter byte, in the given encoding. If LF i
src/main/java/net/freeutils/httpserver/HTTPServer.java:2739
↓ 3 callersMethodsend
Sends the full response with the given status, and the given string as the body. The text is sent in the UTF-8 charset. If a Content-Type header was n
src/main/java/net/freeutils/httpserver/HTTPServer.java:1776
↓ 3 callersMethodwriteTo
Writes the headers to the given stream (including trailing CRLF). @param out the stream to write the headers to @throws IOException if an error occur
src/main/java/net/freeutils/httpserver/HTTPServer.java:1277
↓ 2 callersMethodfindBoundary
Finds the first (potential) boundary within the buffer's remaining data. Updates tail, length and state fields accordingly. @throws IOException if an
src/main/java/net/freeutils/httpserver/HTTPServer.java:624
↓ 2 callersMethodgetBaseURL
Returns the base URL (scheme, host and port) of the request resource. The host name is taken from the request URI or the Host header or a default host
src/main/java/net/freeutils/httpserver/HTTPServer.java:1430
↓ 2 callersMethodgetBody
Returns an output stream into which the response body can be written. The stream applies encodings (e.g. compression) according to the sent headers. T
src/main/java/net/freeutils/httpserver/HTTPServer.java:1643
↓ 2 callersMethodgetConditionalStatus
Calculates the appropriate response status for the given request and its resource's last-modified time and ETag, based on the conditional headers pres
src/main/java/net/freeutils/httpserver/HTTPServer.java:2855
↓ 2 callersMethodgetHandlers
Returns the map of supported HTTP methods and their corresponding handlers. @return the map of supported HTTP methods and their corresponding handler
src/main/java/net/freeutils/httpserver/HTTPServer.java:817
↓ 2 callersMethodgetMethods
Returns all HTTP methods explicitly supported by at least one context (this may or may not include the methods with required or built-in support). @r
src/main/java/net/freeutils/httpserver/HTTPServer.java:933
↓ 2 callersMethodgetParentPath
Returns the parent of the given path. @param path the path whose parent is returned (must start with '/') @return the parent of the given path (exclu
src/main/java/net/freeutils/httpserver/HTTPServer.java:2572
↓ 2 callersMethodheadersSent
Returns whether the response headers were already sent. @return whether the response headers were already sent
src/main/java/net/freeutils/httpserver/HTTPServer.java:1628
↓ 2 callersMethodinitChunk
Initializes the next chunk. If the previous chunk has not yet ended, or the end of stream has been reached, does nothing. @return the length of the c
src/main/java/net/freeutils/httpserver/HTTPServer.java:339
↓ 2 callersMethodinitChunk
Initializes a new chunk with the given size. @param size the chunk size (must be positive) @throws IllegalArgumentException if size is negative @thro
src/main/java/net/freeutils/httpserver/HTTPServer.java:411
↓ 2 callersMethodmatch
Matches the given ETag value against the given ETags. A match is found if the given ETag is not null, and either the ETags contain a " " value, or one
src/main/java/net/freeutils/httpserver/HTTPServer.java:2836
↓ 2 callersMethodparseParamsList
Parses name-value pair parameters from the given "x-www-form-urlencoded" MIME-type string. This is the encoding used both for parameters passed as the
src/main/java/net/freeutils/httpserver/HTTPServer.java:2355
↓ 2 callersMethodreplace
Adds a header with the given name and value, replacing the first existing header with the same name. If there is no existing header with the same name
src/main/java/net/freeutils/httpserver/HTTPServer.java:1245
↓ 2 callersMethodserve
Serves the given request using the given response. @param req the request to be served @param resp the response to be filled @return an HTTP status c
src/main/java/net/freeutils/httpserver/HTTPServer.java:1046
↓ 2 callersMethodserve
Serves the content for a request by invoking the context handler for the requested context (path) and HTTP method. @param req the request @param resp
src/main/java/net/freeutils/httpserver/HTTPServer.java:2228
↓ 2 callersMethodsetPath
Sets the path component of the request URI. This can be useful in URL rewriting, etc. @param path the path to set @throws IllegalArgumentException if
src/main/java/net/freeutils/httpserver/HTTPServer.java:1412
↓ 2 callersMethodsize
Returns the number of added headers. @return the number of added headers
src/main/java/net/freeutils/httpserver/HTTPServer.java:1164
↓ 2 callersMethodtrimDuplicates
Trims duplicate consecutive occurrences of the given character within the given string, replacing them with a single instance of the character. @para
src/main/java/net/freeutils/httpserver/HTTPServer.java:2617
↓ 1 callersMethodaddContentTypes
Adds Content-Type mappings from a standard mime.types file. @param in a stream containing a mime.types file @throws IOException if an error occurs @t
src/main/java/net/freeutils/httpserver/HTTPServer.java:2277
↓ 1 callersMethodaddHandler
Adds (or replaces) a context handler for the given HTTP methods. @param handler the context handler @param methods the HTTP methods supported by the
src/main/java/net/freeutils/httpserver/HTTPServer.java:827
↓ 1 callersMethodaddVirtualHost
Adds the given virtual host to the server. If the host's name or aliases already exist, they are overwritten. @param host the virtual host to add
src/main/java/net/freeutils/httpserver/HTTPServer.java:2001
↓ 1 callersMethodcreateIndex
Serves the contents of a directory as an HTML file index. @param dir the existing and readable directory whose contents are served @param path the di
src/main/java/net/freeutils/httpserver/HTTPServer.java:3010
↓ 1 callersMethodcreateServerSocket
Creates the server socket used to accept connections, using the configured {@link #setServerSocketFactory ServerSocketFactory} and {@link #setPort por
src/main/java/net/freeutils/httpserver/HTTPServer.java:2015
↓ 1 callersMethoddetectLocalHostName
Returns the local host's auto-detected name. @return the local host name
src/main/java/net/freeutils/httpserver/HTTPServer.java:2329
↓ 1 callersMethodescapeHTML
Returns an HTML-escaped version of the given string for safe display within a web page. The characters '&', '>' and '<' must always be escap
src/main/java/net/freeutils/httpserver/HTTPServer.java:2654
↓ 1 callersMethodgetAliases
Returns this host's aliases. @return the (unmodifiable) set of aliases (which may be empty)
src/main/java/net/freeutils/httpserver/HTTPServer.java:879
↓ 1 callersMethodgetContentType
Returns the content type for the given path, according to its suffix, or the given default content type if none can be determined. @param path the pa
src/main/java/net/freeutils/httpserver/HTTPServer.java:2302
↓ 1 callersMethodgetDirectoryIndex
Gets this host's directory index file. @return the directory index file, or null
src/main/java/net/freeutils/httpserver/HTTPServer.java:904
↓ 1 callersMethodgetParamsList
Returns the request parameters, which are parsed both from the query part of the request URI, and from the request body if its content type is "applic
src/main/java/net/freeutils/httpserver/HTTPServer.java:1466
↓ 1 callersMethodgetRange
Returns the absolute (zero-based) content range value read from the Range header. If multiple ranges are requested, a single range containing all of t
src/main/java/net/freeutils/httpserver/HTTPServer.java:1512
↓ 1 callersMethodgetURI
Returns the request URI. @return the request URI
src/main/java/net/freeutils/httpserver/HTTPServer.java:1372
↓ 1 callersMethodgetVirtualHost
Returns the virtual host corresponding to the requested host name, or the default host if none exists. @return the virtual host corresponding to the
src/main/java/net/freeutils/httpserver/HTTPServer.java:1553
↓ 1 callersMethodgetVirtualHosts
Returns all virtual hosts. @return all virtual hosts (as an unmodifiable set)
src/main/java/net/freeutils/httpserver/HTTPServer.java:1991
↓ 1 callersMethodhandleConnection
Handles communications for a single connection over the given streams. Multiple subsequent transactions are handled on the connection, until the strea
src/main/java/net/freeutils/httpserver/HTTPServer.java:2069
↓ 1 callersMethodhandleMethod
Handles a transaction according to the request method. @param req the transaction request @param resp the transaction response (into which the respon
src/main/java/net/freeutils/httpserver/HTTPServer.java:2174
↓ 1 callersMethodhandleTrace
Handles a TRACE method request. @param req the request @param resp the response into which the content is written @throws IOException if an error occ
src/main/java/net/freeutils/httpserver/HTTPServer.java:2211
↓ 1 callersMethodhandleTransaction
Handles a single transaction on a connection. <p> Subclasses can override this method to perform filtering on the request or response, apply wrappers
src/main/java/net/freeutils/httpserver/HTTPServer.java:2117
↓ 1 callersMethodisAllowGeneratedIndex
Returns whether auto-generated indices are allowed. @return whether auto-generated indices are allowed
src/main/java/net/freeutils/httpserver/HTTPServer.java:923
↓ 1 callersMethodisCompressible
Checks whether data of the given content type (MIME type) is compressible. @param contentType the content type @return true if the data is compressib
src/main/java/net/freeutils/httpserver/HTTPServer.java:2314
↓ 1 callersMethoditerator
Returns an iterator over the headers, in their insertion order. If the headers collection is modified during iteration, the iteration result is undefi
src/main/java/net/freeutils/httpserver/HTTPServer.java:1310
↓ 1 callersMethodjoin
Returns a string constructed by joining the string representations of the iterated objects (in order), with the delimiter inserted between them. @par
src/main/java/net/freeutils/httpserver/HTTPServer.java:2558
↓ 1 callersMethodnext
()
src/main/java/net/freeutils/httpserver/HTTPServer.java:758
↓ 1 callersMethodnextPart
Advances the stream position to the beginning of the next part. Data read before calling this method for the first time is the preamble, and data read
src/main/java/net/freeutils/httpserver/HTTPServer.java:564
↓ 1 callersMethodparseChunkSize
Parses a chunk-size line. @param line the chunk-size line to parse @return the chunk size @throws IllegalArgumentException if the chunk-size line is
src/main/java/net/freeutils/httpserver/HTTPServer.java:364
↓ 1 callersMethodparseDate
Parses a date string in one of the supported {@link #DATE_PATTERNS}. <p> Received date header values must be in one of the following formats: Sun, 06
src/main/java/net/freeutils/httpserver/HTTPServer.java:2469
↓ 1 callersMethodparseRange
Returns the absolute (zero-based) content range value specified by the given range string. If multiple ranges are requested, a single range containing
src/main/java/net/freeutils/httpserver/HTTPServer.java:2404
↓ 1 callersMethodpreprocessTransaction
Preprocesses a transaction, performing various validation checks and required special header handling, possibly returning an appropriate response. @p
src/main/java/net/freeutils/httpserver/HTTPServer.java:2133
↓ 1 callersMethodreadRequestLine
Reads the request line, parsing the method, URI and version string. @param in the input stream from which the request line is read @throws IOExceptio
src/main/java/net/freeutils/httpserver/HTTPServer.java:1524
↓ 1 callersMethodredirect
Sends a 301 or 302 response, redirecting the client to the given URL. @param url the absolute URL to which the client is redirected @param permanent
src/main/java/net/freeutils/httpserver/HTTPServer.java:1849
↓ 1 callersMethodremove
Removes all headers with the given name (if any exist). @param name the header name (case insensitive)
src/main/java/net/freeutils/httpserver/HTTPServer.java:1262
↓ 1 callersMethodsendBody
Sends the response body. This method must be called only after the response headers have been sent (and indicate that there is a body). @param body a
src/main/java/net/freeutils/httpserver/HTTPServer.java:1824
↓ 1 callersMethodserveFile
Serves a context's contents from a file based resource. <p> The file is located by stripping the given context prefix from the request's path, and app
src/main/java/net/freeutils/httpserver/HTTPServer.java:2906
↓ 1 callersMethodserveFileContent
Serves the contents of a file, with its corresponding content type, last modification time, etc. conditional and partial retrievals are handled accord
src/main/java/net/freeutils/httpserver/HTTPServer.java:2940
↓ 1 callersMethodsetAllowGeneratedIndex
Sets whether auto-generated indices are allowed. If false, and a directory resource is requested, an error will be returned instead. @param allowed s
src/main/java/net/freeutils/httpserver/HTTPServer.java:914
↓ 1 callersMethodsetClientCapabilities
Sets the request which is used in determining the capabilities supported by the client (e.g. compression, encoding, etc.) @param req the request
src/main/java/net/freeutils/httpserver/HTTPServer.java:1606
↓ 1 callersMethodsetDiscardBody
Sets whether this response's body is discarded or sent. @param discardBody specifies whether the body is discarded or not
src/main/java/net/freeutils/httpserver/HTTPServer.java:1596
↓ 1 callersMethodsetPort
Sets the port on which this server will accept connections. @param port the port on which this server will accept connections
src/main/java/net/freeutils/httpserver/HTTPServer.java:1935
↓ 1 callersMethodsetServerSocketFactory
Sets the factory used to create the server socket. If null or not set, the default {@link ServerSocketFactory#getDefault()} is used. For secure socket
src/main/java/net/freeutils/httpserver/HTTPServer.java:1952
↓ 1 callersMethodskip
(long len)
src/main/java/net/freeutils/httpserver/HTTPServer.java:273
↓ 1 callersMethodskip
(long len)
src/main/java/net/freeutils/httpserver/HTTPServer.java:537
↓ 1 callersMethodstart
Starts this server. If it is already started, does nothing. Note: Once the server is started, configuration-altering methods of the server and its vir
src/main/java/net/freeutils/httpserver/HTTPServer.java:2030
↓ 1 callersMethodtoMap
Converts a collection of pairs of objects (arrays of size two, each representing a key and corresponding value) into a Map. Duplicate keys are ignored
src/main/java/net/freeutils/httpserver/HTTPServer.java:2384
next →1–100 of 145, ranked by callers