// GetContentLength returns the request's header value of "Content-Length".
// Returns 0 if header was unable to be found or its value was not a valid number.
961123
func (ctx *context) GetContentLength() int64 {
	if v := ctx.GetHeader(ContentLengthHeaderKey); v != "" {
		n, _ := strconv.ParseInt(v, 10, 64)
		return n
	}
	return 0
}
1354809
func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
	s.ContentLength = &v
	return s
}
537683
func GetPacketNumberLengthForHeader(packetNumber, leastUnacked PacketNumber) PacketNumberLen {
	diff := uint64(packetNumber - leastUnacked)
	if diff < (1 << (16 - 1)) {
		return PacketNumberLen2
	}
	if diff < (1 << (24 - 1)) {
		return PacketNumberLen3
	}
	return PacketNumberLen4
}
1286246
func GetRequestContentType(r *http.Request) ContentType {
	if contentType, ok := r.Context().Value(ContentTypeCtxKey).(ContentType); ok {
		return contentType
	}
	return GetContentType(r.Header.Get("Content-Type"))
}
43817
func GetPacketNumberLength(packetNumber PacketNumber) PacketNumberLen {
	if packetNumber < (1 << (uint8(PacketNumberLen1) * 8)) {
		return PacketNumberLen1
	}
	if packetNumber < (1 << (uint8(PacketNumberLen2) * 8)) {
		return PacketNumberLen2
	}
	if packetNumber < (1 << (uint8(PacketNumberLen3) * 8)) {
		return PacketNumberLen3
	}
	return PacketNumberLen4
}
634975
func (i *ASCIIArt) SetHeight(h int) {
	if len(i.contents) > h {
		i.contents = i.contents[:h]
	} else {
		for j := len(i.contents); j < h; j++ {
			i.contents = append(i.contents, "")
		}
	}
}
560757
func getContentType(request http.Header, proxyResponse http.Header) (headerContentType string) {
	responseHeader := proxyResponse.Get("Content-Type")
	requestHeader := request.Get("Content-Type")

	if len(responseHeader) > 0 {
		headerContentType = responseHeader
	} else if len(requestHeader) > 0 {
		headerContentType = requestHeader
	} else {
		headerContentType = defaultContentType
	}

	return headerContentType
}
559923
func (s *ProjectsService) GetCommitContent(projectName, commitID, fileID string) (string, *Response, error) {
	u := fmt.Sprintf("projects/%s/commits/%s/files/%s/content", url.QueryEscape(projectName), commitID, fileID)
	return getStringResponseWithoutOptions(s.client, u)
}
484286
func fillInContentLength(req *http.Request) (err error) {
	body := req.Body
	if body == nil {
		req.ContentLength = 0
		return
	}

	// Make a copy.
	contents, err := ioutil.ReadAll(req.Body)
	if err != nil {
		err = fmt.Errorf("ReadAll: %v", err)
		return
	}

	req.Body.Close()

	// Fill in the content length and restore the body.
	req.ContentLength = int64(len(contents))
	req.Body = ioutil.NopCloser(bytes.NewReader(contents))

	return
}
582061
public long getContentLength() {
		String value = getFirst(CONTENT_LENGTH);
		return (value != null ? Long.parseLong(value) : -1);
	}
442430
func (c *Page) GetResourceContent(frameId string, url string) (string, bool, error) {
	var v PageGetResourceContentParams
	v.FrameId = frameId
	v.Url = url
	return c.GetResourceContentWithParams(&v)
}
934323
func fileGetContents(filename string) []byte {
	log.Println("reading contents of", filename)

	// read only first 512 bytes of files
	contents := make([]byte, 512)
	f, err := os.Open(filename)
	checkErr(err)
	_, err = f.Read(contents)
	f.Close()
	if err != io.EOF {
		checkErr(err)
	}
	return contents
}
451924
int getContentLength(HttpURLConnection conn) {
    String transferEncoding = conn.getHeaderField(TRANSFER_ENCODING);
    if (transferEncoding == null || transferEncoding.equalsIgnoreCase("chunked")) {
      return conn.getHeaderFieldInt(CONTENT_LENGTH, -1);
    } else {
      return -1;
    }
  }
1198444
func (r *Response) ContentLength() int64 {
	for _, h := range r.Headers {
		if strings.EqualFold(h.Key, "Content-Length") {
			length, err := strconv.ParseInt(h.Value, 10, 64)
			if err != nil {
				continue
			}
			return int64(length)
		}
	}
	return -1
}
99015
func (b *Blob) GetContent() string {
	if b == nil || b.Content == nil {
		return ""
	}
	return *b.Content
}
12910
func (t *TreeEntry) GetContent() string {
	if t == nil || t.Content == nil {
		return ""
	}
	return *t.Content
}
1291541
func ContentLength(length int64) PutObjectInput {
	return func(req *s3.PutObjectInput) {
		req.ContentLength = aws.Int64(length)
	}
}