// Bytes returns the ContentLength for the path if the key exists
501675
func (d *S3Driver) Bytes(path string) int64 {
	svc := d.s3service()

	path = strings.TrimPrefix(path, "/")

	params := &s3.HeadObjectInput{
		Bucket: aws.String(d.AWSBucketName), // Required
		Key:    aws.String(path),            // Required
	}
	resp, err := svc.HeadObject(params)

	if awserr := aws.Error(err); awserr != nil {
		// A service error occurred.
		fmt.Println("Error:", awserr.Code, awserr.Message)
		return -1
	} else if err != nil {
		// A non-service error occurred.
		panic(err)
		return -1
	}

	return *resp.ContentLength
}
1157780
func Bytes(l int, dev string) ([]byte, error) {
	if l <= 0 {
		return nil, e.New(ErrInvalidLength)
	}
	switch dev {
	case "go":
		b := make([]byte, l)
		for i := 0; i < l; i++ {
			b[i] = byte(rand.Intn(255))
		}
		return b, nil
	case "go-crypto":
		b := make([]byte, l)
		n, err := io.ReadFull(crypto.Reader, b)
		if n != len(b) || err != nil {
			return nil, e.Forward(err)
		}
		return b, nil
	default:
		f, err := os.Open(dev)
		if err != nil {
			return nil, e.Forward(err)
		}
		b := make([]byte, l)
		f.Read(b)
		f.Close()
		return b, nil
	}
	panic("don't get here")
}
1272884
func (v *id) Bytes() []byte {
	if v.data == nil {
		return nil
	}
	return v.data.Bytes()
}
567806
func (h Hash) Bytes(key string) []byte {
	if value, ok := h[key]; ok {
		return value.Bytes()
	}
	return []byte{}
}
1044731
func (b Blob) Bytes() []byte {
	return Pad(bytes.Join([][]byte{
		Int(len(b)).Bytes(),
		[]byte(b),
	}, []byte{}))
}
970179
func (b *ByteBuffer) Bytes() []byte {
	b.Lock()
	defer b.Unlock()
	return b.b.Bytes()
}
877946
func (dsl *DestSmeList) Bytes() []byte {
	var ret []byte
	for i := range dsl.Data {
		ret = append(ret, dsl.Data[i].Bytes()...)
	}
	return ret
}
768908
func (g *Container) Bytes() []byte {
	if g.Data() != nil {
		if bytes, err := json.Marshal(g.object); err == nil {
			return bytes
		}
	}
	return []byte("{}")
}
64863
func (e *StringEncoder) Bytes() ([]byte, error) {
	// Compress the currently appended bytes using snappy and prefix with
	// a 1 byte header for future extension
	data := snappy.Encode(nil, e.bytes)
	return append([]byte{stringCompressedSnappy << 4}, data...), nil
}
439240
func (h *Plus) Bytes() int {
	var b int
	b += len(h.tmpSet) * 4
	b += cap(h.denseList)
	if h.sparseList != nil {
		b += int(unsafe.Sizeof(*h.sparseList))
		b += cap(h.sparseList.b)
	}
	b += int(unsafe.Sizeof(*h))
	return b
}
888748
func (k *aesPrivateKey) Bytes() (raw []byte, err error) {
	if k.exportable {
		return k.privKey, nil
	}

	return nil, errors.New("Not supported.")
}
852471
func ContentLength(h http.Header, size int64) {
	h.Set(HeaderContentLength, strconv.FormatInt(size, 10))
}
693438
func (c *client) Bytes(key string, fallback []byte) []byte {
	if v := c.Getenv(key); v != "" {
		return []byte(v)
	}

	return fallback
}
551325
func (r *Reply) Bytes() ([]byte, error) {
	if r.Type() == ReplyNil {
		return nil, ErrNil
	}
	if r.Type() != ReplyString && r.Type() != ReplyStatus {
		return nil, ErrType
	}
	return r.stringValue, nil
}
1356887
func (e *Event) Bytes(key string, val []byte) *Event {
	if e == nil {
		return e
	}
	e.buf = enc.AppendBytes(enc.AppendKey(e.buf, key), val)
	return e
}
209655
func Bytes(key string, fallback []byte) []byte {
	return DefaultClient.Bytes(key, fallback)
}
1079594
func (ae *AttributeEncoder) Bytes(typ uint16, b []byte) {
	if ae.err != nil {
		return
	}

	ae.attrs = append(ae.attrs, Attribute{
		Type: typ,
		Data: b,
	})
}