Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1436 - in development/main/transit: . installer installer/src installer/src/main installer/src/main/net installer/src/main/net/dpml installer/src/main/net/dpml/transit installer/src/main/net/dpml/transit/installer

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: niclas AT netcompartner.com
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1436 - in development/main/transit: . installer installer/src installer/src/main installer/src/main/net installer/src/main/net/dpml installer/src/main/net/dpml/transit installer/src/main/net/dpml/transit/installer
  • Date: Mon, 10 Jan 2005 13:06:44 +0100

Author: niclas
Date: Mon Jan 10 13:06:44 2005
New Revision: 1436

Added:
development/main/transit/installer/
development/main/transit/installer/build.properties (contents, props
changed)
development/main/transit/installer/build.xml (contents, props changed)
development/main/transit/installer/src/
development/main/transit/installer/src/main/
development/main/transit/installer/src/main/net/
development/main/transit/installer/src/main/net/dpml/
development/main/transit/installer/src/main/net/dpml/transit/
development/main/transit/installer/src/main/net/dpml/transit/installer/

development/main/transit/installer/src/main/net/dpml/transit/installer/ConsoleInstaller.java
(contents, props changed)

development/main/transit/installer/src/main/net/dpml/transit/installer/InstallException.java
(contents, props changed)

development/main/transit/installer/src/main/net/dpml/transit/installer/Main.java
(contents, props changed)

development/main/transit/installer/src/main/net/dpml/transit/installer/ProgressIndicator.java
(contents, props changed)

development/main/transit/installer/src/main/net/dpml/transit/installer/SwingInstaller.java
(contents, props changed)

development/main/transit/installer/src/main/net/dpml/transit/installer/Unzip.java
(contents, props changed)

development/main/transit/installer/src/main/net/dpml/transit/installer/Worker.java
(contents, props changed)
Modified:
development/main/transit/index.xml
Log:
First draft on the Transit installer. Still some more to do.

Modified: development/main/transit/index.xml
==============================================================================
--- development/main/transit/index.xml (original)
+++ development/main/transit/index.xml Mon Jan 10 13:06:44 2005
@@ -59,6 +59,19 @@
</info>
</project>

+ <project basedir="installer">
+ <info>
+ <group>dpml/transit</group>
+ <name>dpml-transit-installer</name>
+ <version>1.0.0</version>
+ <status>SNAPSHOT</status>
+ <type>jar</type>
+ </info>
+ <dependencies>
+ <include key="dpml-transit-plugin"/>
+ </dependencies>
+ </project>
+
<project basedir="plugin">
<info>
<group>dpml/transit</group>

Added: development/main/transit/installer/build.properties
==============================================================================
--- (empty file)
+++ development/main/transit/installer/build.properties Mon Jan 10 13:06:44
2005
@@ -0,0 +1 @@
+project.jar.main.class=net.dpml.transit.installer.Main

Added: development/main/transit/installer/build.xml
==============================================================================
--- (empty file)
+++ development/main/transit/installer/build.xml Mon Jan 10 13:06:44
2005
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 2004 Stephen J McConnell
+ Copyright 2004 Niclas Hedhman
+
+ Licensed 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.
+-->
+
+<project name="dpml-transit-installer" default="create" basedir="."
+ xmlns:magic="antlib:net.dpml.magic"
+>
+
+ <magic:import uri="artifact:template:dpml/magic/standard"/>
+
+ <target name="build" depends="standard.build" >
+ <jar jarfile="target/classes/dpml.jar" >
+ <zipfileset dir="../handler/target/setup/" prefix="transit" >
+ <include name="**" />
+ </zipfileset>
+ </jar>
+ <jar jarfile="target/classes/antlib.jar" >
+ <zipfileset dir="../handler/target/deliverables/jars" >
+ <include name="**" />
+ </zipfileset>
+ <zipfileset dir="${dpml.cache}/junit/jars/" >
+ <include name="junit-3.8.1.jar" />
+ </zipfileset>
+ </jar>
+ </target>
+
+
+ <target name="create" depends="install">
+
+ </target>
+
+</project>
+

