Tabnine Logo
ByteChunk.resetStringCache
Code IndexAdd Tabnine to your IDE (free)

How to use
resetStringCache
method
in
org.glassfish.grizzly.http.util.ByteChunk

Best Java code snippets using org.glassfish.grizzly.http.util.ByteChunk.resetStringCache (Showing top 20 results out of 315)

origin: org.glassfish.grizzly/grizzly-http

public void allocate( int initial, int limit  ) {
  boolean output = true;
  if( buff==null || buff.length < initial ) {
    buff=new byte[initial];
  }
  this.limit=limit;
  start=0;
  end=0;
  isSet=true;
  resetStringCache();
}
origin: org.glassfish.grizzly/grizzly-http

@Override
public void setStart(int start) {
  if (end < start) {
    end = start;
  }
  this.start = start;
  resetStringCache();
}

origin: org.glassfish.grizzly/grizzly-websockets-server

public void recycleAndReset() {
  buff = null;
  charset=null;
  start=0;
  end=0;
  isSet=false;
  resetStringCache();
}

origin: org.glassfish.grizzly/grizzly-websockets-server

@Override
public void setStart(int start) {
  if (end < start) {
    end = start;
  }
  this.start = start;
  resetStringCache();
}

origin: javaee/grizzly

/** Maximum amount of data in this buffer.
 *
 *  If -1 or not set, the buffer will grow indefinitely.
 *  Can be smaller than the current buffer size ( which will not shrink ).
 *  When the limit is reached, the buffer will be flushed ( if out is set )
 *  or throw exception.
 */
public void setLimit(int limit) {
  this.limit=limit;
  resetStringCache();
}
origin: javaee/grizzly

@Override
public void setStart(int start) {
  if (end < start) {
    end = start;
  }
  this.start = start;
  resetStringCache();
}

origin: javaee/grizzly

@Override
public void setEnd( int i ) {
  end=i;
  resetStringCache();
}
origin: javaee/grizzly

public void allocate( int initial, int limit  ) {
  boolean output = true;
  if( buff==null || buff.length < initial ) {
    buff=new byte[initial];
  }
  this.limit=limit;
  start=0;
  end=0;
  isSet=true;
  resetStringCache();
}
origin: javaee/grizzly

public void trimLeft() {
  boolean modified = false;
  while (buff[start] <= 0x20) {
    modified = true;
    start++;
  }
  if (modified) {
    resetStringCache();
  }
}
origin: javaee/grizzly

@Override
public void setStart(int start) {
  if (end < start) {
    end = start;
  }
  this.start = start;
  resetStringCache();
}

origin: javaee/grizzly

public void allocate( int initial, int limit  ) {
  boolean output = true;
  if( buff==null || buff.length < initial ) {
    buff=new byte[initial];
  }
  this.limit=limit;
  start=0;
  end=0;
  isSet=true;
  resetStringCache();
}
origin: javaee/grizzly

public void trimLeft() {
  boolean modified = false;
  while (buff[start] <= 0x20) {
    modified = true;
    start++;
  }
  if (modified) {
    resetStringCache();
  }
}
origin: javaee/grizzly

public void allocate( int initial, int limit  ) {
  boolean output = true;
  if( buff==null || buff.length < initial ) {
    buff=new byte[initial];
  }
  this.limit=limit;
  start=0;
  end=0;
  isSet=true;
  resetStringCache();
}
origin: javaee/grizzly

/** Maximum amount of data in this buffer.
 *
 *  If -1 or not set, the buffer will grow indefinitely.
 *  Can be smaller than the current buffer size ( which will not shrink ).
 *  When the limit is reached, the buffer will be flushed ( if out is set )
 *  or throw exception.
 */
public void setLimit(int limit) {
  this.limit=limit;
  resetStringCache();
}
origin: javaee/grizzly

@Override
public void setEnd( int i ) {
  end=i;
  resetStringCache();
}
origin: javaee/grizzly

public int substract()
  throws IOException {
  resetStringCache();
  if ((end - start) == 0) {
    if (in == null)
      return -1;
    int n = in.realReadBytes( buff, 0, buff.length );
    if (n < 0)
      return -1;
  }
  return (buff[start++] & 0xFF);
}
origin: javaee/grizzly

public int substract()
  throws IOException {
  resetStringCache();
  if ((end - start) == 0) {
    if (in == null)
      return -1;
    int n = in.realReadBytes( buff, 0, buff.length );
    if (n < 0)
      return -1;
  }
  return (buff[start++] & 0xFF);
}
origin: org.glassfish.grizzly/grizzly-http

public int substract()
  throws IOException {
  resetStringCache();
  if ((end - start) == 0) {
    if (in == null)
      return -1;
    int n = in.realReadBytes( buff, 0, buff.length );
    if (n < 0)
      return -1;
  }
  return (buff[start++] & 0xFF);
}
origin: javaee/grizzly

public void append( byte b ) throws IOException {
  resetStringCache();
  makeSpace( 1 );
  // couldn't make space
  if( limit >0 && end >= limit ) {
    flushBuffer();
  }
  buff[end++]=b;
}
origin: javaee/grizzly

public void append( byte b ) throws IOException {
  resetStringCache();
  makeSpace( 1 );
  // couldn't make space
  if( limit >0 && end >= limit ) {
    flushBuffer();
  }
  buff[end++]=b;
}
org.glassfish.grizzly.http.utilByteChunkresetStringCache

Popular methods of ByteChunk

  • getBuffer
    Returns the message bytes.
  • getEnd
  • getStart
    Returns the start offset of the bytes. For output this is the end of the buffer.
  • <init>
  • append
    Add data to the buffer
  • getBytes
    Returns the message bytes.
  • getLength
    Returns the length of the bytes. XXX need to clean this up
  • indexOf
  • setBytes
    Sets the message bytes to the specified sub-array of bytes.
  • setEnd
  • toString
  • allocate
  • toString,
  • allocate,
  • canGrow,
  • delete,
  • equals,
  • equalsIgnoreCase,
  • equalsIgnoreCaseLowerCase,
  • flushBuffer,
  • getCharset,
  • getInt

Popular in Java

  • Finding current android device location
  • findViewById (Activity)
  • getExternalFilesDir (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top 12 Jupyter Notebook extensions
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