/** * Returns an array of <code>ManagedOutputStream</code> for a set of managed files. * When all managed output streams in the set have been closed, the storage manager * will be updated with the new content of the managed files. * Aborting any one of the streams will cause the entire content of the set to abort * and be discarded. * * @param managedFiles list of names of the managed file to write. * @return an array of managed output streams respectively of managed files. * @throws IOException if an error occurs opening the managed files. */ public ManagedOutputStream[] getOutputStreamSet(String[] managedFiles) throws IOException { int count = managedFiles.length; ManagedOutputStream[] streams = new ManagedOutputStream[count]; int idx = 0; try { for (; idx < count; idx++) { ManagedOutputStream newStream = getOutputStream(managedFiles[idx]); newStream.setStreamSet(streams); streams[idx] = newStream; } } catch (IOException e) { // cleanup for (int jdx = 0; jdx < idx; jdx++) streams[jdx].abort(); throw e; } return streams; }
/** * Returns an array of <code>ManagedOutputStream</code> for a set of managed files. * When all managed output streams in the set have been closed, the storage manager * will be updated with the new content of the managed files. * Aborting any one of the streams will cause the entire content of the set to abort * and be discarded. * * @param managedFiles list of names of the managed file to write. * @return an array of managed output streams respectively of managed files. * @throws IOException if an error occurs opening the managed files. */ public ManagedOutputStream[] getOutputStreamSet(String[] managedFiles) throws IOException { int count = managedFiles.length; ManagedOutputStream[] streams = new ManagedOutputStream[count]; int idx = 0; try { for (; idx < count; idx++) { ManagedOutputStream newStream = getOutputStream(managedFiles[idx]); newStream.setStreamSet(streams); streams[idx] = newStream; } } catch (IOException e) { // cleanup for (int jdx = 0; jdx < idx; jdx++) streams[jdx].abort(); throw e; } return streams; }
/** * Returns an array of <code>ManagedOutputStream</code> for a set of managed files. * When all managed output streams in the set have been closed, the storage manager * will be updated with the new content of the managed files. * Aborting any one of the streams will cause the entire content of the set to abort * and be discarded. * * @param managedFiles list of names of the managed file to write. * @return an array of managed output streams respectively of managed files. * @throws IOException if an error occurs opening the managed files. */ public ManagedOutputStream[] getOutputStreamSet(String[] managedFiles) throws IOException { int count = managedFiles.length; ManagedOutputStream[] streams = new ManagedOutputStream[count]; int idx = 0; try { for (; idx < count; idx++) { ManagedOutputStream newStream = getOutputStream(managedFiles[idx]); newStream.setStreamSet(streams); streams[idx] = newStream; } } catch (IOException e) { // cleanup for (int jdx = 0; jdx < idx; jdx++) streams[jdx].abort(); throw e; } return streams; }
/** * Returns an array of <code>ManagedOutputStream</code> for a set of managed files. * When all managed output streams in the set have been closed, the storage manager * will be updated with the new content of the managed files. * Aborting any one of the streams will cause the entire content of the set to abort * and be discarded. * * @param managedFiles list of names of the managed file to write. * @return an array of managed output streams respectively of managed files. * @throws IOException if an error occurs opening the managed files. */ public ManagedOutputStream[] getOutputStreamSet(String[] managedFiles) throws IOException { int count = managedFiles.length; ManagedOutputStream[] streams = new ManagedOutputStream[count]; int idx = 0; try { for (; idx < count; idx++) { ManagedOutputStream newStream = getOutputStream(managedFiles[idx]); newStream.setStreamSet(streams); streams[idx] = newStream; } } catch (IOException e) { // cleanup for (int jdx = 0; jdx < idx; jdx++) streams[jdx].abort(); throw e; } return streams; }
/** * Returns an array of <code>ManagedOutputStream</code> for a set of managed files. * When all managed output streams in the set have been closed, the storage manager * will be updated with the new content of the managed files. * Aborting any one of the streams will cause the entire content of the set to abort * and be discarded. * * @param managedFiles list of names of the managed file to write. * @return an array of managed output streams respectively of managed files. * @throws IOException if an error occurs opening the managed files. */ public ManagedOutputStream[] getOutputStreamSet(String[] managedFiles) throws IOException { int count = managedFiles.length; ManagedOutputStream[] streams = new ManagedOutputStream[count]; int idx = 0; try { for (; idx < count; idx++) { ManagedOutputStream newStream = getOutputStream(managedFiles[idx]); newStream.setStreamSet(streams); streams[idx] = newStream; } } catch (IOException e) { // cleanup for (int jdx = 0; jdx < idx; jdx++) streams[jdx].abort(); throw e; } return streams; }
/** * Returns an array of <code>ManagedOutputStream</code> for a set of managed files. * When all managed output streams in the set have been closed, the storage manager * will be updated with the new content of the managed files. * Aborting any one of the streams will cause the entire content of the set to abort * and be discarded. * * @param managedFiles list of names of the managed file to write. * @return an array of managed output streams respectively of managed files. * @throws IOException if an error occurs opening the managed files. */ public ManagedOutputStream[] getOutputStreamSet(String[] managedFiles) throws IOException { int count = managedFiles.length; ManagedOutputStream[] streams = new ManagedOutputStream[count]; int idx = 0; try { for (; idx < count; idx++) { ManagedOutputStream newStream = getOutputStream(managedFiles[idx]); newStream.setStreamSet(streams); streams[idx] = newStream; } } catch (IOException e) { // cleanup for (int jdx = 0; jdx < idx; jdx++) streams[jdx].abort(); throw e; } return streams; }
/** * Returns an array of <code>ManagedOutputStream</code> for a set of managed files. * When all managed output streams in the set have been closed, the storage manager * will be updated with the new content of the managed files. * Aborting any one of the streams will cause the entire content of the set to abort * and be discarded. * * @param managedFiles list of names of the managed file to write. * @return an array of managed output streams respectively of managed files. * @throws IOException if an error occurs opening the managed files. */ public ManagedOutputStream[] getOutputStreamSet(String[] managedFiles) throws IOException { int count = managedFiles.length; ManagedOutputStream[] streams = new ManagedOutputStream[count]; int idx = 0; try { for (; idx < count; idx++) { ManagedOutputStream newStream = getOutputStream(managedFiles[idx]); newStream.setStreamSet(streams); streams[idx] = newStream; } } catch (IOException e) { // cleanup for (int jdx = 0; jdx < idx; jdx++) streams[jdx].abort(); throw e; } return streams; }
/** * Returns an array of <code>ManagedOutputStream</code> for a set of managed files. * When all managed output streams in the set have been closed, the storage manager * will be updated with the new content of the managed files. * Aborting any one of the streams will cause the entire content of the set to abort * and be discarded. * * @param managedFiles list of names of the managed file to write. * @return an array of managed output streams respectively of managed files. * @throws IOException if an error occurs opening the managed files. */ public ManagedOutputStream[] getOutputStreamSet(String[] managedFiles) throws IOException { int count = managedFiles.length; ManagedOutputStream[] streams = new ManagedOutputStream[count]; int idx = 0; try { for (; idx < count; idx++) { ManagedOutputStream newStream = getOutputStream(managedFiles[idx]); newStream.setStreamSet(streams); streams[idx] = newStream; } } catch (IOException e) { // cleanup for (int jdx = 0; jdx < idx; jdx++) streams[jdx].abort(); throw e; } return streams; }
Debug.println("About to save permission data ..."); //$NON-NLS-1$ try { ManagedOutputStream fmos = storageManager.getOutputStream(PERM_DATA_FILE); DataOutputStream out = new DataOutputStream(new BufferedOutputStream(fmos)); boolean error = true;
Debug.println("About to save permission data ..."); //$NON-NLS-1$ try { ManagedOutputStream fmos = getStorageManager().getOutputStream(PERM_DATA_FILE); DataOutputStream out = new DataOutputStream(new BufferedOutputStream(fmos)); boolean error = true;
void save0() throws IOException { StorageManager childStorageManager = null; DataOutputStream out = null; moduleDatabase.readLock(); try { synchronized (this.saveMonitor) { if (lastSavedTimestamp == moduleDatabase.getTimestamp()) return; childStorageManager = getChildStorageManager(); out = new DataOutputStream(new BufferedOutputStream(childStorageManager.getOutputStream(FRAMEWORK_INFO))); saveGenerations(out); savePermissionData(out); moduleDatabase.store(out, true); lastSavedTimestamp = moduleDatabase.getTimestamp(); } } finally { if (out != null) { try { out.close(); } catch (IOException e) { // tried our best } } if (childStorageManager != null) { childStorageManager.close(); } moduleDatabase.readUnlock(); } }
void save0() throws IOException { StorageManager childStorageManager = null; DataOutputStream out = null; moduleDatabase.readLock(); try { synchronized (this.saveMonitor) { if (lastSavedTimestamp == moduleDatabase.getTimestamp()) return; childStorageManager = getChildStorageManager(); out = new DataOutputStream(new BufferedOutputStream(childStorageManager.getOutputStream(FRAMEWORK_INFO))); saveGenerations(out); savePermissionData(out); moduleDatabase.store(out, true); lastSavedTimestamp = moduleDatabase.getTimestamp(); } } finally { if (out != null) { try { out.close(); } catch (IOException e) { // tried our best } } if (childStorageManager != null) { childStorageManager.close(); } moduleDatabase.readUnlock(); } }
Debug.println("Saving bundle data ..."); //$NON-NLS-1$ try { ManagedOutputStream fmos = getStorageManager().getOutputStream(LocationManager.BUNDLE_DATA_FILE); DataOutputStream out = new DataOutputStream(new BufferedOutputStream(fmos)); boolean error = true;
Debug.println("Saving bundle data ..."); //$NON-NLS-1$ try { ManagedOutputStream fmos = storageManager.getOutputStream(LocationManager.BUNDLE_DATA_FILE); DataOutputStream out = new DataOutputStream(new BufferedOutputStream(fmos)); boolean error = true;
return; childStorageManager = getChildStorageManager(); mos = childStorageManager.getOutputStream(FRAMEWORK_INFO); out = new DataOutputStream(new BufferedOutputStream(mos)); saveGenerations(out);
return; childStorageManager = getChildStorageManager(); mos = childStorageManager.getOutputStream(FRAMEWORK_INFO); out = new DataOutputStream(new BufferedOutputStream(mos)); saveGenerations(out);
return; childStorageManager = getChildStorageManager(); mos = childStorageManager.getOutputStream(FRAMEWORK_INFO); out = new DataOutputStream(new BufferedOutputStream(mos)); saveGenerations(out);
return; childStorageManager = getChildStorageManager(); mos = childStorageManager.getOutputStream(FRAMEWORK_INFO); out = new DataOutputStream(new BufferedOutputStream(mos)); saveGenerations(out);