java - serialize csv file into an object in jersey service -
i trying write jersey service consumes csv file. want serialize csv file object. can achieve this? going use opencsv parser library csv file.
my base structure of service:
@post @consumes(mediatype.text_plain){ public void addusers(@formdataparam("file") inputstream inputstream) throws unsupportedencodingexception{ } is @consumes annotation using right way well?
this answer tells how convert csv object in java - java api make object csv file
are uploading csv file ? can use multipart upload instead (if makes sense. multipart let's consider file upload attachment of sorts. there meta-data associated such requests, can sent separate part) ? csv has it's own mime type defined rfc4180 although i'm unaware if jersey distinguishes it. long read stream using right encoding should good.
Comments
Post a Comment