Added:
development/main/transit/installer/src/main/net/dpml/transit/installer/ConsoleInstaller.java
==============================================================================
--- (empty file)
+++
development/main/transit/installer/src/main/net/dpml/transit/installer/ConsoleInstaller.java
Mon Jan 10 13:06:44 2005
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman
+ *
+ * Licensed 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 net.dpml.transit.installer;
+
+import java.io.File;
+
+public class ConsoleInstaller
+{
+ private static final int BUFFER_SIZE = 10000;
+
+ public ConsoleInstaller()
+ {
+ }
+
+ public void start()
+ throws Exception
+ {
+ ProgressIndicator indicator = new ConsoleProgress();
+ Worker w = Main.createWorker( indicator );
+ w.start();
+ }
+
+ public class ConsoleProgress
+ implements ProgressIndicator
+ {
+ int m_OldPercent;
+
+ public void message( String message )
+ {
+ System.out.println( message );
+ }
+
+ public void error( String message )
+ throws InstallException
+ {
+ System.out.println( message );
+ throw new InstallException( message );
+ }
+
+ public void start()
+ {
+ System.out.print( "[
] 0%" );
+ m_OldPercent = 0;
+ }
+
+ public void progress( int percentage )
+ {
+ if( percentage - m_OldPercent < 2 )
+ return;
+ m_OldPercent = percentage;
+ if( percentage > 100 )
+ return;
+ int size = percentage / 2;
+ System.out.print( "\r[" );
+ for( int i = 0 ; i < size ; i++ )
+ System.out.print( "*" );
+ for( int i = 0 ; i < 50-size ; i++ )
+ System.out.print( " " );
+ System.out.print( "] " + percentage + "%" );
+ }
+
+ public void finished()
+ {
+ System.out.print(
"\r[**************************************************] 100%" );
+ System.out.println();
+ }
+ }
+}
+

Added:
development/main/transit/installer/src/main/net/dpml/transit/installer/InstallException.java
==============================================================================
--- (empty file)
+++
development/main/transit/installer/src/main/net/dpml/transit/installer/InstallException.java
Mon Jan 10 13:06:44 2005
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman
+ *
+ * Licensed 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 net.dpml.transit.installer;
+
+public class InstallException extends Exception
+{
+ public InstallException( String message )
+ {
+ super( message );
+ }
+
+ public InstallException( String message, Throwable cause )
+ {
+ super( message, cause );
+ }
+}
+

Added:
development/main/transit/installer/src/main/net/dpml/transit/installer/Main.java
==============================================================================
--- (empty file)
+++
development/main/transit/installer/src/main/net/dpml/transit/installer/Main.java
Mon Jan 10 13:06:44 2005
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman
+ *
+ * Licensed 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 net.dpml.transit.installer;
+
+import java.io.File;
+
+public class Main
+{
+ static public void main( String[] args )
+ throws Exception
+ {
+ if( args.length == 0 )
+ {
+ ConsoleInstaller installer = new ConsoleInstaller();
+ installer.start();
+ return;
+ }
+ if( args[0].equals( "-console" ) )
+ {
+ ConsoleInstaller installer = new ConsoleInstaller();
+ installer.start();
+ return;
+ }
+
+ if( args[0].equals( "-gui" ) )
+ {
+ SwingInstaller installer = new SwingInstaller();
+ installer.start();
+ return;
+ }
+ }
+
+ static Worker createWorker( ProgressIndicator indicator )
+ {
+ File userHome = new File( System.getProperty( "user.home" ) );
+ File dpmlHome = new File( userHome, ".dpml" );
+ File antLibDir = new File( userHome, ".ant/lib" );
+ File cwDir = new File( System.getProperty( "user.dir" ) );
+
+ Worker w = new Worker( indicator, dpmlHome, antLibDir, cwDir );
+ return w;
+ }
+}

Added:
development/main/transit/installer/src/main/net/dpml/transit/installer/ProgressIndicator.java
==============================================================================
--- (empty file)
+++
development/main/transit/installer/src/main/net/dpml/transit/installer/ProgressIndicator.java
Mon Jan 10 13:06:44 2005
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman
+ *
+ * Licensed 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 net.dpml.transit.installer;
+
+public interface ProgressIndicator
+{
+ void message( String message );
+
+ void error( String errormessage ) throws Exception;
+
+ void start();
+
+ void progress( int percentage );
+
+ void finished();
+}
+

