public String getCharset() { return mediaType.getCharset() ; }
public String getCharset() { return mediaType.getCharset() ; }
public String getCharset() { return mediaType.getCharset() ; } public String getType() { return mediaType.getType() ; }
public String getCharset() { return mediaType.getCharset() ; }
TypedInputStreamHttp(InputStream input, MediaType mt, ClientConnectionManager connectMgr) { super(input, mt.getContentType(), mt.getCharset(), null) ; this.connectMgr = connectMgr ; }
public static String getCharsetForContentType(String contentType) { MediaType ct = MediaType.create(contentType) ; if ( ct.getCharset() != null ) return ct.getCharset() ; String mt = ct.getContentType() ; if ( contentTypeNTriples.equals(mt) ) return charsetUTF8 ; if ( contentTypeNTriplesAlt.equals(mt) ) return charsetASCII ; if ( contentTypeNQuads.equals(mt) ) return charsetUTF8 ; if ( contentTypeNQuadsAlt1.equals(mt) ) return charsetASCII ; if ( contentTypeNQuadsAlt2.equals(mt) ) return charsetASCII ; return charsetUTF8 ; }
public static String getCharsetForContentType(String contentType) { MediaType ct = MediaType.create(contentType) ; if ( ct.getCharset() != null ) return ct.getCharset() ; String mt = ct.getContentType() ; if ( contentTypeNTriples.equals(mt) ) return charsetUTF8 ; if ( contentTypeNTriplesAlt.equals(mt) ) return charsetASCII ; if ( contentTypeNQuads.equals(mt) ) return charsetUTF8 ; if ( contentTypeNQuadsAlt1.equals(mt) ) return charsetASCII ; if ( contentTypeNQuadsAlt2.equals(mt) ) return charsetASCII ; return charsetUTF8 ; }
/** Negotiate the content-type and set the response headers */ public static MediaType contentNegotation(HttpAction action, AcceptList myPrefs, MediaType defaultMediaType) { MediaType mt = ConNeg.chooseContentType(action.request, myPrefs, defaultMediaType) ; if ( mt == null ) return null ; if ( mt.getContentType() != null ) action.response.setContentType(mt.getContentType()) ; if ( mt.getCharset() != null ) action.response.setCharacterEncoding(mt.getCharset()) ; return mt ; }
/** Negotiate the content-type and set the response headers */ public static MediaType contentNegotation(HttpAction action, AcceptList myPrefs, MediaType defaultMediaType) { MediaType mt = ConNeg.chooseContentType(action.request, myPrefs, defaultMediaType) ; if ( mt == null ) return null ; if ( mt.getContentType() != null ) action.response.setContentType(mt.getContentType()) ; if ( mt.getCharset() != null ) action.response.setCharacterEncoding(mt.getCharset()) ; return mt ; }
action.id, mediaType.getContentType(), mediaType.getCharset(), lang.getName())) ;
action.id, mediaType.getContentType(), mediaType.getCharset(), lang.getName())) ;
mediaType.getContentType(), mediaType.getCharset(), lang.getName())) ; if ( !RDFLanguages.isQuads(lang) ) ServletOps.errorBadRequest("Not a quads format: " + mediaType) ;
mediaType.getContentType(), mediaType.getCharset(), lang.getName())) ; if ( !RDFLanguages.isQuads(lang) ) ServletOps.errorBadRequest("Not a quads format: " + mediaType) ;