/** * Sets the destination output stream. * * @param output the output stream. * @throws IOException throws an IOException if destination cannot be set */ @Override public void setDestination(OutputStream output) throws IOException { if (getCompressOutput()) { super.setDestination(new GZIPOutputStream(output)); } else { super.setDestination(output); } }
/** * returns the options of the current setup * * @return the current options */ @Override public String[] getOptions() { Vector<String> result = new Vector<String>(); if (getClassIndex().length() != 0) { result.add("-C"); result.add(getClassIndex()); } if (getCompressOutput()) { result.add("-compress"); } Collections.addAll(result, super.getOptions()); return result.toArray(new String[result.size()]); }
/** * Sets the destination output stream. * * @param output the output stream. * @throws IOException throws an IOException if destination cannot be set */ @Override public void setDestination(OutputStream output) throws IOException { if (getCompressOutput()) { super.setDestination(new GZIPOutputStream(output)); } else { super.setDestination(output); } }
/** * returns the options of the current setup * * @return the current options */ @Override public String[] getOptions() { Vector<String> result = new Vector<String>(); if (getClassIndex().length() != 0) { result.add("-C"); result.add(getClassIndex()); } if (getCompressOutput()) { result.add("-compress"); } Collections.addAll(result, super.getOptions()); return result.toArray(new String[result.size()]); }
/** * Resets the Saver */ @Override public void resetOptions() { super.resetOptions(); if (getCompressOutput()) { setFileExtension(XRFFLoader.FILE_EXTENSION_COMPRESSED); } else { setFileExtension(XRFFLoader.FILE_EXTENSION); } try { m_XMLInstances = new XMLInstances(); } catch (Exception e) { m_XMLInstances = null; } }
/** * Resets the Saver */ @Override public void resetOptions() { super.resetOptions(); if (getCompressOutput()) { setFileExtension(XRFFLoader.FILE_EXTENSION_COMPRESSED); } else { setFileExtension(XRFFLoader.FILE_EXTENSION); } try { m_XMLInstances = new XMLInstances(); } catch (Exception e) { m_XMLInstances = null; } }