Package org.apache.mina.core.buffer

Examples of org.apache.mina.core.buffer.IoBuffer.free()


    if (path.length() > 0 && path.charAt(0) == '/') {
      path = path.substring(1);
    }
    log.debug("Path: {} Scope path: {}", path, packet.getScopePath());
    packet.setScopePath(path);
    reqBuffer.free();
    reqBuffer = null;
    return packet;
  }

  /**
 
View Full Code Here


      final ServletOutputStream out = resp.getOutputStream();
      resp.setContentLength(respBuffer.limit());
      ServletUtils.copy(respBuffer.asInputStream(), out);
      out.flush();
      out.close();
      respBuffer.free();
      respBuffer = null;
    } else {
      log.info("Response buffer was null after encoding");
    }
  }
View Full Code Here

      }
      log.debug("Decrypting buffer: {}", message);
      byte[] encrypted = new byte[message.remaining()];
      message.get(encrypted);
      message.clear();
      message.free();
      byte[] plain = cipher.update(encrypted);
      IoBuffer messageDecrypted = IoBuffer.wrap(plain);
      log.debug("Decrypted buffer: {}", messageDecrypted);
      nextFilter.messageReceived(session, messageDecrypted);
    } else {
View Full Code Here

      } else {
        log.debug("Encrypting buffer: {}", message);
        byte[] plain = new byte[message.remaining()];
        message.get(plain);
        message.clear();
        message.free();
        //encrypt and write
        byte[] encrypted = cipher.update(plain);
        IoBuffer messageEncrypted = IoBuffer.wrap(encrypted);
        log.debug("Encrypted buffer: {}", messageEncrypted);
        nextFilter.filterWrite(session, new EncryptedWriteRequest(request, messageEncrypted));
View Full Code Here

        log.error("Could not create / write file {}", filename, e);
        log.warn("Exception {}", e);
        result = false;
      } finally {
        if (buf != null) {
          buf.free();
          buf = null;
        }
        file = null;
        dir = null;
      }
View Full Code Here

              out.putInt(extendedTimestamp);
            }
          }
          BufferUtils.put(out, data, dataLen);
        }
        data.free();
        out.flip();
        data = null;
      }
    }
    message.release();
View Full Code Here

     * @param session the session we operate on
     */
    private void free(IoSession session) {
        IoBuffer buf = buffersMap.remove(session);
        if (buf != null) {
            buf.free();
        }
    }

    /**
     * {@inheritDoc}
 
View Full Code Here

     * @param session the session we operate on
     */
    private void free(IoSession session) {
        IoBuffer buf = buffersMap.remove(session);
        if (buf != null) {
            buf.free();
        }
    }

    /**
     * {@inheritDoc}
 
View Full Code Here

     * @param session the session we operate on
     */
    private void free(IoSession session) {
        IoBuffer buf = buffersMap.remove(session);
        if (buf != null) {
            buf.free();
        }
    }

    /**
     * {@inheritDoc}
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.