Return raw ID3v2 frames + header.
@return ID3v2 InputStream or null if ID3v2 frames are not available.
422030
public InputStream getRawID3v2()
	{
		if (rawid3v2 == null) return null;
		else
		{
			ByteArrayInputStream bain = new ByteArrayInputStream(rawid3v2);		
			return bain;
		}
	}
1264505
public static ByteBuffer getByteBufferFromInputStreamAndCloseStream(InputStream is) throws IOException {
        try {
            // is.available() may return 0, or 1, or the total number of bytes in the stream,
            // or some other number.
            // Do not try to use is.available() == 0 to find the end of the stream!
            byte[] bytes;
            int avail = is.available();
            if (avail > 32) {
                // There are more bytes available than just the ICU data header length.
                // With luck, it is the total number of bytes.
                bytes = new byte[avail];
            } else {
                bytes = new byte[128];  // empty .res files are even smaller
            }
            // Call is.read(...) until one returns a negative value.
            int length = 0;
            for(;;) {
                if (length < bytes.length) {
                    int numRead = is.read(bytes, length, bytes.length - length);
                    if (numRead < 0) {
                        break;  // end of stream
                    }
                    length += numRead;
                } else {
                    // See if we are at the end of the stream before we grow the array.
                    int nextByte = is.read();
                    if (nextByte < 0) {
                        break;
                    }
                    int capacity = 2 * bytes.length;
                    if (capacity < 128) {
                        capacity = 128;
                    } else if (capacity < 0x4000) {
                        capacity *= 2;  // Grow faster until we reach 16kB.
                    }
                    // TODO Java 6 replace new byte[] and arraycopy(): bytes = Arrays.copyOf(bytes, capacity);
                    byte[] newBytes = new byte[capacity];
                    System.arraycopy(bytes, 0, newBytes, 0, length);
                    bytes = newBytes;
                    bytes[length++] = (byte) nextByte;
                }
            }
            return ByteBuffer.wrap(bytes, 0, length);
        } finally {
            is.close();
        }
    }
497300
synchronized final JsMsgPart getHdr2() {
        if (hdr2 == null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(this, tc, "getHdr2 will call getPart");
            hdr2 = jmo.getPart(JsHdrAccess.HDR2, JsHdr2Access.schema);
        }
        return hdr2;
    }
1129980
public InputStream getInputStream() throws APIException, IOException {
        final HttpResponse response = client.get(getUrl());
        HttpClientHelpers.throwIfNotOk(response);
        return response.getEntity().getContent();
    }
1271221
public final Http2FrameStream newStream() {
        Http2FrameCodec codec = frameCodec;
        if (codec == null) {
            throw new IllegalStateException(StringUtil.simpleClassName(Http2FrameCodec.class) + " not found." +
                    " Has the handler been added to a pipeline?");
        }
        return codec.newStream();
    }
128137
public BufferedInputStream asBufferedInputStream() {
        InputStream is = asInputStream();
        if (is == null) return null;
        if (is instanceof BufferedInputStream) return (BufferedInputStream) is;
        return new BufferedInputStream(is);
    }
561738
public InputStream getInputStream() {
        try
        {
            int responseCode = this.urlConnection.getResponseCode();

            try
            {
                // HACK: manually follow redirects, for the login to work
                // HTTPUrlConnection auto redirect doesn't respect the provided headers
                if(responseCode ==302)
                {
                    HttpClient redirectClient =
                            new HttpClient(proxyHost,proxyPort, urlConnection.getHeaderField("Location"),
                                    headers, urlConnection.getRequestMethod(), callback, authHeader);
                    redirectClient.getInputStream().close();
                }
            }
            catch (Throwable e)
            {
                System.out.println("Following redirect failed");
            }

            setCookieHeader = this.urlConnection.getHeaderField("Set-Cookie");


            InputStream in = responseCode != HttpURLConnection.HTTP_OK ?
                    this.urlConnection.getErrorStream() : this.urlConnection.getInputStream();

            return in;
        } catch (Exception e) {
            return null;
        }
    }
393
@SuppressWarnings("unused") // called through reflection by RequestServer
  public FramesV3 fetch(int version, FramesV3 s) {
    FramesV3 frames = doFetch(version, s);

    // Summary data is big, and not always there: null it out here.  You have to call columnSummary
    // to force computation of the summary data.
    for (FrameBaseV3 a_frame: frames.frames) {
      ((FrameV3)a_frame).clearBinsField();
    }

    return frames;
  }
926229
public Frame getFrame()
    {
        Component frame = m_component;
        while (frame != null)
        {
            if (frame instanceof Frame)
                return (Frame)frame;
            frame = frame.getParent();
        }
        return null;
    }
140226
public byte[] getFrameData(String id)
	{
		if (frames.containsKey(id))
		{
			return ((ID3v2Frame) frames.get(id)).getFrameData();
		}

		return null;
	}
156773
function (rawHeaders) {
            var headers = {},
                headerList,
                key,
                h,
                i;

            headerList = rawHeaders.split("\n");
            for (i = 0; i < headerList.length; i += 1) {
                h = headerList[i].split(":", 2);

                if (h[1] !== null) {
                    headers[h[0]] = h[1].replace(/^\s+|\s+$/g, "");

                    key = h[0];
                }
                else {
                    if (h[0].substring(0, 1) === "\t") {
                        headers[h[0]] = h[1].replace(/^\s+|\s+$/g, "");
                    }
                }
            }

            return headers;
        }
