Package com.caucho.vfs

Examples of com.caucho.vfs.TempCharBuffer


      res.setHeader("Cache-Control", "private");
    }

    // res.setContentLength(_contentLength);

    TempCharBuffer buf = TempCharBuffer.allocate();
    char []cBuf = buf.getBuffer();
    int len;

    PrintWriter out = response.getWriter();
   
    ReadStream rs = _cacheEntry.openRead();
View Full Code Here


  @Override
  protected StringBuilder decodeImpl(Env env, StringValue str)
  {
    ByteBuffer in = ByteBuffer.wrap(str.toBytes());
   
    TempCharBuffer tempBuf = TempCharBuffer.allocate();
   
    try  {
      CharBuffer out = CharBuffer.wrap(tempBuf.getBuffer());
     
      StringBuilder sb = new StringBuilder();
     
      while (in.hasRemaining()) {
        CoderResult coder = _decoder.decode(in, out, false);
View Full Code Here

  public static Value socket_read(Env env,
                                  @NotNull SocketInputOutput socket,
                                  int length, @Optional int type)
  {
    TempBuffer tempBuffer = null;
    TempCharBuffer tempCharBuffer = null;

    try {
      if (type == PHP_NORMAL_READ) {
        return socket.readLine(length);
      } else {
View Full Code Here

  @Override
  protected StringBuilder decodeImpl(Env env, StringValue str)
  {
    ByteBuffer in = ByteBuffer.wrap(str.toBytes());
   
    TempCharBuffer tempBuf = TempCharBuffer.allocate();
   
    try  {
      CharBuffer out = CharBuffer.wrap(tempBuf.getBuffer());
     
      StringBuilder sb = new StringBuilder();
     
      while (in.hasRemaining()) {
        CoderResult coder = _decoder.decode(in, out, false);
View Full Code Here

   * Writes the inode value to a stream.
   */
  public void writeToWriter(Writer writer)
    throws IOException
  {
    TempCharBuffer tempBuffer = TempCharBuffer.allocate();

    char []buffer = tempBuffer.getBuffer();
    int writeLength = buffer.length;
    long offset = 0;

    while (true) {
      int sublen = writeLength;
View Full Code Here

   * @param url the source url to parse from
   */
  private void parseImpl()
    throws IOException, SAXException
  {
    TempCharBuffer inputBuffer = TempCharBuffer.allocate();
    TempCharBuffer valueBuffer = TempCharBuffer.allocate();
    try {
      _valueBuf = valueBuffer.getBuffer();
      _inputBuf = inputBuffer.getBuffer();
      _inputLength = 0;
      _inputOffset = 0;
      _line = 1;

View Full Code Here

   * Writes the inode value to a stream.
   */
  public void writeToWriter(Writer out)
    throws IOException
  {
    TempCharBuffer charBuffer = TempCharBuffer.allocate();
    char []buffer = charBuffer.getBuffer();

    long offset = 0;

    long length = _length;

View Full Code Here

    }
    else if (_charLength == SIZE) {
      _tail.setLength(_charLength);
      _bufferSize += _charLength;
 
      TempCharBuffer tempBuf = TempCharBuffer.allocate();
      _tail.setNext(tempBuf);
      _tail = tempBuf;

      _charBuffer = _tail.getBuffer();
      _charLength = 0;
View Full Code Here

  {
    _tail.setLength(_charLength);
    _bufferSize += _charLength;
    _charLength = 0;

    TempCharBuffer ptr = _head;
    do {
      _head = ptr;
     
      TempCharBuffer next = ptr.getNext();
      ptr.setNext(null);

      writeNext(ptr.getBuffer(), 0, ptr.getLength());

      if (next != null)
View Full Code Here

   */
  public void clearBuffer()
  {
    _charLength = 0;

    TempCharBuffer ptr = _head;
    do {
      _head = ptr;
     
      TempCharBuffer next = ptr.getNext();
      ptr.setNext(null);

      if (next != null)
  TempCharBuffer.free(ptr);

View Full Code Here

TOP

Related Classes of com.caucho.vfs.TempCharBuffer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.