Record Class DefaultHttpBody
java.lang.Object
java.lang.Record
cool.scx.http.body.DefaultHttpBody
- All Implemented Interfaces:
ScxHttpBody
public record DefaultHttpBody(cool.scx.io.ByteInput byteInput, ScxHttpHeaders headers)
extends Record
implements ScxHttpBody
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultHttpBody(cool.scx.io.ByteInput byteInput, ScxHttpHeaders headers) Creates an instance of aDefaultHttpBodyrecord class. -
Method Summary
Modifier and TypeMethodDescription<T> Tas(MediaReader<T> mediaReader) cool.scx.io.ByteInputReturns the value of thebyteInputrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.headers()Returns the value of theheadersrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface ScxHttpBody
asBytes, asCacheBody, asEventStream, asFile, asFormParams, asGzipBody, asMultiPart, asNode, asObject, asObject, asString, asString
-
Constructor Details
-
DefaultHttpBody
Creates an instance of aDefaultHttpBodyrecord class.- Parameters:
byteInput- the value for thebyteInputrecord componentheaders- the value for theheadersrecord component
-
-
Method Details
-
as
- Specified by:
asin interfaceScxHttpBody- Throws:
BodyAlreadyConsumedExceptionBodyReadException
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
byteInput
public cool.scx.io.ByteInput byteInput()Returns the value of thebyteInputrecord component.- Specified by:
byteInputin interfaceScxHttpBody- Returns:
- the value of the
byteInputrecord component
-
headers
Returns the value of theheadersrecord component.- Returns:
- the value of the
headersrecord component
-