Package org.apache.mina.core.buffer

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


     * @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

     * @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

            try {
                localWrittenBytes = write(session, buf, length);
            } catch (IOException ioe) {
                // We have had an issue while trying to send data to the
                // peer : let's close the session.
                buf.free();
                session.close(true);
                destroy(session);

                return 0;
            }
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

    if (event instanceof IStreamData<?>) {
      log.debug("Discarding: {}", ((IStreamData<?>) event).toString());
      IoBuffer data = ((IStreamData<?>) event).getData();
      if (data != null) {
        log.trace("Freeing discarded event data");
        data.free();
        data = null;
      }
    }
    event.setHeader(null);
 
View Full Code Here

      byte[] cachedBytes = new byte[out.limit()];
      out.get(cachedBytes);
      out.clear();
      cachedStatusObjects.put(statusCode, cachedBytes);
    }
    out.free();
    out = null;
  }

  /**
   * Serializes status object
View Full Code Here

      final IoBuffer localData = data;
      // null out the data first so we don't accidentally
      // return a valid reference first
      data = null;
      localData.clear();
      localData.free();
    }
  }

  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
View Full Code Here

      tmp.flip();
      // Size of header data
      result.putInt(tmp.limit());
      // Header data
      result.put(tmp);
      tmp.free();
      tmp = null;
    }
    // One body
    result.putShort((short) 1);
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.