Package com.funnelback.filter.api.mock
Class MockBytesDocument
- java.lang.Object
-
- com.funnelback.filter.api.mock.MockBytesDocument
-
- All Implemented Interfaces:
BytesDocument,FilterableDocument,NoContentDocument
public class MockBytesDocument extends Object implements BytesDocument
A BytesDocument for testing.
-
-
Constructor Summary
Constructors Constructor Description MockBytesDocument(URI URI, com.google.common.collect.ListMultimap<String,String> metadata, DocumentType documentType, Optional<Charset> charset, byte[] content)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MockBytesDocumentcloneWithContent(DocumentType documentType, Optional<Charset> charset, byte[] content)MockBytesDocumentcloneWithDocumentType(DocumentType documentType)MockBytesDocumentcloneWithMetadata(com.google.common.collect.ListMultimap<String,String> metadata)MockBytesDocumentcloneWithURI(URI uri)InputStreamcontentAsInputStream()byte[]getCopyOfContents()com.google.common.collect.ListMultimap<String,String>getCopyOfMetadata()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.funnelback.filter.api.documents.NoContentDocument
getCharset, getDocumentType, getMetadata, getURI
-
-
-
-
Field Detail
-
URI
@NonNull private final @NonNull URI URI
-
metadata
@NonNull private final @NonNull com.google.common.collect.ImmutableListMultimap<String,String> metadata
-
content
@NonNull private @lombok.NonNull byte[] content
-
documentType
@NonNull private final @NonNull DocumentType documentType
-
-
Method Detail
-
getCopyOfContents
public byte[] getCopyOfContents()
- Specified by:
getCopyOfContentsin interfaceFilterableDocument
-
getCopyOfMetadata
public com.google.common.collect.ListMultimap<String,String> getCopyOfMetadata()
- Specified by:
getCopyOfMetadatain interfaceNoContentDocument
-
cloneWithURI
public MockBytesDocument cloneWithURI(URI uri)
- Specified by:
cloneWithURIin interfaceBytesDocument- Specified by:
cloneWithURIin interfaceFilterableDocument
-
cloneWithMetadata
public MockBytesDocument cloneWithMetadata(com.google.common.collect.ListMultimap<String,String> metadata)
- Specified by:
cloneWithMetadatain interfaceBytesDocument- Specified by:
cloneWithMetadatain interfaceFilterableDocument
-
cloneWithContent
public MockBytesDocument cloneWithContent(DocumentType documentType, Optional<Charset> charset, byte[] content)
- Specified by:
cloneWithContentin interfaceBytesDocument
-
contentAsInputStream
public InputStream contentAsInputStream()
- Specified by:
contentAsInputStreamin interfaceBytesDocument
-
cloneWithDocumentType
public MockBytesDocument cloneWithDocumentType(DocumentType documentType)
- Specified by:
cloneWithDocumentTypein interfaceFilterableDocument
-
-