mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-05-15 11:57:12 +02:00
Removes unnecessary serialize method of Serializer
This commit is contained in:
parent
8fe869afdb
commit
0f73ea75ab
@ -1,8 +1,6 @@
|
|||||||
package io.github.amithkoujalgi.ollama4j.core.utils;
|
package io.github.amithkoujalgi.ollama4j.core.utils;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.ObjectOutputStream;
|
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
@ -20,11 +18,4 @@ public class FileToBase64Serializer extends JsonSerializer<Collection<byte[]>> {
|
|||||||
}
|
}
|
||||||
jsonGenerator.writeEndArray();
|
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user