javax.activation API v.1.1 1.1.1-redhat-2

com.sun.activation.registries
Class MimeTypeFile

java.lang.Object
  extended by com.sun.activation.registries.MimeTypeFile

public class MimeTypeFile
extends Object


Constructor Summary
MimeTypeFile()
          Creates an empty DB.
MimeTypeFile(InputStream is)
           
MimeTypeFile(String new_fname)
          The construtor that takes a filename as an argument.
 
Method Summary
 void appendToRegistry(String mime_types)
          Appends string of entries to the types registry, must be valid .mime.types format.
 MimeTypeEntry getMimeTypeEntry(String file_ext)
          get the MimeTypeEntry based on the file extension
 String getMIMETypeString(String file_ext)
          Get the MIME type string corresponding to the file extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MimeTypeFile

public MimeTypeFile(String new_fname)
             throws IOException
The construtor that takes a filename as an argument.

Parameters:
new_fname - The file name of the mime types file.
Throws:
IOException

MimeTypeFile

public MimeTypeFile(InputStream is)
             throws IOException
Throws:
IOException

MimeTypeFile

public MimeTypeFile()
Creates an empty DB.

Method Detail

getMimeTypeEntry

public MimeTypeEntry getMimeTypeEntry(String file_ext)
get the MimeTypeEntry based on the file extension


getMIMETypeString

public String getMIMETypeString(String file_ext)
Get the MIME type string corresponding to the file extension.


appendToRegistry

public void appendToRegistry(String mime_types)
Appends string of entries to the types registry, must be valid .mime.types format. A mime.types entry is one of two forms: type/subtype ext1 ext2 ... or type=type/subtype desc="description of type" exts=ext1,ext2,... Example: # this is a test audio/basic au text/plain txt text type=application/postscript exts=ps,eps


javax.activation API v.1.1 1.1.1-redhat-2

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.