asia.redact.bracket.properties
Class ContentType

java.lang.Object
  extended by asia.redact.bracket.properties.ContentType

public class ContentType
extends Object

This is like a content or mime type from an http page There does not seem to be an official java properties content type. I am using text/x-java-properties as it is cited here: http://stackoverflow.com/questions/6248130/what-is-the-mime-type-for-properties-files Our default encoding is UTF-8 but for Compatibility you should use US-ASCII or ISO-8895-1

Author:
Dave

Field Summary
private  String charsetName
           
private  String mimeType
           
 
Constructor Summary
ContentType()
           
ContentType(String mimeType, String charsetName)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getCharsetName()
           
static ContentType getCompatibilityContentType()
           
static ContentType getDotPropertiesContentType()
           
 String getMimeType()
           
 int hashCode()
           
 void setCharsetName(String charsetName)
           
 void setMimeType(String mimeType)
           
 String toString()
           
 boolean validate()
           The defined content types which will successfully validate are: text/x-java-properties text/x-java-dot-properties
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

mimeType

private String mimeType

charsetName

private String charsetName
Constructor Detail

ContentType

public ContentType()

ContentType

public ContentType(String mimeType,
                   String charsetName)
Method Detail

validate

public boolean validate()
 The defined content types which will successfully validate are:
 text/x-java-properties
 text/x-java-dot-properties
 
 

Returns:

getMimeType

public String getMimeType()

setMimeType

public void setMimeType(String mimeType)

getCharsetName

public String getCharsetName()

setCharsetName

public void setCharsetName(String charsetName)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

getCompatibilityContentType

public static ContentType getCompatibilityContentType()

getDotPropertiesContentType

public static ContentType getDotPropertiesContentType()


Copyright © 2011-2013 David R. Smith. All Rights Reserved.