@Test void testCreationWithEmptyContent() { Attachment attachment1 = new Attachment("attachment-1", (byte[]) null, "text/plain"); Attachment attachment2 = new Attachment("attachment-2", new byte[0], "text/plain"); Attachment attachment3 = new Attachment("attachment-3", Multi.createFrom().empty(), "text/plain"); assertThat(Multi.createFrom().publisher(attachment1.getData()).collectItems().first().await().indefinitely()).isNull(); assertThat(Multi.createFrom().publisher(attachment2.getData()).collectItems().first().await().indefinitely()).isNull(); assertThat(Multi.createFrom().publisher(attachment3.getData()).collectItems().first().await().indefinitely()).isNull(); }
public Publisher<Byte> getData() { return data; }
Attachment { public Publisher<Byte> getData() { return data; } }
Attachment { public Publisher<Byte> getData() { return data; } Attachment(String name, File file, String contentType);  Attachment(String name, File file, String contentType, String contentId);  Attachment(String name, byte[] data, String contentType);  Attachment(String name, Publisher<Byte> data, String contentType);  Attachment(String name, byte[] data, String contentType, String contentId);  Attachment(String name, Publisher<Byte> data, String contentType, String contentId);  Attachment(String name, byte[] data, String contentType, String description, String disposition);  Attachment(String name, Publisher<Byte> data, String contentType, String description, String disposition); }
Attachment { public Publisher<Byte> getData() { return data; } Attachment(String name, File file, String contentType);  Attachment(String name, File file, String contentType, String contentId);  Attachment(String name, byte[] data, String contentType);  Attachment(String name, Publisher<Byte> data, String contentType);  Attachment(String name, byte[] data, String contentType, String contentId);  Attachment(String name, Publisher<Byte> data, String contentType, String contentId);  Attachment(String name, byte[] data, String contentType, String description, String disposition);  Attachment(String name, Publisher<Byte> data, String contentType, String description, String disposition); String getName(); Attachment setName(String name); File getFile(); Attachment setFile(File file); String getDescription(); Attachment setDescription(String description); String getDisposition(); Attachment setDisposition(String disposition); Publisher<Byte> getData(); Attachment setData(byte[] data); Attachment setData(Publisher<Byte> data); String getContentType(); Attachment setContentType(String contentType); String getContentId(); Attachment setContentId(String contentId); boolean isInlineAttachment(); }
Attachment { public Publisher<Byte> getData() { return data; } Attachment(String name, File file, String contentType);  Attachment(String name, File file, String contentType, String contentId);  Attachment(String name, byte[] data, String contentType);  Attachment(String name, Publisher<Byte> data, String contentType);  Attachment(String name, byte[] data, String contentType, String contentId);  Attachment(String name, Publisher<Byte> data, String contentType, String contentId);  Attachment(String name, byte[] data, String contentType, String description, String disposition);  Attachment(String name, Publisher<Byte> data, String contentType, String description, String disposition); String getName(); Attachment setName(String name); File getFile(); Attachment setFile(File file); String getDescription(); Attachment setDescription(String description); String getDisposition(); Attachment setDisposition(String disposition); Publisher<Byte> getData(); Attachment setData(byte[] data); Attachment setData(Publisher<Byte> data); String getContentType(); Attachment setContentType(String contentType); String getContentId(); Attachment setContentId(String contentId); boolean isInlineAttachment(); static final String DISPOSITION_INLINE; static final String DISPOSITION_ATTACHMENT; }