/** * Creates {@link MultipartBody} from the provided parts. * * @return The {@link MultipartBody} * @throws MultipartException If there are no parts */ public MultipartBody build() throws MultipartException { if (parts.isEmpty()) { throw new MultipartException("Cannot create a MultipartBody with no parts"); } return new MultipartBody(parts); } }
/** * Creates {@link MultipartBody} from the provided parts. * * @return The {@link MultipartBody} * @throws MultipartException If there are no parts */ public MultipartBody build() throws MultipartException { if (parts.isEmpty()) { throw new MultipartException("Cannot create a MultipartBody with no parts"); } return new MultipartBody(parts); } }
/** * Creates {@link MultipartBody} from the provided parts. * * @return The {@link MultipartBody} * @throws MultipartException If there are no parts */ public MultipartBody build() throws MultipartException { if (parts.isEmpty()) { throw new MultipartException("Cannot create a MultipartBody with no parts"); } return new MultipartBody(parts); } }