Added:
development/main/transit/installer/src/main/net/dpml/transit/installer/SwingInstaller.java
==============================================================================
--- (empty file)
+++
development/main/transit/installer/src/main/net/dpml/transit/installer/SwingInstaller.java
Mon Jan 10 13:06:44 2005
@@ -0,0 +1,200 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman
+ *
+ * Licensed 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 net.dpml.transit.installer;
+
+import java.awt.Container;
+import java.awt.Dimension;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import java.io.File;
+
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JProgressBar;
+import javax.swing.JTextArea;
+
+public class SwingInstaller
+ implements ActionListener
+{
+ private JFrame m_ProgressWindow;
+ private JProgressBar m_ProgressBar;
+ private JTextArea m_TextArea;
+ private JButton m_FinishButton;
+
+ public SwingInstaller()
+ {
+ m_ProgressWindow = new JFrame();
+ Container pane = m_ProgressWindow.getContentPane();
+ final BoxLayout layout = new BoxLayout( pane, BoxLayout.X_AXIS );
+ pane.setLayout( layout );
+
+ JPanel leadColumn = new JPanel();
+ leadColumn.setMinimumSize( new Dimension( 10, 10 ) );
+ pane.add( leadColumn );
+
+ JPanel column = new JPanel();
+ final BoxLayout layout2 = new BoxLayout( column, BoxLayout.Y_AXIS );
+ column.setLayout( layout2 );
+ pane.add( column );
+
+ JPanel trailColumn = new JPanel();
+ trailColumn.setMinimumSize( new Dimension( 10, 10 ) );
+ pane.add( trailColumn );
+
+ JPanel leadRow = new JPanel();
+ leadRow.setMinimumSize( new Dimension( 10, 10 ) );
+ column.add( leadRow );
+
+ final JLabel label = new JLabel( "Installing Magic - The new age of
build systems." );
+ column.add( label );
+
+ m_ProgressWindow.setTitle( "Transit Installer" );
+ final JPanel spring1 = new JPanel();
+ setSizes( spring1, 0, 10, 100 );
+ column.add( spring1 );
+
+ m_ProgressBar = createProgressBar();
+ column.add( m_ProgressBar );
+ final JPanel spring2 = new JPanel();
+ setSizes( spring2, 0, 10, 100 );
+ column.add( spring2 );
+
+ final JPanel spring3 = new JPanel();
+ setSizes( spring3, 0, 10, 100 );
+ column.add( spring3 );
+
+ m_TextArea = createTextArea();
+ column.add( m_TextArea );
+ final JPanel spring4 = new JPanel();
+ setSizes( spring4, 0, 10, 100 );
+ column.add( spring4 );
+
+ m_FinishButton = createFinishButton();
+ column.add( m_FinishButton );
+
+ final JPanel spring5 = new JPanel();
+ setSizes( spring5, 0, 10, 100 );
+ column.add( spring5 );
+
+ m_ProgressWindow.pack();
+ m_ProgressWindow.setVisible( true );
+ }
+
+ public void actionPerformed( ActionEvent event )
+ {
+ System.out.println( event.toString() );
+ }
+
+ public void start()
+ throws Exception
+ {
+ ProgressIndicator indicator = new SwingProgress();
+ Worker w = Main.createWorker( indicator );
+ w.start();
+ m_FinishButton.setEnabled( true );
+ }
+
+ private void setSizes( JPanel panel, int min, int pref, int max )
+ {
+ Dimension minDim = new Dimension( min, min );
+ panel.setMinimumSize( minDim );
+ Dimension prefDim = new Dimension( pref, pref );
+ panel.setPreferredSize( prefDim );
+ Dimension maxDim = new Dimension( max, max );
+ panel.setMaximumSize( maxDim );
+ }
+
+ private JProgressBar createProgressBar()
+ {
+ final Dimension minDim = new Dimension( 50, 10 );
+ final Dimension prefDim = new Dimension( 300, 25 );
+ final Dimension maxDim = new Dimension( 1200, 50 );
+ JProgressBar bar = new JProgressBar();
+ bar.setStringPainted( true );
+ bar.setMinimumSize( minDim );
+ bar.setPreferredSize( prefDim );
+ bar.setMaximumSize( maxDim );
+ bar.setMinimum( 0 );
+ bar.setMaximum( 100 );
+ return bar;
+ }
+
+ private JTextArea createTextArea()
+ {
+ final Dimension minDim = new Dimension( 50, 50 );
+ final Dimension prefDim = new Dimension( 300, 300 );
+ final Dimension maxDim = new Dimension( 1200, 1000 );
+ JTextArea area = new JTextArea();
+ area.setMinimumSize( minDim );
+ area.setPreferredSize( prefDim );
+ area.setMaximumSize( maxDim );
+ return area;
+ }
+
+ private JButton createFinishButton()
+ {
+ final Dimension minDim = new Dimension( 20, 20 );
+ final Dimension prefDim = new Dimension( 50, 30 );
+ final Dimension maxDim = new Dimension( 100, 40 );
+ JButton button = new JButton( "Finish" );
+ button.setMinimumSize( minDim );
+ button.setPreferredSize( prefDim );
+ button.setMaximumSize( maxDim );
+ button.setEnabled( false );
+ button.addActionListener( this );
+ return button;
+ }
+
+ public class SwingProgress
+ implements ProgressIndicator
+ {
+ public void message( String message )
+ {
+ m_TextArea.append( message );
+ m_TextArea.append( "\n" );
+ }
+
+ public void error( String message )
+ {
+ m_TextArea.append( "Error: " + message );
+ m_TextArea.append( "\n" );
+ }
+
+ public void start()
+ {
+ }
+
+ public void progress( int percentage )
+ {
+ m_ProgressBar.setValue( percentage );
+ m_ProgressBar.setString( percentage + "%" );
+ }
+
+ public void finished()
+ {
+ }
+ }
+}
+
+

Added:
development/main/transit/installer/src/main/net/dpml/transit/installer/Unzip.java
==============================================================================
--- (empty file)
+++
development/main/transit/installer/src/main/net/dpml/transit/installer/Unzip.java
Mon Jan 10 13:06:44 2005
@@ -0,0 +1 @@
+

Added:
development/main/transit/installer/src/main/net/dpml/transit/installer/Worker.java
==============================================================================
--- (empty file)
+++
development/main/transit/installer/src/main/net/dpml/transit/installer/Worker.java
Mon Jan 10 13:06:44 2005
@@ -0,0 +1,218 @@
+/*
+ * Copyright 2004-2005 Niclas Hedhman
+ *
+ * Licensed 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 net.dpml.transit.installer;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import java.net.URL;
+import java.net.URLConnection;
+
+import java.util.Enumeration;
+
+import java.util.jar.JarFile;
+import java.util.jar.JarEntry;
+
+public class Worker
+{
+ private static final int BUFFER_SIZE = 10000;
+
+ private File m_DpmlHome;
+ private File m_AntLibDir;
+ private File m_DevDir;
+
+ private ProgressIndicator m_Progress;
+ private int m_ProgressSize;
+
+ public Worker( ProgressIndicator indicator,
+ File dpmlHome, File antLib, File devDir )
+ {
+ m_DpmlHome = dpmlHome;
+ m_AntLibDir = antLib;
+ m_Progress = indicator;
+ m_DevDir = devDir;
+ }
+
+ public void start()
+ throws Exception
+ {
+ m_Progress.message( "Creating DPML Home." );
+ if( ! m_DpmlHome.exists() )
+ m_DpmlHome.mkdirs();
+ m_Progress.message( "Creating Ant plugin library." );
+ if( ! m_AntLibDir.exists() )
+ m_AntLibDir.mkdirs();
+ InputStream dpml = getClass().getClassLoader().getResourceAsStream(
"dpml.jar" );
+ if( dpml == null )
+ {
+ System.err.println( "The install bundle is corrupt. Please
download it from http://www.dpml.net again." );
+ System.exit(1);
+ }
+ File tmp = File.createTempFile( "install", ".tmp", m_DpmlHome );
+ tmp.deleteOnExit();
+ FileOutputStream fos = new FileOutputStream( tmp );
+ copy( dpml, fos, false );
+ unjar( tmp, m_DpmlHome );
+ tmp.delete();
+
+ InputStream antLib =
getClass().getClassLoader().getResourceAsStream( "antlib.jar" );
+ if( antLib == null )
+ {
+ System.err.println( "The install bundle is corrupt. Please
download it from http://www.dpml.net again." );
+ System.exit(2);
+ }
+ tmp = File.createTempFile( "install", ".tmp", m_AntLibDir );
+ tmp.deleteOnExit();
+ fos = new FileOutputStream( tmp );
+ copy( antLib, fos, false );
+ unjar( tmp, m_AntLibDir );
+ tmp.delete();
+
+ createPath();
+
+ InputStream readme =
getClass().getClassLoader().getResourceAsStream( "README.txt" );
+ if( readme != null )
+ copy( readme, System.out, false );
+ }
+
+ private void unjar( File jarFile, File toDir )
+ throws IOException
+ {
+ m_Progress.message( "Unjaring " + jarFile );
+ m_Progress.start();
+ JarFile jar = new JarFile( jarFile );
+ Enumeration entries = jar.entries();
+ for( int counter=0; entries.hasMoreElements() ; counter++ )
+ {
+ JarEntry entry = (JarEntry) entries.nextElement();
+ String name = entry.getName();
+ File dest = new File( toDir, name );
+ if( entry.isDirectory() )
+ {
+ dest.mkdirs();
+ }
+ // Do not extract the META-INF directory....
+ else if( dest.toString().indexOf( "META-INF/" ) < 0 )
+ {
+ InputStream in = jar.getInputStream( entry );
+ FileOutputStream out = new FileOutputStream( dest );
+ m_ProgressSize = (int) entry.getSize();
+ copy( in, out, true );
+ in.close();
+ out.close();
+ }
+ }
+ m_Progress.finished();
+ }
+
+ private void copy( InputStream from, OutputStream to, boolean report )
+ throws IOException
+ {
+ BufferedOutputStream out = new BufferedOutputStream( to );
+ BufferedInputStream in = new BufferedInputStream( from, BUFFER_SIZE
);
+ int bytesRead = 0;
+ int counter = 0;
+ do
+ {
+ byte[] data = new byte[ BUFFER_SIZE ];
+ bytesRead = in.read( data, 0, BUFFER_SIZE );
+ counter = counter + bytesRead;
+ if( m_ProgressSize > 0 && report )
+ {
+ m_Progress.progress( ( counter * 100 ) / m_ProgressSize );
+ }
+ if( bytesRead != -1 )
+ out.write( data, 0, bytesRead );
+ } while( bytesRead != -1 );
+ out.flush();
+ }
+
+ private void createPath()
+ {
+ String os = System.getProperty( "os.name" ).toLowerCase();
+ if( os.indexOf( "win" ) >= 0 )
+ createPathInWindows();
+ createPathInNix();
+ }
+
+ private void createPathInNix()
+ {
+
+ }
+
+ private void createPathInWindows()
+ {
+ }
+
+/* Not used. Future?
+ private void copy( File file, File toDir )
+ throws IOException
+ {
+ m_Progress.message( "Copying " + file + " to " + file );
+ m_Progress.start();
+ toDir.mkdirs();
+ String name = file.getName();
+ File destFile = new File( toDir, name );
+
+ FileInputStream in = new FileInputStream( file );
+ FileOutputStream out = new FileOutputStream( destFile );
+
+ m_ProgressSize = file.length();
+ copy( in, out );
+
+ in.close();
+ out.close();
+ m_Progress.finished();
+ }
+*/
+/* Future use
+ private File download( String url )
+ throws IOException
+ {
+ URL download = new URL( url );
+ m_Progress.message( "Connecting to " + download.getHost() );
+
+ URLConnection conn = download.openConnection();
+ conn.connect();
+ m_ProgressSize = conn.getContentLength();
+
+ m_Progress.message( "Downloading " + url );
+ m_Progress.start();
+ InputStream in = conn.getInputStream();
+
+ File tmp = File.createTempFile( "magic", null );
+ tmp.deleteOnExit();
+
+ FileOutputStream out = new FileOutputStream( tmp );
+
+ copy( in, out );
+ in.close();
+ out.close();
+ m_Progress.finished();
+ return tmp;
+ }
+*/
+
+}



  • svn commit: r1436 - in development/main/transit: . installer installer/src installer/src/main installer/src/main/net installer/src/main/net/dpml installer/src/main/net/dpml/transit installer/src/main/net/dpml/transit/installer, niclas, 01/10/2005

Archive powered by MHonArc 2.6.24.

Top of Page