congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Representation.isEmpty
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.restlet.osgi/org.restlet

/**
 * Converts the representation to a string value. Be careful when using this
 * method as the conversion of large content to a string fully stored in
 * memory can result in OutOfMemoryErrors being thrown.
 * 
 * @return The representation as a string value.
 */
public String getText() throws IOException {
  String result = null;
  if (isEmpty()) {
    result = "";
  } else if (isAvailable()) {
    java.io.StringWriter sw = new java.io.StringWriter();
    write(sw);
    sw.flush();
    result = sw.toString();
  }
  return result;
}
origin: DeviceConnect/DeviceConnect-Android

/**
 * Converts the representation to a string value. Be careful when using this
 * method as the conversion of large content to a string fully stored in
 * memory can result in OutOfMemoryErrors being thrown.
 * 
 * @return The representation as a string value.
 */
public String getText() throws IOException {
  String result = null;
  if (isEmpty()) {
    result = "";
  } else if (isAvailable()) {
    java.io.StringWriter sw = new java.io.StringWriter();
    write(sw);
    sw.flush();
    result = sw.toString();
  }
  return result;
}
origin: org.restlet.osgi/org.restlet

if (response.getEntity().isEmpty()) {
  response.getEntity().release();
} else if (response.getRequest().getMethod().equals(Method.HEAD)) {
org.restlet.representationRepresentationisEmpty

Javadoc

Indicates if the representation is empty. It basically means that its size is 0.

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

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getContentResolver (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Kernel (java.awt.image)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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