Record Class Http1Body
java.lang.Object
java.lang.Record
cool.scx.http.x.http1.Http1Body
- All Implemented Interfaces:
ScxHttpBody
public record Http1Body(InputStream inputStream, Http1Headers headers)
extends Record
implements ScxHttpBody
ScxHttpBodyImpl
- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
ConstructorsConstructorDescriptionHttp1Body(InputStream inputStream, Http1Headers headers) Creates an instance of aHttp1Bodyrecord class. -
Method Summary
Modifier and TypeMethodDescription<T> Tas(MediaReader<T> t) 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.Returns the value of theinputStreamrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface cool.scx.http.body.ScxHttpBody
asBytes, asCacheBody, asEventStream, asFormParams, asGzipBody, asMultiPart, asObject, asObject, asPath, asString, asString, asTree
-
Constructor Details
-
Http1Body
Creates an instance of aHttp1Bodyrecord class.- Parameters:
inputStream- the value for theinputStreamrecord componentheaders- the value for theheadersrecord component
-
-
Method Details
-
as
- Specified by:
asin interfaceScxHttpBody- Throws:
BodyAlreadyConsumedException
-
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). -
inputStream
Returns the value of theinputStreamrecord component.- Specified by:
inputStreamin interfaceScxHttpBody- Returns:
- the value of the
inputStreamrecord component
-
headers
Returns the value of theheadersrecord component.- Returns:
- the value of the
headersrecord component
-