mirror of
				https://github.com/amithkoujalgi/ollama4j.git
				synced 2025-11-04 02:20:50 +01:00 
			
		
		
		
	Removes unnecessary serialize method of Serializer
This commit is contained in:
		@@ -1,8 +1,6 @@
 | 
			
		||||
package io.github.amithkoujalgi.ollama4j.core.utils;
 | 
			
		||||
 | 
			
		||||
import java.io.ByteArrayOutputStream;
 | 
			
		||||
import java.io.IOException;
 | 
			
		||||
import java.io.ObjectOutputStream;
 | 
			
		||||
import java.util.Base64;
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
 | 
			
		||||
@@ -20,11 +18,4 @@ public class FileToBase64Serializer extends JsonSerializer<Collection<byte[]>> {
 | 
			
		||||
        }
 | 
			
		||||
        jsonGenerator.writeEndArray();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static byte[] serialize(Object obj) throws IOException {
 | 
			
		||||
        ByteArrayOutputStream out = new ByteArrayOutputStream();
 | 
			
		||||
        ObjectOutputStream os = new ObjectOutputStream(out);
 | 
			
		||||
        os.writeObject(obj);
 | 
			
		||||
        return out.toByteArray();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user