Tabnine Logo
Representation.setEncodings
Code IndexAdd Tabnine to your IDE (free)

How to use
setEncodings
method
in
org.restlet.representation.Representation

Best Java code snippets using org.restlet.representation.Representation.setEncodings (Showing top 4 results out of 315)

origin: org.restlet.osgi/org.restlet

@Override
public void setEncodings(List<Encoding> encodings) {
  getWrappedRepresentation().setEncodings(encodings);
}
origin: org.restlet/org.restlet.ext.xml

    .setMediaType(representation.getMediaType());
resultRepresentation
    .setEncodings(representation.getEncodings());
resultRepresentation
    .setLanguages(representation.getLanguages());
origin: org.restlet/org.restlet.ext.xml

  @Override
  public Representation toRepresentation(Object object,
      Variant targetVariant, UniformResource resource) throws IOException {
    Representation result = null;

    if (object instanceof Document) {
      result = new DomRepresentation(targetVariant == null ? null
          : targetVariant.getMediaType(), (Document) object);
    }

    if ((result != null) && (targetVariant != null)) {
      // Copy the variant metadata
      result.setCharacterSet(targetVariant.getCharacterSet());
      result.setMediaType(targetVariant.getMediaType());
      result.setEncodings(targetVariant.getEncodings());
      result.setLanguages(targetVariant.getLanguages());
    }

    return result;
  }
}
origin: org.restlet.osgi/org.restlet

/**
 * Constructor from a variant.
 * 
 * @param variant
 *            The variant to copy.
 * @param modificationDate
 *            The modification date.
 * @param tag
 *            The tag.
 */
public Representation(Variant variant, Date modificationDate, Tag tag) {
  setCharacterSet(variant.getCharacterSet());
  setEncodings(variant.getEncodings());
  setLocationRef(variant.getLocationRef());
  setLanguages(variant.getLanguages());
  setMediaType(variant.getMediaType());
  setModificationDate(modificationDate);
  setTag(tag);
}
org.restlet.representationRepresentationsetEncodings

Popular methods of Representation

  • getMediaType
  • getStream
    Returns a stream with the representation's content. This method is ensured to return a fresh stream
  • getText
    Converts the representation to a string value. Be careful when using this method as the conversion o
  • isAvailable
    Indicates if some fresh content is potentially available, without having to actually call one of the
  • write
    Writes the representation to a byte channel. This method is ensured to write the full content for ea
  • setMediaType
  • getCharacterSet
  • getReader
    Returns a characters reader with the representation's content. This method is ensured to return a fr
  • getSize
    Returns the total size in bytes if known, UNKNOWN_SIZE (-1) otherwise. When ranges are used, this mi
  • setCharacterSet
  • getModificationDate
  • release
    Releases the representation and all associated objects like streams, channels or files which are use
  • getModificationDate,
  • release,
  • getLanguages,
  • setModificationDate,
  • getEncodings,
  • getLocationRef,
  • setTag,
  • exhaust,
  • getDisposition,
  • getTag

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for Android Studio
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