Class ByteArrayEntity.Unmodifiable
java.lang.Object
org.apache.juneau.http.classic.entity.BasicHttpEntity<ByteArrayEntity>
org.apache.juneau.http.classic.entity.ByteArrayEntity
org.apache.juneau.http.classic.entity.ByteArrayEntity.Unmodifiable
- All Implemented Interfaces:
HttpEntity,UnmodifiableBean
- Enclosing class:
- ByteArrayEntity
public static class ByteArrayEntity.Unmodifiable
extends ByteArrayEntity
implements UnmodifiableBean
Unmodifiable point-in-time snapshot of the enclosing
ByteArrayEntity.
Its only behavioral override is modify(Runnable), which throws — because all mutation is funneled through
modify(...), this single override freezes the entire mutation surface.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.juneau.http.classic.entity.ByteArrayEntity
ByteArrayEntity.Unmodifiable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ByteArrayEntitySingle mutation funnel — the only choke-point through which all state changes on this bean flow.Methods inherited from class org.apache.juneau.http.classic.entity.ByteArrayEntity
asBytes, asString, copy, equals, getContent, getContentLength, hashCode, isRepeatable, unmodifiable, writeToMethods inherited from class org.apache.juneau.http.classic.entity.BasicHttpEntity
asSafeBytes, assertBytes, assertString, consumeContent, contentOrElse, freeze, getCharset, getContentEncoding, getContentType, getMaxLength, isCached, isChunked, isStreaming, isSupplied, isUnmodifiable, self, setCached, setCharset, setChunked, setChunked, setContent, setContent, setContentEncoding, setContentEncoding, setContentLength, setContentType, setContentType, setMaxLength
-
Constructor Details
-
Unmodifiable
Constructor.- Parameters:
copyFrom- The entity to snapshot. Must not benull .
-
-
Method Details
-
modify
Description copied from class:BasicHttpEntitySingle mutation funnel — the only choke-point through which all state changes on this bean flow.Every fluent setter routes through this method. The nested
Unmodifiablesnapshot overrides only this method to throw, which freezes the entire mutation surface with a single override.- Overrides:
modifyin classBasicHttpEntity<ByteArrayEntity>- Parameters:
mutation- The state change to apply.- Returns:
- This object.
-