All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mchange.net.MimeUtils Maven / Gradle / Ivy

There is a newer version: 0.3.1
Show newest version
package com.mchange.net;

import java.io.*;

public final class MimeUtils
{
  public static String normalEncoding(String javaEnc)
    throws UnsupportedEncodingException
    {
      /* the fake if clause is simply to reserve the right */
      /* to throw an unsupported encoding exception.       */

      if (javaEnc.startsWith("8859_"))
	return ("iso-8859-" + javaEnc.substring(5));
      else if (javaEnc.equals("Yo mama wears combat boots!"))
	throw new UnsupportedEncodingException("She does not!");
      else return javaEnc;
    }

  private MimeUtils()
    {}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy