public int indexOf(int ch) { return indexOf(ch, 0, this.len); }
/** * Creates a new header from a buffer. * The name of the header will be parsed immediately, * the value only if it is accessed. * * @param buffer the buffer containing the header to represent * * @throws ParseException in case of a parse error */ public BufferedHeader(final CharArrayBuffer buffer) throws ParseException { super(); if (buffer == null) { throw new IllegalArgumentException ("Char array buffer may not be null"); } int colon = buffer.indexOf(':'); if (colon == -1) { throw new ParseException ("Invalid header: " + buffer.toString()); } String s = buffer.substringTrimmed(0, colon); if (s.length() == 0) { throw new ParseException ("Invalid header: " + buffer.toString()); } this.buffer = buffer; this.name = s; this.valuePos = colon + 1; }
int i = cursor.getPos(); int blank = buffer.indexOf(' ', i, indexTo); if (blank < 0) { blank = indexTo;
"closing chunk expected"); int separator = this.buffer.indexOf(';'); if (separator < 0) { separator = this.buffer.length();
"Chunked stream ended unexpectedly"); int separator = this.buffer.indexOf(';'); if (separator < 0) { separator = this.buffer.length();
/** * Returns the index within this buffer of the first occurrence of the * specified character, starting the search at {@code 0} and finishing * at {@link #length()}. If no such character occurs in this buffer within * those bounds, {@code -1} is returned. * * @param ch the char to search for. * @return the index of the first occurrence of the character in the * buffer, or {@code -1} if the character does not occur. */ public int indexOf(final int ch) { return indexOf(ch, 0, this.len); }
/** * Returns the index within this buffer of the first occurrence of the * specified character, starting the search at {@code 0} and finishing * at {@link #length()}. If no such character occurs in this buffer within * those bounds, {@code -1} is returned. * * @param ch the char to search for. * @return the index of the first occurrence of the character in the * buffer, or {@code -1} if the character does not occur. */ public int indexOf(final int ch) { return indexOf(ch, 0, this.len); }
/** * Returns the index within this buffer of the first occurrence of the * specified character, starting the search at {@code 0} and finishing * at {@link #length()}. If no such character occurs in this buffer within * those bounds, {@code -1} is returned. * * @param ch the char to search for. * @return the index of the first occurrence of the character in the * buffer, or {@code -1} if the character does not occur. */ public int indexOf(final int ch) { return indexOf(ch, 0, this.len); }
/** * Returns the index within this buffer of the first occurrence of the * specified character, starting the search at <code>0</code> and finishing * at {@link #length()}. If no such character occurs in this buffer within * those bounds, <code>-1</code> is returned. * * @param ch the char to search for. * @return the index of the first occurrence of the character in the * buffer, or <code>-1</code> if the character does not occur. */ public int indexOf(final int ch) { return indexOf(ch, 0, this.len); }
public int indexOf(int ch) { return indexOf(ch, 0, this.len); }
/** * Returns the index within this buffer of the first occurrence of the * specified character, starting the search at {@code 0} and finishing * at {@link #length()}. If no such character occurs in this buffer within * those bounds, {@code -1} is returned. * * @param ch the char to search for. * @return the index of the first occurrence of the character in the * buffer, or {@code -1} if the character does not occur. */ public int indexOf(final int ch) { return indexOf(ch, 0, this.len); }
public int indexOf(int ch) { return indexOf(ch, 0, this.len); }
public int indexOf(int ch) { return indexOf(ch, 0, this.len); }
public int indexOf(int ch) { return indexOf(ch, 0, this.len); }
/** * Creates a new header from a buffer. * The name of the header will be parsed immediately, * the value only if it is accessed. * * @param buffer the buffer containing the header to represent * * @throws ParseException in case of a parse error */ public BufferedHeader(final CharArrayBuffer buffer) throws ParseException { super(); if (buffer == null) { throw new IllegalArgumentException ("Char array buffer may not be null"); } int colon = buffer.indexOf(':'); if (colon == -1) { throw new ParseException ("Invalid header: " + buffer.toString()); } String s = buffer.substringTrimmed(0, colon); if (s.length() == 0) { throw new ParseException ("Invalid header: " + buffer.toString()); } this.buffer = buffer; this.name = s; this.valuePos = colon + 1; }
/** * Creates a new header from a buffer. * The name of the header will be parsed immediately, * the value only if it is accessed. * * @param buffer the buffer containing the header to represent * * @throws ParseException in case of a parse error */ public BufferedHeader(final CharArrayBuffer buffer) throws ParseException { super(); Args.notNull(buffer, "Char array buffer"); final int colon = buffer.indexOf(':'); if (colon == -1) { throw new ParseException ("Invalid header: " + buffer.toString()); } final String s = buffer.substringTrimmed(0, colon); if (s.length() == 0) { throw new ParseException ("Invalid header: " + buffer.toString()); } this.buffer = buffer; this.name = s; this.valuePos = colon + 1; }
/** * Creates a new header from a buffer. * The name of the header will be parsed immediately, * the value only if it is accessed. * * @param buffer the buffer containing the header to represent * * @throws ParseException in case of a parse error */ public BufferedHeader(final CharArrayBuffer buffer) throws ParseException { super(); Args.notNull(buffer, "Char array buffer"); final int colon = buffer.indexOf(':'); if (colon == -1) { throw new ParseException ("Invalid header: " + buffer.toString()); } final String s = buffer.substringTrimmed(0, colon); if (s.length() == 0) { throw new ParseException ("Invalid header: " + buffer.toString()); } this.buffer = buffer; this.name = s; this.valuePos = colon + 1; }
/** * Creates a new header from a buffer. * The name of the header will be parsed immediately, * the value only if it is accessed. * * @param buffer the buffer containing the header to represent * * @throws ParseException in case of a parse error */ public BufferedHeader(final CharArrayBuffer buffer) throws ParseException { super(); Args.notNull(buffer, "Char array buffer"); final int colon = buffer.indexOf(':'); if (colon == -1) { throw new ParseException ("Invalid header: " + buffer.toString()); } final String s = buffer.substringTrimmed(0, colon); if (s.length() == 0) { throw new ParseException ("Invalid header: " + buffer.toString()); } this.buffer = buffer; this.name = s; this.valuePos = colon + 1; }