Package com.io7m.idstore.server.http
Record Class IdHTTPServletResponseFixedSize
java.lang.Object
java.lang.Record
com.io7m.idstore.server.http.IdHTTPServletResponseFixedSize
- Record Components:
statusCode- The status codecontentType- The content typedata- The data
- All Implemented Interfaces:
IdHTTPServletResponseType
public record IdHTTPServletResponseFixedSize(int statusCode, String contentType, byte[] data)
extends Record
implements IdHTTPServletResponseType
A fixed size servlet response.
-
Constructor Summary
ConstructorsConstructorDescriptionIdHTTPServletResponseFixedSize(int statusCode, String contentType, byte[] data) A fixed size servlet response. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontentTyperecord component.byte[]data()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thestatusCoderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IdHTTPServletResponseFixedSize
A fixed size servlet response.- Parameters:
statusCode- The status codecontentType- The content typedata- The data
-
-
Method Details
-
contentLengthOptional
- Specified by:
contentLengthOptionalin interfaceIdHTTPServletResponseType- Returns:
- The length of the content, if one is known
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
statusCode
public int statusCode()Returns the value of thestatusCoderecord component.- Specified by:
statusCodein interfaceIdHTTPServletResponseType- Returns:
- the value of the
statusCoderecord component
-
contentType
Returns the value of thecontentTyperecord component.- Returns:
- the value of the
contentTyperecord component
-
data
public byte[] data()Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-