class CollectionMultipartFormDataMessageBodyWriter implements MessageBodyWriter<Collection<OutputItem>> {

    @Override
    public void writeTo(Collection<OutputItem> items, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType,
                        MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
            throws IOException, WebApplicationException {
        String boundary = mediaType.getParameters().get("boundary");
        if (boundary == null) {
            boundary = Long.toString(System.currentTimeMillis());
        }
        httpHeaders.putSingle("Content-type", createMediaTypeWithBoundary(mediaType, boundary));
        final byte[] boundaryBytes = boundary.getBytes();
        multipartFormDataWriter.writeItems(items, entityStream, boundaryBytes);
    }

    public  CollectionMultipartFormDataMessageBodyWriter(@Context Providers providers);
      CollectionMultipartFormDataMessageBodyWriter(MultipartFormDataWriter multipartFormDataWriter);

}