Tabnine Logo
MediaType.getCharset
Code IndexAdd Tabnine to your IDE (free)

How to use
getCharset
method
in
org.apache.jena.atlas.web.MediaType

Best Java code snippets using org.apache.jena.atlas.web.MediaType.getCharset (Showing top 13 results out of 315)

origin: apache/jena

public String getCharset() {
  return mediaType.getCharset() ;
}
origin: apache/jena

public String getCharset()                  { return mediaType.getCharset() ; }

origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

public String getCharset()      { return mediaType.getCharset() ; }
public String getType()         { return mediaType.getType() ; }
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

public String getCharset()                  { return mediaType.getCharset() ; }

origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

TypedInputStreamHttp(InputStream input, MediaType mt, ClientConnectionManager connectMgr)
{
  super(input, mt.getContentType(), mt.getCharset(), null) ;
  this.connectMgr = connectMgr ;
}

origin: apache/jena

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 ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

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 ;
}
origin: apache/jena

/** 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 ;
}

origin: org.apache.jena/jena-fuseki-core

/** 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 ;
}

origin: apache/jena

action.id, mediaType.getContentType(), mediaType.getCharset(), lang.getName())) ;
origin: org.apache.jena/jena-fuseki-core

action.id, mediaType.getContentType(), mediaType.getCharset(), lang.getName())) ;
origin: apache/jena

              mediaType.getContentType(), mediaType.getCharset(), lang.getName())) ;
if ( !RDFLanguages.isQuads(lang) )
  ServletOps.errorBadRequest("Not a quads format: " + mediaType) ;
origin: org.apache.jena/jena-fuseki-core

              mediaType.getContentType(), mediaType.getCharset(), lang.getName())) ;
if ( !RDFLanguages.isQuads(lang) )
  ServletOps.errorBadRequest("Not a quads format: " + mediaType) ;
org.apache.jena.atlas.webMediaTypegetCharset

Popular methods of MediaType

  • getContentType
  • toHeaderString
    Format for use in HTTP header
  • create
  • equals
  • <init>
  • getParameter
  • getSubType
  • getType
  • hashCode
  • parse
  • setParameter
  • toString
    Format to show structure - intentionally different from header form so you can tell parsing happened
  • setParameter,
  • toString,
  • createFromContentType

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • JLabel (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now