diff --git a/src/main/java/cactusServer/utils/JSONProvider.java b/src/main/java/cactusServer/utils/JSONProvider.java index 09819fb..01817b9 100644 --- a/src/main/java/cactusServer/utils/JSONProvider.java +++ b/src/main/java/cactusServer/utils/JSONProvider.java @@ -16,23 +16,23 @@ @Provider() @Produces(MediaType.APPLICATION_JSON) -public class JSONProvider implements MessageBodyWriter { +public class JSONProvider implements MessageBodyWriter { @Override - public long getSize(Object arg0, Class arg1, Type arg2, Annotation[] arg3, MediaType arg4) { + public long getSize(Object obj, Class type, Type genericType, Annotation[] annotations, MediaType mediaType) { try { - return JSON.encode(arg0).getBytes("UTF-8").length; + return JSON.encode(obj).getBytes("UTF-8").length; } catch (Exception e) { throw new RuntimeException(e); } } @Override - public boolean isWriteable(Class arg0, Type arg1, Annotation[] arg2, MediaType arg3) { + public boolean isWriteable(Class type, Type genericType, Annotation[] annotations, MediaType mediaType) { return true; } @Override - public void writeTo(Object arg0, Class arg1, Type arg2, Annotation[] arg3, MediaType arg4, MultivaluedMap arg5, OutputStream arg6) throws IOException, WebApplicationException { - JSON.encode(arg0, arg6); + public void writeTo(Object obj, Class type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap httpHeaders, OutputStream entityStream) throws IOException, WebApplicationException { + JSON.encode(obj, entityStream); } } \ No newline at end of file