@Immutable @MustImplementEqualsAndHashcode public class MimeTypeContent extends Object
IMimeType.| Constructor and Description |
|---|
MimeTypeContent(byte[] aContentBytes,
IMimeType aMimeType)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
byte[] |
getAllContentBytes() |
int |
getContentByteCount() |
IMimeType |
getMimeType() |
int |
hashCode() |
boolean |
matchesBeginning(byte[] aBytes)
Check if the passed byte array starts with the bytes of this object.
|
String |
toString() |
void |
writeContentBytes(OutputStream aOS)
Write the content bytes to the specified output stream.
|
@Nonnull @Nonempty @ReturnsMutableCopy public byte[] getAllContentBytes()
null nor
empty.@Nonnegative public int getContentByteCount()
public void writeContentBytes(@Nonnull @WillNotClose OutputStream aOS) throws IOException
aOS - The output stream to write to. The stream is NOT closed. May not be
null.IOException - In case of a write errorpublic boolean matchesBeginning(@Nonnull byte[] aBytes)
aBytes - The bytes to compare to. May not be null.true if the passed bytes start with the bytes in this
object.Copyright © 2014–2017 Philip Helger. All rights reserved.