public class Utils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
buildRemoteIpList(javax.servlet.http.HttpServletRequest servletRequest)
Build a comma-separated list based on the remote address of the request and the
X-Forwareded-For header.
|
static String |
getHeader(javax.servlet.http.HttpServletRequest request,
String header) |
static Long |
getLongHeader(javax.servlet.http.HttpServletRequest request,
String header) |
static FileLock |
lockFileExclusively(FileChannel channel) |
static FileLock |
lockFileShared(FileChannel channel) |
static List<String> |
parseConcatenationIDsFromHeader(String uploadConcatValue) |
static <T> T |
readSerializable(Path path,
Class<T> clazz) |
static void |
sleep(long sleepTimeMillis)
Sleep the specified number of milliseconds
|
static void |
writeSerializable(Serializable object,
Path path) |
public static String getHeader(javax.servlet.http.HttpServletRequest request, String header)
public static Long getLongHeader(javax.servlet.http.HttpServletRequest request, String header)
public static String buildRemoteIpList(javax.servlet.http.HttpServletRequest servletRequest)
public static List<String> parseConcatenationIDsFromHeader(String uploadConcatValue)
public static <T> T readSerializable(Path path, Class<T> clazz) throws IOException
IOExceptionpublic static void writeSerializable(Serializable object, Path path) throws IOException
IOExceptionpublic static FileLock lockFileExclusively(FileChannel channel) throws IOException
IOExceptionpublic static FileLock lockFileShared(FileChannel channel) throws IOException
IOExceptionpublic static void sleep(long sleepTimeMillis)
sleepTimeMillis - The time to sleep in millisecondsCopyright © 2019. All rights reserved.