org.japtproxy.misc
Class Util

java.lang.Object
  extended by org.japtproxy.misc.Util

public final class Util
extends java.lang.Object

Utility class.

Version:
$LastChangedRevision: 120 $
Author:
Oliver J. Siegmar

Field Summary
static int DEFAULT_BUFFER_SIZE
          Buffer size that is used for all output buffers.
static java.lang.String USER_AGENT
          The user-agent string.
static java.lang.String VERSION
          The Japt-Proxy version.
 
Method Summary
static java.lang.String getMimetype(java.lang.String filename)
          Returns a mime-type for a given file extension.
static java.lang.String getRfc822DateFromTimestamp(long timestamp)
          Returns a rfc822 compliant date from a given timestamp.
static java.lang.String getSimpleDateFromTimestamp(long timestamp)
          Returns a loggable date from a given timestamp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
The Japt-Proxy version.


USER_AGENT

public static final java.lang.String USER_AGENT
The user-agent string.


DEFAULT_BUFFER_SIZE

public static final int DEFAULT_BUFFER_SIZE
Buffer size that is used for all output buffers.

See Also:
Constant Field Values
Method Detail

getSimpleDateFromTimestamp

public static java.lang.String getSimpleDateFromTimestamp(long timestamp)
Returns a loggable date from a given timestamp.

Parameters:
timestamp - the timestamp to convert
Returns:
a loggable date

getRfc822DateFromTimestamp

public static java.lang.String getRfc822DateFromTimestamp(long timestamp)
Returns a rfc822 compliant date from a given timestamp.

Parameters:
timestamp - the timestamp to convert
Returns:
a rfc822 compliant date

getMimetype

public static java.lang.String getMimetype(java.lang.String filename)
Returns a mime-type for a given file extension. Returns null if the file extension is not mapped.

Parameters:
extension - the file extension to get a mime-type for
Returns:
the mime-type for the given file extension


Copyright © 2006-2008. All Rights Reserved.