return new Version();
}
+ /**
+ * Stop the server.
+ *
+ * @throws IOException
+ * in case of I/O errors
+ */
+ public void stop() throws IOException {
+ try {
+ post(WebLibraryUrls.EXIT_URL, null).close();
+ } catch (Exception e) {
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e1) {
+ }
+ if (getStatus() != Status.UNAVAILABLE) {
+ throw new IOException("Cannot exit the library", e);
+ }
+ }
+ }
+
@Override
public Status getStatus() {
try {
try {
subPg = JsonIO.toProgress(
new JSONObject(IOUtils.readSmallStream(in)));
+ pg.setName(subPg.getName());
+ pg.setMinMax(subPg.getMin(), subPg.getMax());
+ pg.setProgress(subPg.getProgress());
} catch (Exception e) {
subPg = null;
} finally {