agutierrez-ext 4 lat temu
rodzic
commit
4e9f09b14f
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      src/com/vespot/utils/Utils.java

+ 2 - 2
src/com/vespot/utils/Utils.java Wyświetl plik

21
  */
21
  */
22
 public class Utils {
22
 public class Utils {
23
     
23
     
24
-    public String objectToXml(Object obj, Class c) {
24
+    public static String objectToXml(Object obj, Class c) {
25
         try {
25
         try {
26
             JAXBContext context = JAXBContext.newInstance(c);
26
             JAXBContext context = JAXBContext.newInstance(c);
27
             Marshaller marshaller = context.createMarshaller();
27
             Marshaller marshaller = context.createMarshaller();
36
         return null;
36
         return null;
37
     }
37
     }
38
     
38
     
39
-    public Object xmlToObject(String content, Class c) {
39
+    public static Object xmlToObject(String content, Class c) {
40
         try {
40
         try {
41
             JAXBContext context = JAXBContext.newInstance(c);
41
             JAXBContext context = JAXBContext.newInstance(c);
42
             Unmarshaller unmarsheller = context.createUnmarshaller();
42
             Unmarshaller unmarsheller = context.createUnmarshaller();