Java String Sanitize sanitize(String mimeType)

Here you can find the source of sanitize(String mimeType)

Description

sanitize

License

Apache License

Declaration

private static String sanitize(String mimeType) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static String sanitize(String mimeType) {
        for (String accepted : new String[] { "application/json", "text/plain" }) {
            if (accepted.equalsIgnoreCase(mimeType)) {
                return accepted;
            }/* w w w  . ja  v a 2  s  .com*/
        }
        return "text/plain";
    }
}

Related

  1. sanitize(final String singleOctets, byte[] dest)
  2. sanitize(String input)
  3. sanitize(String input)
  4. sanitize(String input, String prohibitedStringsRegexp)
  5. sanitize(String methodHeader)
  6. sanitize(String original)
  7. sanitize(String path)
  8. sanitize(String s)
  9. sanitize(String s)