@Override protected void unpackageClassifier(JarInputStream modelStream) throws IOException { super.unpackageClassifier(modelStream); JarStreams.getNextJarEntry(modelStream, MODEL_NAME); ObjectInputStream objectStream = new ObjectInputStream(modelStream); try { this.classifier = (Classifier) objectStream.readObject(); } catch (ClassNotFoundException e) { throw new IOException(e); } }
@Override protected void packageClassifier(File dir, JarOutputStream modelStream) throws IOException { super.packageClassifier(dir, modelStream); JarStreams.putNextJarEntry(modelStream, MODEL_NAME, new File(dir, MODEL_NAME)); }