968149
private InputStream getSourceAsInputStream() throws IOException {
	if (!mapping.hasArchive()) return IOUtil.toBufferedInputStream(getPhyscalFile().getInputStream());
	else if (isLoad(LOAD_PHYSICAL)) return IOUtil.toBufferedInputStream(getPhyscalFile().getInputStream());
	else if (isLoad(LOAD_ARCHIVE)) {
	    StringBuffer name = new StringBuffer(_getPackageName().replace('.', '/'));
	    if (name.length() > 0) name.append("/");
	    name.append(getFileName());

	    return mapping.getArchiveResourceAsStream(name.toString());
	}
	else {
	    return null;
	}
    }
87212
@SuppressWarnings("unused") // called through reflection by RequestServer
  public FramesV3 column(int version, FramesV3 s) { // TODO: should return a Vec schema
    Frame frame = getFromDKV("key", s.frame_id.key());

    Vec vec = frame.vec(s.column);
    if (null == vec)
      throw new H2OColumnNotFoundArgumentException("column", s.frame_id.toString(), s.column);

    Vec[] vecs = { vec };
    String[] names = { s.column };
    Frame new_frame = new Frame(names, vecs);
    s.frames = new FrameV3[1];
    s.frames[0] = new FrameV3(new_frame);
    ((FrameV3)s.frames[0]).clearBinsField();
    return s;
  }
192882
public AmqpFrame getFrame()
    {    
        int pos = this.position();       
        AmqpMethod method = new AmqpMethod();
        int classIndex;
        AmqpFrame frame = new AmqpFrame(); 
                 
        // If there is at least one Frame in the buffer, attempt to decode it.
        if (this.remaining() > 7)
        {            
            frame.setHeader(this.getFrameHeader());           
            frame.setChannelId((short) frame.getHeader().channel);           
            frame.setType((short) frame.getHeader().frameType);           
            // the buffer must have an additional byte for the Frame end marker 
            
            if (this.remaining() >= frame.getHeader().size + 1)
            {                
                switch (frame.getType())
                {                
                    case AmqpConstants.FRAME_BODY:                        
                        WrappedByteBuffer body = new AmqpBuffer();
                        // copy body into new Buffer
                        int end = this.position() + (int)frame.getHeader().size;
                        while (position() < end)
                        {
                            body.put(get());
                        }
                        frame.setBody(body);
                        frame.setMethodName("body");                        
                        break;

                    case AmqpConstants.FRAME_HEADER:                        
                        classIndex = this.getUnsignedShort();
                        @SuppressWarnings("unused")
                        short weight = (short)this.getUnsignedShort();
                        @SuppressWarnings("unused")
                        long bodySize = this.getUnsignedLong();                            
                        
                        frame.setContentProperties(this.getContentProperties());
                        frame.setMethodName("header");                        
                        break;

                    case AmqpConstants.FRAME_METHOD:
                         classIndex = this.getUnsignedShort();
                        int methodIndex = this.getUnsignedShort();
                        String indexes = String.valueOf(classIndex) + String.valueOf(methodIndex);                      
                        method = MethodLookup.LookupMethod(indexes);
                        
                        // pull parameter list off of method
                        List<Parameter> params = method.allParameters;

                        frame.setMethodName(method.name);
                        frame.setArgs(this.getMethodArguments(params));                        
                        break;

                    case AmqpConstants.FRAME_HEARTBEAT:
                    case AmqpConstants.FRAME_RABBITMQ_HEARTBEAT:
                    	throw new IllegalStateException("Received heartbeat frame even though the client has expressed no interest in heartbeat via tune-ok method.");

                    default:
                    	throw new IllegalStateException("Unrecognized AMQP 0-9-1 Frame type = " + frame.getType());
                }
                
                short frameEnd = (short) this.getUnsigned();                
                if (frameEnd != AmqpConstants.FRAME_END)
                {                    
                    throw new IllegalStateException("Invalid end of AMQP method frame");
                }
            }
            else
            {                
                this.position(pos);
                return null;
            }
            return frame;
        }
        return null;
    }
923530
public Headers getAllHeaders() {
        Headers requestHeaders = getHeaders();
        requestHeaders = hasPayload() ? requestHeaders.withContentType(getPayload().get().getMimeType()) : requestHeaders;
        //We don't want to add headers more than once.
        return requestHeaders;
    }
342769
InputStream getInputStream() {
    InputStream result = (InputStream) streams.get();
    return ((result == null) ? defaultInputStream : result);
  }
78484
@Override
    public Packet getNextPacket() throws IOException {
        final Buffer payload = getPayload();
        if (payload == null || payload.isEmpty()) {
            return null;
        }

        if (sipFramer.accept(payload)) {
            return sipFramer.frame(this, payload);
        } else if (rtpFramer.accept(payload)) {
            // RTP is tricky to parse so if we return
            // null then it wasn't an RTP packet afterall
            // so fall through...
            final RtpPacket rtp = frameRtp(payload);
            if (rtp != null) {
                return rtp;
            }
        }

        return new UnknownApplicationPacketImpl(this, payload);
    }