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

com.iprogrammerr.bright.server.response.EmptyResponse Maven / Gradle / Ivy

package com.iprogrammerr.bright.server.response;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import com.iprogrammerr.bright.server.header.Header;

public final class EmptyResponse implements Response {

	private final int code;
	private final List
headers; private final byte[] body; public EmptyResponse(int code) { this(code, new ArrayList<>()); } public EmptyResponse(int code, Header... headers) { this(code, new ArrayList<>(Arrays.asList(headers))); } public EmptyResponse(int code, List
headers) { this.code = code; this.headers = headers; this.body = new byte[0]; } @Override public int code() { return this.code; } @Override public List
headers() { return this.headers; } @Override public byte[] body() { return this.body; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy