Package com.caucho.vfs

Examples of com.caucho.vfs.TempBuffer


   * Clears the response buffer.
   */
  @Override
  public void clearBuffer()
  {
    TempBuffer next = _head.getNext();

    if (next != null) {
      _head.setNext(null);
      TempBuffer.freeAll(next);
    }
View Full Code Here


    }
    else if (_tailByteLength == SIZE) {
      _tail.setLength(_tailByteLength);
      _bufferSize += _tailByteLength;

      TempBuffer tempBuf = TempBuffer.allocate();
      _tail.setNext(tempBuf);
      _tail = tempBuf;

      _tailByteBuffer = _tail.getBuffer();
      _tailByteLength = 0;
View Full Code Here

    while (length > 0) {
      if (SIZE <= byteLength) {
        _tail.setLength(byteLength);
        _bufferSize += byteLength;

        TempBuffer tempBuf = TempBuffer.allocate();
        _tail.setNext(tempBuf);
        _tail = tempBuf;

        _tailByteBuffer = _tail.getBuffer();
        byteLength = 0;
View Full Code Here

    }
    else {
      _tail.setLength(offset);
      _bufferSize += offset;

      TempBuffer tempBuf = TempBuffer.allocate();
      _tail.setNext(tempBuf);
      _tail = tempBuf;

      _tailByteBuffer = _tail.getBuffer();
      _tailByteLength = 0;
View Full Code Here

    _bufferSize += _tailByteLength;
    _tailByteLength = 0;
   
    writeHeaders(_bufferSize);

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

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

      if (ptr != _head) {
View Full Code Here

    // out.println("   /Filter /DCTDecode");
    out.println("   /Length " + length);
    out.println(">>");
    out.println("stream");

    TempBuffer tb = TempBuffer.allocate();
    byte []buffer = tb.getBuffer();
    int sublen;
   
    InputStream is = _path.openRead();
   
    while ((sublen = is.read(buffer, 0, buffer.length)) > 0) {
View Full Code Here

    out.println("<< /Type /EmbeddedFile");
    out.println("   /Length " + length);
    out.println(">>");
    out.println("stream");

    TempBuffer tb = TempBuffer.allocate();
    byte []buffer = tb.getBuffer();
    int sublen;
   
    InputStream is = _path.openRead();
   
    while ((sublen = is.read(buffer, 0, buffer.length)) > 0) {
View Full Code Here

  public int write(InputStream is, int length)
    throws IOException
  {
    int writeLength = 0;

    TempBuffer tb = TempBuffer.allocate();
    byte []buffer = tb.getBuffer();

    try {
      while (length > 0) {
        int sublen;
View Full Code Here

   */
  public int write(InputStream is, int length)
  {
    int writeLength = 0;

    TempBuffer tb = TempBuffer.allocate();
    byte []buffer = tb.getBuffer();

    try {
      while (length > 0) {
        int sublen;

View Full Code Here

   */
  public int write(InputStream is, int length)
  {
    int writeLength = 0;

    TempBuffer tb = TempBuffer.allocate();
    byte []buffer = tb.getBuffer();

    try {
      while (length > 0) {
        int sublen;

View Full Code Here

TOP

Related Classes of com.caucho.vfs.TempBuffer

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.