@Test public void testSize() { ContentDisposition cd = ContentDisposition.parse("inline; size=128"); assertThat(cd.type(), is(equalTo("inline"))); assertThat(cd.size().isPresent(), is(equalTo(true))); assertThat(cd.size().getAsLong(), is(equalTo(128L))); assertThat(cd.parameters(), is(notNullValue())); assertThat(cd.parameters().size(), is(equalTo(1))); }
public OptionalLong size() { String size = parameters.get(SIZE_PARAMETER); if (size != null) { return OptionalLong.of(Long.parseLong(size)); } return OptionalLong.empty(); }
ContentDisposition { public OptionalLong size() { String size = parameters.get(SIZE_PARAMETER); if (size != null) { return OptionalLong.of(Long.parseLong(size)); } return OptionalLong.empty(); } }
ContentDisposition { public OptionalLong size() { String size = parameters.get(SIZE_PARAMETER); if (size != null) { return OptionalLong.of(Long.parseLong(size)); } return OptionalLong.empty(); } private  ContentDisposition(String type, Map<String, String> params); }
ContentDisposition { public OptionalLong size() { String size = parameters.get(SIZE_PARAMETER); if (size != null) { return OptionalLong.of(Long.parseLong(size)); } return OptionalLong.empty(); } private  ContentDisposition(String type, Map<String, String> params); String type(); Optional<String> name(); Optional<String> filename(); Optional<ZonedDateTime> creationDate(); Optional<ZonedDateTime> modificationDate(); Optional<ZonedDateTime> readDate(); OptionalLong size(); Map<String, String> parameters(); @Override String toString(); static Builder builder(); }
ContentDisposition { public OptionalLong size() { String size = parameters.get(SIZE_PARAMETER); if (size != null) { return OptionalLong.of(Long.parseLong(size)); } return OptionalLong.empty(); } private  ContentDisposition(String type, Map<String, String> params); String type(); Optional<String> name(); Optional<String> filename(); Optional<ZonedDateTime> creationDate(); Optional<ZonedDateTime> modificationDate(); Optional<ZonedDateTime> readDate(); OptionalLong size(); Map<String, String> parameters(); @Override String toString(); static Builder builder();  }