public static String getContentType ( Calendar calendar , Charset charset ) { final StringBuilder b = new StringBuilder ( "text/calendar" ) ; final Method method = calendar . getProperty ( Property . METHOD ) ; if ( method != null ) { b . append ( "; method=" ) ; b . append ( method . getValue ( ) ) ; } if ( charset != null ) { b . append ( "; charset=" ) ; b . append ( charset ) ; } return b . toString ( ) ; }
Returns an appropriate MIME Content - Type for the specified calendar object .