Skip to Content.
Sympa Menu

notify-dpml - r1773 - trunk/main/transit/core/src/main/net/dpml/transit/artifact

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1773 - trunk/main/transit/core/src/main/net/dpml/transit/artifact
  • Date: Mon, 9 Oct 2006 01:55:15 +0200

Author: mcconnell
Date: 2006-10-09 01:55:14 +0200 (Mon, 09 Oct 2006)
New Revision: 1773

Modified:

trunk/main/transit/core/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
Log:
Updates to artifact connection handler to force local caching as a part of
the connect protocol (this allows explicit caching via an action such as
url.openConnection().connect().

Modified:
trunk/main/transit/core/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
===================================================================
---
trunk/main/transit/core/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
2006-10-08 23:52:43 UTC (rev 1772)
+++
trunk/main/transit/core/src/main/net/dpml/transit/artifact/ArtifactURLConnection.java
2006-10-08 23:55:14 UTC (rev 1773)
@@ -115,7 +115,33 @@
public void connect()
throws IOException
{
- m_connected = true;
+ if( m_connected )
+ {
+ return;
+ }
+ else
+ {
+ m_connected = true;
+ InputStream stream = null;
+ try
+ {
+ stream = getInputStream();
+ }
+ finally
+ {
+ if( null != stream )
+ {
+ try
+ {
+ stream.close();
+ }
+ finally
+ {
+ stream = null;
+ }
+ }
+ }
+ }
}

/**
@@ -189,7 +215,6 @@
public Object getContent( Class[] classes )
throws IOException
{
-
//
// attempt to resolve this locally as we may be dealing
// with Depot references to the artifact File




  • r1773 - trunk/main/transit/core/src/main/net/dpml/transit/artifact, mcconnell at BerliOS, 10/08/2006

Archive powered by MHonArc 2.6.24.

Top of Page