All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mockserver.model.BinaryBody Maven / Gradle / Ivy

There is a newer version: 5.15.0
Show newest version
package org.mockserver.model;

import javax.xml.bind.DatatypeConverter;

/**
 * @author jamesdbloom
 */
public class BinaryBody extends Body {

    private final byte[] value;

    public BinaryBody(byte[] value) {
        super(Type.BINARY);
        this.value = value;
    }

    public static BinaryBody binary(byte[] body) {
        return new BinaryBody(body);
    }

    public byte[] getValue() {
        return value;
    }

    @Override
    public String toString() {
        return new String(value);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy