Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.red5.server.util
Class PropertyConverter

    java.lang.Object
      org.red5.server.util.PropertyConverter

    public class PropertyConverter

extends Object

Converter for properties originating from properties files. Predetermined string formats are converted into other usable types such as timestamps.

Author:
  Paul Gregoire (mondain@gmail.com)

Constructor Summary
`PropertyConverter()`

Method Summary
`static Integer` | `convertMillisToSeconds(Long millis)` Quick time converter to keep our timestamps compatible with PHP's time() (seconds)
`static long` | `convertStringToFutureTimeMillis(String time)` Converts a string denoting an amount of time into milliseconds and adds it to the current date.
`static int` | `convertStringToMemorySizeInt(String memSize)` Converts a string denoting an amount of bytes into an integer value.
`static long` | `convertStringToMemorySizeLong(String memSize)` Converts a string denoting an amount of bytes into an long value.
`static long` | `convertStringToTimeMillis(String time)` Converts a string denoting an amount of time into milliseconds.
`static int` | `convertStringToTimeSeconds(String time)` Converts a string denoting an amount of time into seconds.
`static Integer` | `getCurrentTimeSeconds()` Quick time converter to keep our timestamps compatible with PHP's time() (seconds)

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PropertyConverter

    public PropertyConverter()

Method Detail

### convertStringToFutureTimeMillis

    public static long convertStringToFutureTimeMillis(String time)

  Converts a string denoting an amount of time into milliseconds and adds it to the current date. Strings are expected to follow this form where # equals a digit: #M The following are permitted for denoting time: H = hours, M = minutes, S = seconds

  Parameters:
    `time` - time
  Returns:
    time in milliseconds

### convertStringToTimeSeconds

    public static int convertStringToTimeSeconds(String time)

  Converts a string denoting an amount of time into seconds. Strings are expected to follow this form where # equals a digit: #M The following are permitted for denoting time: H = hours, M = minutes, S = seconds

  Parameters:
    `time` - time
  Returns:
    time in seconds

### convertStringToTimeMillis

    public static long convertStringToTimeMillis(String time)

  Converts a string denoting an amount of time into milliseconds. Strings are expected to follow this form where # equals a digit: #M The following are permitted for denoting time: H = hours, M = minutes, S = seconds

  Parameters:
    `time` - time
  Returns:
    time in milliseconds

### convertStringToMemorySizeInt

    public static int convertStringToMemorySizeInt(String memSize)

  Converts a string denoting an amount of bytes into an integer value. Strings are expected to follow this form where # equals a digit: #M The following are permitted for denoting binary size: K = kilobytes, M = megabytes, G = gigabytes

  Parameters:
    `memSize` - memory
  Returns:
    size as an integer

### convertStringToMemorySizeLong

    public static long convertStringToMemorySizeLong(String memSize)

  Converts a string denoting an amount of bytes into an long value. Strings are expected to follow this form where # equals a digit: #M The following are permitted for denoting binary size: K = kilobytes, M = megabytes, G = gigabytes

  Parameters:
    `memSize` - memory size
  Returns:
    size as an long

### getCurrentTimeSeconds

    public static Integer getCurrentTimeSeconds()

  Quick time converter to keep our timestamps compatible with PHP's time() (seconds)

  Returns:
    time in seconds

### convertMillisToSeconds

    public static Integer convertMillisToSeconds(Long millis)

  Quick time converter to keep our timestamps compatible with PHP's time() (seconds)

  Parameters:
    `millis` - milliseconds
  Returns:
    seconds

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2010 The Red5 Project