public class Utils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
HTTP_DATE_FORMAT
Format used for HTTP date headers.
|
static String |
Version |
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static DateFormat |
GetHTTPDateFormater()
Get a new date formatter compatible with HTTP headers protocol.
|
static Path |
MakePath(Object path)
Converts a string to a
Path by checking to see if it is a URI for any of the known providers, or just a plain File path. |
static org.apache.http.HttpEntity |
WrapObjWithHttpEntity(Object obj,
org.apache.http.entity.ContentType ct)
Wrap a few classes of objects into an appropriate HttpEntity.
|
public static final String Version
public static final String HTTP_DATE_FORMAT
public static Path MakePath(Object path)
Path
by checking to see if it is a URI for any of the known providers, or just a plain File
path.
WARNING! This is not an efficient routine and should NOT be called in performance critical code.public static DateFormat GetHTTPDateFormater()
public static org.apache.http.HttpEntity WrapObjWithHttpEntity(Object obj, org.apache.http.entity.ContentType ct)
obj
- Currently may be one of:
org.apache.http.HttpEntity
java.lang.String
java.lang.byte[]
java.nio.ByteBuffer
java.io.InputStream
java.io.Filect
- The content type (if any) of 'obj'Copyright © 2015–2024 Frank Stock. All rights reserved.