com.blade.mvc.http.EmptyBody Maven / Gradle / Ivy
package com.blade.mvc.http;
import lombok.NoArgsConstructor;
@NoArgsConstructor
public class EmptyBody implements Body {
private static final EmptyBody INSTANCE = new EmptyBody();
public static EmptyBody empty() {
return INSTANCE;
}
@Override
public T write(BodyWriter writer) {
return writer.onEmpty(INSTANCE);
}
}