/** * Recycle the output buffer. */ public void recycle() { state = INITIAL_STATE; // If usage of mark made the buffer too big, reallocate it if (cb.capacity() > size) { cb = CharBuffer.allocate(size); clear(cb); } else { clear(cb); } readLimit = size; markPos = -1; clear(bb); closed = false; if (conv != null) { conv.recycle(); encoders.get(conv.getCharset()).push(conv); conv = null; } }
/** * Recycle the output buffer. */ public void recycle() { state = INITIAL_STATE; // If usage of mark made the buffer too big, reallocate it if (cb.capacity() > size) { cb = CharBuffer.allocate(size); clear(cb); } else { clear(cb); } readLimit = size; markPos = -1; clear(bb); closed = false; if (conv != null) { conv.recycle(); encoders.get(conv.getCharset()).push(conv); conv = null; } }
/** * Recycle the output buffer. */ public void recycle() { state = INITIAL_STATE; // If usage of mark made the buffer too big, reallocate it if (cb.getChars().length > size) { cb = new CharChunk(size); cb.setLimit(size); cb.setOptimizedWrite(false); cb.setCharInputChannel(this); } else { cb.recycle(); } markPos = -1; bb.recycle(); closed = false; eof = false; if (conv != null) { conv.recycle(); } gotEnc = false; enc = null; readListener = null; }
/** * Recycle the output buffer. */ public void recycle() { state = INITIAL_STATE; // If usage of mark made the buffer too big, reallocate it if (cb.getChars().length > size) { cb = new CharChunk(size); cb.setLimit(size); cb.setOptimizedWrite(false); cb.setCharInputChannel(this); } else { cb.recycle(); } markPos = -1; bb.recycle(); closed = false; eof = false; if (conv != null) { conv.recycle(); } gotEnc = false; enc = null; }
/** * Recycle the output buffer. */ public void recycle() { state = INITIAL_STATE; bytesRead = 0; charsRead = 0; // If usage of mark made the buffer too big, reallocate it if(cb.getChars().length > size) { cb = new CharChunk(size); cb.setLimit(size); cb.setCharInputChannel(this); cb.setCharOutputChannel(this); } else { cb.recycle(); } markPos = -1; bb.recycle(); closed = false; if(conv != null) { conv.recycle(); } gotEnc = false; enc = null; }
/** * Recycle the output buffer. */ public void recycle() { state = INITIAL_STATE; // If usage of mark made the buffer too big, reallocate it if (cb.getChars().length > size) { cb = new CharChunk(size); cb.setLimit(size); cb.setOptimizedWrite(false); cb.setCharInputChannel(this); cb.setCharOutputChannel(this); } else { cb.recycle(); } markPos = -1; bb.recycle(); closed = false; if (conv != null) { conv.recycle(); } gotEnc = false; enc = null; }
/** * Recycle the output buffer. */ public void recycle() { state = INITIAL_STATE; // If usage of mark made the buffer too big, reallocate it if (cb.getChars().length > size) { cb = new CharChunk(size); cb.setLimit(size); cb.setOptimizedWrite(false); cb.setCharInputChannel(this); cb.setCharOutputChannel(this); } else { cb.recycle(); } markPos = -1; bb.recycle(); closed = false; if (conv != null) { conv.recycle(); } gotEnc = false; enc = null; }
/** * Recycle the output buffer. */ public void recycle() { state = INITIAL_STATE; // If usage of mark made the buffer too big, reallocate it if (cb.getChars().length > size) { cb = new CharChunk(size); cb.setLimit(size); cb.setOptimizedWrite(false); cb.setCharInputChannel(this); cb.setCharOutputChannel(this); } else { cb.recycle(); } markPos = -1; bb.recycle(); closed = false; if (conv != null) { conv.recycle(); } gotEnc = false; enc = null; }
/** * Recycle the output buffer. */ public void recycle() { state = INITIAL_STATE; // If usage of mark made the buffer too big, reallocate it if (cb.getChars().length > size) { cb = new CharChunk(size); cb.setLimit(size); cb.setOptimizedWrite(false); cb.setCharInputChannel(this); cb.setCharOutputChannel(this); } else { cb.recycle(); } markPos = -1; bb.recycle(); closed = false; if (conv != null) { conv.recycle(); } gotEnc = false; enc = null; }
/** * Recycle the output buffer. */ public void recycle() { state = INITIAL_STATE; // If usage of mark made the buffer too big, reallocate it if (cb.getChars().length > size) { cb = new CharChunk(size); cb.setLimit(size); cb.setOptimizedWrite(false); cb.setCharInputChannel(this); cb.setCharOutputChannel(this); } else { cb.recycle(); } markPos = -1; bb.recycle(); closed = false; if (conv != null) { conv.recycle(); } gotEnc = false; enc = null; }
/** * Recycle the output buffer. */ public void recycle() { state = INITIAL_STATE; // If usage of mark made the buffer too big, reallocate it if (cb.getChars().length > size) { cb = new CharChunk(size); cb.setLimit(size); cb.setOptimizedWrite(false); cb.setCharInputChannel(this); cb.setCharOutputChannel(this); } else { cb.recycle(); } markPos = -1; bb.recycle(); closed = false; if (conv != null) { conv.recycle(); } gotEnc = false; enc = null; }
/** * Recycle the output buffer. */ public void recycle() { state = INITIAL_STATE; // If usage of mark made the buffer too big, reallocate it if (cb.getChars().length > size) { cb = new CharChunk(size); cb.setLimit(size); cb.setOptimizedWrite(false); cb.setCharInputChannel(this); cb.setCharOutputChannel(this); } else { cb.recycle(); } markPos = -1; bb.recycle(); closed = false; if (conv != null) { conv.recycle(); } gotEnc = false; enc = null; }
request.setURIConverter(conv); } else { conv.recycle();
/* 579 */ conv.recycle();
request.setURIConverter(conv); } else { conv.recycle();
/** * Character conversion of the URI. * * @param uri MessageBytes object containing the URI * @param request The Servlet request object * @throws IOException if a IO exception occurs sending an error to the client */ protected void convertURI(MessageBytes uri, Request request) throws IOException { ByteChunk bc = uri.getByteChunk(); int length = bc.getLength(); CharChunk cc = uri.getCharChunk(); cc.allocate(length, -1); Charset charset = connector.getURICharset(); B2CConverter conv = request.getURIConverter(); if (conv == null) { conv = new B2CConverter(charset, true); request.setURIConverter(conv); } else { conv.recycle(); } try { conv.convert(bc, cc, true); uri.setChars(cc.getBuffer(), cc.getStart(), cc.getLength()); } catch (IOException ioe) { // Should never happen as B2CConverter should replace // problematic characters request.getResponse().sendError(HttpServletResponse.SC_BAD_REQUEST); } }
/** * Character conversion of the URI. * * @param uri MessageBytes object containing the URI * @param request The Servlet request object * @throws IOException if a IO exception occurs sending an error to the client */ protected void convertURI(MessageBytes uri, Request request) throws IOException { ByteChunk bc = uri.getByteChunk(); int length = bc.getLength(); CharChunk cc = uri.getCharChunk(); cc.allocate(length, -1); Charset charset = connector.getURICharset(); B2CConverter conv = request.getURIConverter(); if (conv == null) { conv = new B2CConverter(charset, true); request.setURIConverter(conv); } else { conv.recycle(); } try { conv.convert(bc, cc, true); uri.setChars(cc.getBuffer(), cc.getStart(), cc.getLength()); } catch (IOException ioe) { // Should never happen as B2CConverter should replace // problematic characters request.getResponse().sendError(HttpServletResponse.SC_BAD_REQUEST); } }
request.setURIConverter(conv); } else { conv.recycle();
request.setURIConverter(conv); } else { conv.recycle();
request.setURIConverter(conv); } else { conv.recycle();