svn commit: r741475 - in /commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers: ar/ArArchiveInputStream.java cpio/CpioArchiveInputStream.java jar/JarArchiveInputStream.ja
Author: bodewig Date: Fri Feb 6 08:54:45 2009 New Revision: 741475 URL: http://svn.apache.org/viewvc?rev=741475view=rev Log: whitespace only Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java?rev=741475r1=741474r2=741475view=diff == --- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java (original) +++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java Fri Feb 6 08:54:45 2009 @@ -26,117 +26,117 @@ public class ArArchiveInputStream extends ArchiveInputStream { - private final InputStream input; - private long offset = 0; - - public ArArchiveInputStream( final InputStream pInput ) { - input = pInput; - } - - public ArchiveEntry getNextEntry() throws IOException { - - if (offset == 0) { - final byte[] expected = !arch\n.getBytes(); - final byte[] realized = new byte[expected.length]; - final int read = read(realized); - if (read != expected.length) { - throw new IOException(failed to read header); - } - for (int i = 0; i expected.length; i++) { - if (expected[i] != realized[i]) { - throw new IOException(invalid header + new String(realized)); - } - } - } - - if (input.available() == 0) { - return null; - } - - if (offset % 2 != 0) { - read(); - } - - final byte[] name = new byte[16]; - final byte[] lastmodified = new byte[12]; - final byte[] userid = new byte[6]; - final byte[] groupid = new byte[6]; - final byte[] filemode = new byte[8]; - final byte[] length = new byte[10]; - - read(name); - read(lastmodified); - read(userid); - read(groupid); - read(filemode); - read(length); - - { - final byte[] expected = `\012.getBytes(); - final byte[] realized = new byte[expected.length]; - final int read = read(realized); - if (read != expected.length) { - throw new IOException(failed to read entry header); - } - for (int i = 0; i expected.length; i++) { - if (expected[i] != realized[i]) { - throw new IOException(invalid entry header. not read the content?); - } - } - } - - return new ArArchiveEntry(new String(name).trim(), Long.parseLong(new String(length).trim())); - - } - - - public int read() throws IOException { - final int ret = input.read(); - offset++; - return ret; - } - - public int read(byte b[]) throws IOException { - final int ret = read(b, 0, b.length); - offset = offset + b.length; - return ret; - } - - public int read(byte[] b, int off, int len) throws IOException { - final int ret = this.input.read(b, off, len); - offset = offset + off; - return ret; - } - - public static boolean matches( byte[] signature ) { - // 3c21 7261 6863 0a3e - - if (signature[0] != 0x21) { - return false; - } - if (signature[1] != 0x3c) { - return false; - } - if (signature[2] != 0x61) { - return false; - } - if (signature[3] != 0x72) { -
svn commit: r741562 - in /commons/proper/io/trunk/src: java/org/apache/commons/io/ java/org/apache/commons/io/input/ java/org/apache/commons/io/output/ test/org/apache/commons/io/ test/org/apache/comm
Author: jukka Date: Fri Feb 6 13:29:06 2009 New Revision: 741562 URL: http://svn.apache.org/viewvc?rev=741562view=rev Log: IO-192: Tagged input and output streams Added the proposed TaggedIOException, TaggedInputStream and TaggedOutputStream classes and related unit tests. Added: commons/proper/io/trunk/src/java/org/apache/commons/io/TaggedIOException.java (with props) commons/proper/io/trunk/src/java/org/apache/commons/io/input/TaggedInputStream.java (with props) commons/proper/io/trunk/src/java/org/apache/commons/io/output/TaggedOutputStream.java (with props) commons/proper/io/trunk/src/test/org/apache/commons/io/TaggedIOExceptionTest.java (with props) commons/proper/io/trunk/src/test/org/apache/commons/io/input/TaggedInputStreamTest.java (with props) commons/proper/io/trunk/src/test/org/apache/commons/io/output/TaggedOutputStreamTest.java (with props) Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/PackageTestSuite.java commons/proper/io/trunk/src/test/org/apache/commons/io/input/PackageTestSuite.java commons/proper/io/trunk/src/test/org/apache/commons/io/output/PackageTestSuite.java Added: commons/proper/io/trunk/src/java/org/apache/commons/io/TaggedIOException.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/TaggedIOException.java?rev=741562view=auto == --- commons/proper/io/trunk/src/java/org/apache/commons/io/TaggedIOException.java (added) +++ commons/proper/io/trunk/src/java/org/apache/commons/io/TaggedIOException.java Fri Feb 6 13:29:06 2009 @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.commons.io; + +import java.io.IOException; + +/** + * An {...@link IOException} wrapper that tags the wrapped exception with + * a given object reference. Both the tag and the wrapped original exception + * can be used to determine further processing when this exception is caught. + * + * @since Commons IO 1.5 + */ +public class TaggedIOException extends IOExceptionWithCause { + +/** + * The object reference used to tag the exception. + */ +private final Object tag; + +/** + * Creates a tagged wrapper for the given exception. + * + * @param original the exception to be tagged + * @param tag tag object + */ +public TaggedIOException(IOException original, Object tag) { +super(original.getMessage(), original); +this.tag = tag; +} + +/** + * Returns the object reference used as the tag this exception. + * + * @return tag object + */ +public Object getTag() { +return tag; +} + +/** + * Returns the wrapped exception. The only difference to the overridden + * {...@link Throwable#getCause()} method is the narrower return type. + * + * @return wrapped exception + */ +public IOException getCause() { +return (IOException) super.getCause(); +} + +} Propchange: commons/proper/io/trunk/src/java/org/apache/commons/io/TaggedIOException.java -- svn:eol-style = native Added: commons/proper/io/trunk/src/java/org/apache/commons/io/input/TaggedInputStream.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/input/TaggedInputStream.java?rev=741562view=auto == --- commons/proper/io/trunk/src/java/org/apache/commons/io/input/TaggedInputStream.java (added) +++ commons/proper/io/trunk/src/java/org/apache/commons/io/input/TaggedInputStream.java Fri Feb 6 13:29:06 2009 @@ -0,0 +1,171 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the
svn commit: r741577 - /commons/sandbox/monitoring/branches/modules/reporting/src/main/java/org/apache/commons/monitoring/reporting/AbstractPeriodicLogger.java
Author: nicolas Date: Fri Feb 6 14:43:45 2009 New Revision: 741577 URL: http://svn.apache.org/viewvc?rev=741577view=rev Log: Support for TimeUnit for period/delay Modified: commons/sandbox/monitoring/branches/modules/reporting/src/main/java/org/apache/commons/monitoring/reporting/AbstractPeriodicLogger.java Modified: commons/sandbox/monitoring/branches/modules/reporting/src/main/java/org/apache/commons/monitoring/reporting/AbstractPeriodicLogger.java URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/branches/modules/reporting/src/main/java/org/apache/commons/monitoring/reporting/AbstractPeriodicLogger.java?rev=741577r1=741576r2=741577view=diff == --- commons/sandbox/monitoring/branches/modules/reporting/src/main/java/org/apache/commons/monitoring/reporting/AbstractPeriodicLogger.java (original) +++ commons/sandbox/monitoring/branches/modules/reporting/src/main/java/org/apache/commons/monitoring/reporting/AbstractPeriodicLogger.java Fri Feb 6 14:43:45 2009 @@ -41,10 +41,10 @@ private ObserverRepository secondary; /** The interval for periodic logging of monitored state */ -private int period; +private long period; /** The initial delay */ -private int delay; +private long delay; /** * @param period the period (in ms) to log the monitoring state @@ -120,13 +120,40 @@ this.repository = repository; } -public void setPeriod( int period ) +/** + * @param period in MILLISECONDS + * @see #setPeriod(long, TimeUnit) + */ +public void setPeriod( long period ) { this.period = period; } -public void setDelay( int delay ) +/** + * @param period The period to wait between logging processes + * @param unit time unit + */ +public void setPeriod( long period, TimeUnit unit ) +{ +this.period = TimeUnit.MILLISECONDS.convert( period, unit ); +} + +/** + * @param delay in MILLISECONDS + * @see #setDelay(long, TimeUnit) + */ +public void setDelay( long delay ) { this.delay = delay; } + +/** + * @param delay The delay to wait before first logging process + * @param unit time unit + */ +public void setDelay( long delay, TimeUnit unit ) +{ +this.delay = TimeUnit.MILLISECONDS.convert( delay, unit ); +} + }
svn commit: r741574 - in /commons/sandbox/monitoring/branches/modules/instrumentation: ./ src/main/java/org/apache/commons/monitoring/instrumentation/cxf/
Author: nicolas Date: Fri Feb 6 14:26:33 2009 New Revision: 741574 URL: http://svn.apache.org/viewvc?rev=741574view=rev Log: experiment SOAP monitoring using CXF Added: commons/sandbox/monitoring/branches/modules/instrumentation/src/main/java/org/apache/commons/monitoring/instrumentation/cxf/ commons/sandbox/monitoring/branches/modules/instrumentation/src/main/java/org/apache/commons/monitoring/instrumentation/cxf/MonitoringInterceptorInMode.java commons/sandbox/monitoring/branches/modules/instrumentation/src/main/java/org/apache/commons/monitoring/instrumentation/cxf/MonitoringInterceptorOutMode.java Modified: commons/sandbox/monitoring/branches/modules/instrumentation/pom.xml Modified: commons/sandbox/monitoring/branches/modules/instrumentation/pom.xml URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/branches/modules/instrumentation/pom.xml?rev=741574r1=741573r2=741574view=diff == --- commons/sandbox/monitoring/branches/modules/instrumentation/pom.xml (original) +++ commons/sandbox/monitoring/branches/modules/instrumentation/pom.xml Fri Feb 6 14:26:33 2009 @@ -33,5 +33,11 @@ scopeprovided/scope optionaltrue/optional /dependency +dependency + groupIdorg.apache.cxf/groupId + artifactIdcxf-rt-bindings-soap/artifactId + version2.1.3/version + optionaltrue/optional +/dependency /dependencies /project \ No newline at end of file Added: commons/sandbox/monitoring/branches/modules/instrumentation/src/main/java/org/apache/commons/monitoring/instrumentation/cxf/MonitoringInterceptorInMode.java URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/branches/modules/instrumentation/src/main/java/org/apache/commons/monitoring/instrumentation/cxf/MonitoringInterceptorInMode.java?rev=741574view=auto == --- commons/sandbox/monitoring/branches/modules/instrumentation/src/main/java/org/apache/commons/monitoring/instrumentation/cxf/MonitoringInterceptorInMode.java (added) +++ commons/sandbox/monitoring/branches/modules/instrumentation/src/main/java/org/apache/commons/monitoring/instrumentation/cxf/MonitoringInterceptorInMode.java Fri Feb 6 14:26:33 2009 @@ -0,0 +1,161 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.commons.monitoring.instrumentation.cxf; + +import java.util.List; +import java.util.Map; + +import org.apache.commons.monitoring.Monitor; +import org.apache.commons.monitoring.Repository; +import org.apache.commons.monitoring.StopWatch; +import org.apache.cxf.binding.soap.Soap11; +import org.apache.cxf.binding.soap.Soap12; +import org.apache.cxf.binding.soap.SoapBindingConstants; +import org.apache.cxf.binding.soap.SoapMessage; +import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor; +import org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor; +import org.apache.cxf.helpers.CastUtils; +import org.apache.cxf.interceptor.Fault; +import org.apache.cxf.message.Message; +import org.apache.cxf.phase.Phase; + +/** + * @author a href=mailto:nico...@apache.org;Nicolas De Loof/a + */ +public class MonitoringInterceptorInMode +extends AbstractSoapInterceptor +{ +private Repository repository; + +private String category = soap; + +private String domain; + +public MonitoringInterceptorInMode() +{ +super( Phase.READ ); +} + +public void handleMessage( SoapMessage message ) +throws Fault +{ +Monitor monitor = getMonitor( message ); +StopWatch stopWatch = repository.start( monitor ); +message.getExchange().put( StopWatch.class, stopWatch ); +} + +/** + * Select a Monitor for the incoming message. + * p + * May be overriden to use another Strategy to attach a Monitor to a SoapMessage + * + * @param message Soap IN message + * @return Monitor + */ +protected Monitor getMonitor( SoapMessage message ) +{ +return repository.getMonitor( getSoapAction( message ), category, domain ); +} + +/** + * Retrieve the SOAPAction header + *
svn commit: r741633 - in /commons/proper/email/trunk: src/java/org/apache/commons/mail/MultiPartEmail.java xdocs/changes.xml
Author: sgoeschl Date: Fri Feb 6 17:02:44 2009 New Revision: 741633 URL: http://svn.apache.org/viewvc?rev=741633view=rev Log: [EMAIL-78] Providing better diagnostic messages when attaching fails. Modified: commons/proper/email/trunk/src/java/org/apache/commons/mail/MultiPartEmail.java commons/proper/email/trunk/xdocs/changes.xml Modified: commons/proper/email/trunk/src/java/org/apache/commons/mail/MultiPartEmail.java URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/java/org/apache/commons/mail/MultiPartEmail.java?rev=741633r1=741632r2=741633view=diff == --- commons/proper/email/trunk/src/java/org/apache/commons/mail/MultiPartEmail.java (original) +++ commons/proper/email/trunk/src/java/org/apache/commons/mail/MultiPartEmail.java Fri Feb 6 17:02:44 2009 @@ -364,7 +364,7 @@ } catch (IOException e) { - throw new EmailException(Invalid URL set); + throw new EmailException(Invalid URL set: + url, e); } return attach(new URLDataSource(url), name, description, disposition); @@ -397,7 +397,7 @@ } catch (IOException e) { -throw new EmailException(Invalid Datasource); +throw new EmailException(Invalid Datasource, e); } return attach(ds, name, description, EmailAttachment.ATTACHMENT); Modified: commons/proper/email/trunk/xdocs/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/xdocs/changes.xml?rev=741633r1=741632r2=741633view=diff == --- commons/proper/email/trunk/xdocs/changes.xml (original) +++ commons/proper/email/trunk/xdocs/changes.xml Fri Feb 6 17:02:44 2009 @@ -24,6 +24,9 @@ body release version=1.2-SNAPSHOT date=as in SVN + action dev=sgoeschl type=fix issue=EMAIL-78 due-to=Aaron Digulla, Corey Scott +Provide better diagnostics when attaching documents fail. + /action action dev=sgoeschl type=fix issue=EMAIL-70 due-to=F. Andy Seidl When mail authentication is required and no username/password is supplied than the provided mail session is used. If a username/password is found
svn commit: r741637 - in /commons/sandbox/compress/trunk/src: main/java/org/apache/commons/compress/archivers/jar/ main/java/org/apache/commons/compress/archivers/zip/ test/java/org/apache/commons/com
Author: bodewig Date: Fri Feb 6 17:11:40 2009 New Revision: 741637 URL: http://svn.apache.org/viewvc?rev=741637view=rev Log: rename ZipEntry to ZipArchiveEntry Added: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java (contents, props changed) - copied, changed from r741632, commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipEntry.java Removed: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipEntry.java Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/JarTestCase.java commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/ZipTestCase.java commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java?rev=741637r1=741636r2=741637view=diff == --- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java (original) +++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java Fri Feb 6 17:11:40 2009 @@ -21,17 +21,18 @@ import java.security.cert.Certificate; import java.util.jar.Attributes; import java.util.jar.JarEntry; +import java.util.zip.ZipEntry; import java.util.zip.ZipException; import org.apache.commons.compress.archivers.ArchiveEntry; -import org.apache.commons.compress.archivers.zip.ZipEntry; +import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; -public class JarArchiveEntry extends ZipEntry implements ArchiveEntry { +public class JarArchiveEntry extends ZipArchiveEntry implements ArchiveEntry { private Attributes manifestAttributes = null; private Certificate[] certificates = null; - public JarArchiveEntry(java.util.zip.ZipEntry entry) throws ZipException { + public JarArchiveEntry(ZipEntry entry) throws ZipException { super(entry); } @@ -39,7 +40,7 @@ super(name); } - public JarArchiveEntry(ZipEntry entry) throws ZipException { + public JarArchiveEntry(ZipArchiveEntry entry) throws ZipException { super(entry); } Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java?rev=741637r1=741636r2=741637view=diff == --- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java (original) +++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java Fri Feb 6 17:11:40 2009 @@ -22,7 +22,7 @@ import java.io.InputStream; import org.apache.commons.compress.archivers.ArchiveEntry; -import org.apache.commons.compress.archivers.zip.ZipEntry; +import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream; public class JarArchiveInputStream extends ZipArchiveInputStream { @@ -32,7 +32,7 @@ } public ArchiveEntry getNextEntry() throws IOException { -ZipEntry entry = (ZipEntry)super.getNextEntry(); +ZipArchiveEntry entry = (ZipArchiveEntry)super.getNextEntry(); if(entry == null) { return null; } else { Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.java URL:
svn commit: r741641 - in /commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers: ./ ar/ cpio/ jar/ tar/ zip/
Author: bodewig Date: Fri Feb 6 17:24:01 2009 New Revision: 741641 URL: http://svn.apache.org/viewvc?rev=741641view=rev Log: merge ZipArchiveOutputStream and ZipOutputStream Removed: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java?rev=741641r1=741640r2=741641view=diff == --- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java (original) +++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java Fri Feb 6 17:24:01 2009 @@ -19,11 +19,16 @@ package org.apache.commons.compress.archivers; import java.io.IOException; +import java.io.FilterOutputStream; import java.io.OutputStream; -public abstract class ArchiveOutputStream extends OutputStream { +public abstract class ArchiveOutputStream extends FilterOutputStream { - public abstract void putArchiveEntry(ArchiveEntry entry) throws IOException; +protected ArchiveOutputStream(OutputStream other) { +super(other); +} + +public abstract void putArchiveEntry(ArchiveEntry entry) throws IOException; public abstract void closeArchiveEntry() throws IOException; } Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java?rev=741641r1=741640r2=741641view=diff == --- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java (original) +++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java Fri Feb 6 17:24:01 2009 @@ -31,7 +31,7 @@ import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream; import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream; -import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; +import org.apache.commons.compress.archivers.zip.ZipOutputStream; /** * Factory to create Archive[In|Out]putStreams from names @@ -65,7 +65,7 @@ if (ar.equalsIgnoreCase(archiverName)) { return new ArArchiveOutputStream(out); } else if(zip.equalsIgnoreCase(archiverName)) { -return new ZipArchiveOutputStream(out); +return new ZipOutputStream(out); } else if(tar.equalsIgnoreCase(archiverName)) { return new TarArchiveOutputStream(out); } else if(jar.equalsIgnoreCase(archiverName)) { Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java?rev=741641r1=741640r2=741641view=diff == --- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java (original) +++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java Fri Feb 6 17:24:01 2009 @@ -26,13 +26,12 @@ public class ArArchiveOutputStream extends ArchiveOutputStream { - private final OutputStream out; private long archiveOffset = 0; private long entryOffset = 0; private ArArchiveEntry prevEntry; public ArArchiveOutputStream( final OutputStream pOut ) { - out = pOut; +
svn commit: r741688 - /commons/trunks-sandbox/
Author: mbenson Date: Fri Feb 6 19:33:25 2009 New Revision: 741688 URL: http://svn.apache.org/viewvc?rev=741688view=rev Log: add xml component Modified: commons/trunks-sandbox/ (props changed) Propchange: commons/trunks-sandbox/ -- --- svn:externals (original) +++ svn:externals Fri Feb 6 19:33:25 2009 @@ -18,3 +18,5 @@ performance https://svn.apache.org/repos/asf/commons/sandbox/performance/trunk pipeline https://svn.apache.org/repos/asf/commons/sandbox/pipeline/trunk validator2 https://svn.apache.org/repos/asf/commons/sandbox/validator2/trunk +xml https://svn.apache.org/repos/asf/commons/sandbox/xml/trunk +
svn commit: r741845 - /commons/sandbox/pipeline/trunk/src/site/xdoc/pipeline_basics.xml
Author: rahul Date: Sat Feb 7 06:23:06 2009 New Revision: 741845 URL: http://svn.apache.org/viewvc?rev=741845view=rev Log: Stray line breaks in pipeline_basics tutorial code examples. Patch by Ken Tanaka Ken DOT Tanaka AT noaa DOT gov SANDBOX-278 Modified: commons/sandbox/pipeline/trunk/src/site/xdoc/pipeline_basics.xml Modified: commons/sandbox/pipeline/trunk/src/site/xdoc/pipeline_basics.xml URL: http://svn.apache.org/viewvc/commons/sandbox/pipeline/trunk/src/site/xdoc/pipeline_basics.xml?rev=741845r1=741844r2=741845view=diff == --- commons/sandbox/pipeline/trunk/src/site/xdoc/pipeline_basics.xml (original) +++ commons/sandbox/pipeline/trunk/src/site/xdoc/pipeline_basics.xml Sat Feb 7 06:23:06 2009 @@ -477,27 +477,27 @@ Description: A sample configuration file for a very simple pipeline --gt;/span -lt;bpipeline/bgt; +lt;span style=font-weight:bold;pipeline/spangt; -lt;bdriverFactory/b className=quot;org.apache.commons.pipeline.driver.bDedicatedThreadStageDriverFactory/bquot; - id=quot;span style=color:#008080;bdriverFactory/b/spanquot;/gt; +lt;span style=font-weight:bold;driverFactory/span className=quot;org.apache.commons.pipeline.driver.span style=font-weight:bold;DedicatedThreadStageDriverFactory/spanquot; + id=quot;span style=color:#008080;span style=font-weight:bold;driverFactory/span/spanquot;/gt; lt;!-- ((1)) The first stage recursively searches the directory given in the feed statement. The filePattern given will match any files beginning with quot;HelloWorldquot;. --gt; -span style=color:#99;lt;bstage/b className=quot;org.apache.commons.pipeline.stage.bFileFinderStage/bquot; - driverFactoryId=quot;span style=color:#008080;bdriverFactory/b/spanquot; - span style=color:#FF6600;filePattern=quot;bHelloWorld.*/bquot;/span/gt;/span span style=color:#FF6600;lt;!-- ((3)) --gt;/span +span style=color:#99;lt;span style=font-weight:bold;stage/span className=quot;org.apache.commons.pipeline.stage.span style=font-weight:bold;FileFinderStage/spanquot; + driverFactoryId=quot;span style=color:#008080;span style=font-weight:bold;driverFactory/span/spanquot; + span style=color:#FF6600;filePattern=quot;span style=font-weight:bold;HelloWorld.*/spanquot;/span/gt;/span span style=color:#FF6600;lt;!-- ((3)) --gt;/span lt;!-- Starting directory for the first stage. --gt; -span style=color:#00CC00;lt;bfeed/bgt; -lt;valuegt;b/data/sample/blt;/valuegt; lt;!-- ((4)) --gt; +span style=color:#00CC00;lt;span style=font-weight:bold;feed/spangt; +lt;valuegt;span style=font-weight:bold;/data/sample/spanlt;/valuegt; lt;!-- ((4)) --gt; lt;/feedgt;/span lt;!-- ((2)) Report the files found. --gt; -span style=color:#FF;lt;bstage/b className=quot;org.apache.commons.pipeline.stage.bLogStage/bquot; - driverFactoryId=quot;span style=color:#008080;bdriverFactory/b/spanquot; /gt;/span +span style=color:#FF;lt;span style=font-weight:bold;stage/span className=quot;org.apache.commons.pipeline.stage.span style=font-weight:bold;LogStage/spanquot; + driverFactoryId=quot;span style=color:#008080;span style=font-weight:bold;driverFactory/span/spanquot; /gt;/span lt;/pipelinegt;/pre /td/tr/table @@ -507,7 +507,7 @@ quot;driverFactoryquot;, and this value is used by the driverFactoryId in both stages. /p -pbr /br / +pbr / In theory a pipeline could consist of just one stage, but this degenerate case is not much different from a plain program except that it can be easily expanded with additional stages. @@ -531,14 +531,14 @@ puts data into a database. --gt;/span -lt;bpipeline/bgt; +lt;span style=font-weight:bold;pipeline/spangt; -lt;bdriverFactory/b className=quot;org.apache.commons.pipeline.driver.bDedicatedThreadStageDriverFactory/bquot; -id=quot;span style=color:#808000;bdf0/b/spanquot;/gt; +lt;span style=font-weight:bold;driverFactory/span className=quot;org.apache.commons.pipeline.driver.span style=font-weight:bold;DedicatedThreadStageDriverFactory/spanquot; +id=quot;span style=color:#808000;span style=font-weight:bold;df0/span/spanquot;/gt; -lt;bdriverFactory/b className=quot;org.apache.commons.pipeline.driver.bDedicatedThreadStageDriverFactory/bquot; -id=quot;span style=color:#008080;bdf1/b/spanquot;gt; +lt;span style=font-weight:bold;driverFactory/span className=quot;org.apache.commons.pipeline.driver.span style=font-weight:bold;DedicatedThreadStageDriverFactory/spanquot; +id=quot;span style=color:#008080;span style=font-weight:bold;df1/span/spanquot;gt; lt;property