X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=core%2Fsrc%2Fnet%2Fsf%2Fopenrocket%2Ffile%2FAbstractRocketLoader.java;h=f0c7464dfe4e985135a0152d176a00d4b044a132;hb=4095cb0dd61a75b7b6b0bd811f8e803af5b27919;hp=0cb19110aa38d7963e3dd71e981808a74a3a7143;hpb=09a5917c98f1140162c1de36d5cdbf22e8ac9c02;p=debian%2Fopenrocket diff --git a/core/src/net/sf/openrocket/file/AbstractRocketLoader.java b/core/src/net/sf/openrocket/file/AbstractRocketLoader.java index 0cb19110..f0c7464d 100644 --- a/core/src/net/sf/openrocket/file/AbstractRocketLoader.java +++ b/core/src/net/sf/openrocket/file/AbstractRocketLoader.java @@ -19,14 +19,14 @@ public abstract class AbstractRocketLoader implements RocketLoader { * Loads a rocket from the specified File object. */ @Override - public final OpenRocketDocument load(File source) throws RocketLoadException { + public final OpenRocketDocument load(File source, MotorFinder motorFinder) throws RocketLoadException { warnings.clear(); InputStream stream = null; try { stream = new BufferedInputStream(new FileInputStream(source)); - return load(stream); + return load(stream, motorFinder); } catch (FileNotFoundException e) { throw new RocketLoadException("File not found: " + source); @@ -45,11 +45,11 @@ public abstract class AbstractRocketLoader implements RocketLoader { * Loads a rocket from the specified InputStream. */ @Override - public final OpenRocketDocument load(InputStream source) throws RocketLoadException { + public final OpenRocketDocument load(InputStream source, MotorFinder motorFinder) throws RocketLoadException { warnings.clear(); try { - return loadFromStream(source); + return loadFromStream(source, motorFinder); } catch (RocketLoadException e) { throw e; } catch (IOException e) { @@ -60,12 +60,12 @@ public abstract class AbstractRocketLoader implements RocketLoader { /** - * This method is called by the default implementations of {@link #load(File)} - * and {@link #load(InputStream)} to load the rocket. + * This method is called by the default implementations of #load(File) + * and load(InputStream) to load the rocket. * * @throws RocketLoadException if an error occurs during loading. */ - protected abstract OpenRocketDocument loadFromStream(InputStream source) throws IOException, + protected abstract OpenRocketDocument loadFromStream(InputStream source, MotorFinder motorFinder) throws IOException, RocketLoadException;