/// <reference types="node" />
/**
 * Provides a binary type that can be initialized with many different forms of
 * data
 *
 * TODO(PLAT-1230): Deprecate this.
 * 1. asX methods sometimes return copies, sometimes references.
 * 2. We should be using ArrayBuffer/TypedArray for performance/correctness.
 * 3. It is confusing how we represent data in Strings, historically leading to
 *    encoding errors.
 */
export declare abstract class Binary {
    /**
     * Initializes the binary class from the string
     */
    static fromString(data: string): Binary;
    /**
     * Initializes the binary class from an arrayBuffer
     */
    static fromArrayBuffer(data: ArrayBuffer): Binary;
    /**
     * Initializes the binary class from an array of bytes
     */
    static fromByteArray(data: number[]): Binary;
    /**
     * Initializes the binary class from a node-style Buffer object.
     */
    static fromBuffer(data: Buffer): Binary;
    isArrayBuffer(): boolean;
    isBuffer(): boolean;
    isByteArray(): boolean;
    isString(): boolean;
    abstract asArrayBuffer(): ArrayBuffer;
    abstract asBuffer(): Buffer;
    abstract asByteArray(): number[];
    abstract asString(): string;
    abstract length(): number;
    abstract slice(start: number, end?: number): Binary;
}
//# sourceMappingURL=binary.d.ts.map