OOP MimeParser Version 3.5

com.bentofw.util
Class AcceptMime

java.lang.Object
  extended by com.bentofw.util.AcceptMime

public class AcceptMime
extends java.lang.Object

Read the list of the acceptable mime-types from the resource file, and returns the Set object.

The returned Set object contains the acceptable mime-types, which can be used by:

The list of the acceptable mime-types can be written in: The keys in this property file must be the mime-types, and their corresponding values must be either yes or no. Only the mime-types with the value of yes will be treated as acceptable.

Since:
1.3
Author:
Jun Inamori


Method Summary
static java.util.Set getAcceptMime()
          Read the list of the acceptable mime-types from the resource file, and returns the Set object.
static AcceptMime getInstance()
           
static java.lang.String getStringList(java.util.Set mimes)
          Returns String object which concatenates the acceptable mime-types.
 void setDebug(boolean db)
           
 void setLogger(GenericLogger logger)
          Set GenericLogger object to which the log messages will be written.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setDebug

public void setDebug(boolean db)

getInstance

public static AcceptMime getInstance()

getAcceptMime

public static java.util.Set getAcceptMime()
                                   throws NestedException
Read the list of the acceptable mime-types from the resource file, and returns the Set object.

Returns:
Set which includes the list of acceptable mime-types.
Throws:
NestedException

getStringList

public static java.lang.String getStringList(java.util.Set mimes)
Returns String object which concatenates the acceptable mime-types.

In usual, the parameter of this method is the Set object, which is returned by getAcceptMime().

For example, if the given Set object contains: then this method returns: If the given Set object contains: then this method returns:

Parameters:
mimes - The Set object includeing the acceptable mime-types.
Returns:
String object which concatenates the acceptable mime-types.

setLogger

public void setLogger(GenericLogger logger)
Set GenericLogger object to which the log messages will be written.

Parameters:
logger - GenericLogger object to which the log messages will be written.

OOP MimeParser Version 3.5

ALL CONTENTS COPYRIGHT 2005, OOP-Research Corporation. All rights reserved.
Any questions and comments are welcome to OOP-Research Corporation.