Unwraps a buffer.  Does a variety of checks before grabbing
the unwrapLock, which blocks multiple unwraps from occuring.
490507
public SSLEngineResult unwrap(ByteBuffer netData, ByteBuffer [] appData,
            int offset, int length) throws SSLException {

        EngineArgs ea = new EngineArgs(netData, appData, offset, length);

        try {
            synchronized (unwrapLock) {
                return readNetRecord(ea);
            }
        } catch (Exception e) {
            /*
             * Don't reset position so it looks like we didn't
             * consume anything.  We did consume something, and it
             * got us into this situation, so report that much back.
             * Our days of consuming are now over anyway.
             */
            fatal(Alerts.alert_internal_error,
                "problem unwrapping net record", e);
            return null;  // make compiler happy
        } finally {
            /*
             * Just in case something failed to reset limits properly.
             */
            ea.resetLim();
        }
    }
654703
def unpack(data):
    

    if isinstance(data, (bytes, buffer)):
        return BufferUnpacker(data)

    elif hasattr(data, "read"):
        return StreamUnpacker(data)

    else:
        raise TypeError("unpack requires bytes, buffer, or instance"
                        " supporting the read method")
1247467
protected Throwable unwrap(Throwable throwable) {
        if (throwable instanceof ExecutionException && throwable.getCause() != null) {
            return throwable.getCause();
        }
        return throwable;
    }
771412
public void unpin(Buffer buff) {
		BlockId blk = buff.block();
		PinnedBuffer pinnedBuff = pinnedBuffers.get(blk);
		
		if (pinnedBuff != null) {
			pinnedBuff.pinnedCount--;
			
			if (pinnedBuff.pinnedCount == 0) {
				bufferPool.unpin(buff);
				pinnedBuffers.remove(blk);
				
				synchronized (bufferPool) {
					bufferPool.notifyAll();
				}
			}
		}
	}
405308
def unwrap(self, value, session=None):
        ''' 
        '''
        self.validate_unwrap(value)
        ret = {}
        for k, v in value.items():
            ret[k] = self.value_type.unwrap(v, session=session)
        return ret
79182
def unwrap(self, value, fields=None, session=None):
        ''' 
        '''
        self.validate_unwrap(value)
        value.type = self.type
        return value
1363606
function unwrapCode() {
        var container = null;

        if (document.selection) { //for IE
            container = document.selection.createRange().parentElement();
        } else {
            var select = window.getSelection();
            if (select.rangeCount > 0) {
                container = select.getRangeAt(0).startContainer.parentNode;
            }
        }

        //'paranoic' unwrap
        var ispre = $(container).contents().closest('pre').length;
        var iscode = $(container).contents().closest('code').length;

        if (ispre && iscode) {
            $(container).contents().unwrap('code').unwrap('pre');
        } else if (ispre) {
            $(container).contents().unwrap('pre');
        } else if (iscode) {
            $(container).contents().unwrap('code');
        }
    }
1271193
public Throwable unwrap() {
		Throwable cause = getCause();
		return (cause instanceof WrappingRuntimeException) ? ((WrappingRuntimeException) cause).unwrap() : cause;
	}
459560
public static int textureWrapRToGL(
    final JCGLTextureWrapR wrap)
  {
    switch (wrap) {
      case TEXTURE_WRAP_CLAMP_TO_EDGE:
        return GL12.GL_CLAMP_TO_EDGE;
      case TEXTURE_WRAP_REPEAT:
        return GL11.GL_REPEAT;
      case TEXTURE_WRAP_REPEAT_MIRRORED:
        return GL14.GL_MIRRORED_REPEAT;
    }

    throw new UnreachableCodeException();
  }
1357913
def unwrap(self, value, session=None):
        ''' '''
        self.validate_unwrap(value)
        return set([self.item_type.unwrap(v, session=session) for v in value])
605836
public static void free(ByteBuffer buffer) {
        if (SUPPORTED && buffer != null && buffer.isDirect()) {
            try {
                if (UNSAFE != null) {
                    //use the JDK9 method
                    cleanerClean.invoke(UNSAFE, buffer);
                } else {
                    Object cleaner = DirectByteBufferDeallocator.cleaner.invoke(buffer);
                    cleanerClean.invoke(cleaner);
                }
            } catch (Throwable t) {
                UndertowLogger.ROOT_LOGGER.directBufferDeallocationFailed(t);
            }
        }
    }
313264
public final void freeBuffers()
    {
        if (_bufferHolder != null) {
            byte[] buf = _inputBuffer;
            if (buf != null) {
                _inputBuffer = null;
                _bufferHolder[0] = buf;
            }
        }
    }
1120123
private static void free(ByteBuffer buf) {
        Cleaner cleaner = ((DirectBuffer)buf).cleaner();
        if (cleaner != null) {
            cleaner.clean();
        }
    }
265645
protected boolean tryToClose() {
		ByteBuffer blocker = blockerBuffer.get();
		if (blocker == BUFFER_IS_CLOSED) {
			return true;
		}
		if (blocker != null) {
			return false;
		}
		boolean closed = blockerBuffer.compareAndSet(null, BUFFER_IS_CLOSED);
		if (closed) {
			closeResources();
			return true;
		}
		return false;
	}
890832
public boolean skipPreamble () throws IOException
  {
    // First delimiter may be not preceeded with a CRLF.
    System.arraycopy (m_aBoundary, 2, m_aBoundary, 0, m_aBoundary.length - 2);
    m_nBoundaryLength = m_aBoundary.length - 2;
    try
    {
      // Discard all data up to the delimiter.
      discardBodyData ();

      // Read boundary - if succeded, the stream contains an
      // encapsulation.
      return readBoundary ();
    }
    catch (final MultipartMalformedStreamException e)
    {
      return false;
    }
    finally
    {
      // Restore delimiter.
      System.arraycopy (m_aBoundary, 0, m_aBoundary, 2, m_aBoundary.length - 2);
      m_nBoundaryLength = m_aBoundary.length;
      m_aBoundary[0] = CR;
      m_aBoundary[1] = LF;
    }
  }
124119
function unwrap(match) {
        var i, elements = getWrappersByIndex(match ? indexOf(match) : null);

        i = elements.length;
        while (i--) {
          unwrapElement(elements[i]);
        }

        return this;
      }
296011
private static Adapter unwrapAdapter(Adapter adapter) {
        return adapter instanceof WrapperListAdapter
                ? unwrapAdapter(((WrapperListAdapter) adapter).getWrappedAdapter())
                : adapter;
    }