Refactoring: removing unnecessary asset manager from BlenderInputStream constructor (the manager was never used).

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10377 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Kae..pl 12 years ago
parent 629d1caba7
commit 21dc62e293
  1. 2
      engine/src/blender/com/jme3/scene/plugins/blender/BlenderLoader.java
  2. 16
      engine/src/blender/com/jme3/scene/plugins/blender/file/BlenderInputStream.java

@ -183,7 +183,7 @@ public class BlenderLoader extends AbstractBlenderLoader {
} }
// opening stream // opening stream
BlenderInputStream inputStream = new BlenderInputStream(assetInfo.openStream(), assetInfo.getManager()); BlenderInputStream inputStream = new BlenderInputStream(assetInfo.openStream());
// reading blocks // reading blocks
blocks = new ArrayList<FileBlockHeader>(); blocks = new ArrayList<FileBlockHeader>();

@ -38,7 +38,6 @@ import java.io.InputStream;
import java.util.logging.Logger; import java.util.logging.Logger;
import java.util.zip.GZIPInputStream; import java.util.zip.GZIPInputStream;
import com.jme3.asset.AssetManager;
import com.jme3.scene.plugins.blender.exceptions.BlenderFileException; import com.jme3.scene.plugins.blender.exceptions.BlenderFileException;
/** /**
@ -50,8 +49,6 @@ public class BlenderInputStream extends InputStream {
private static final Logger LOGGER = Logger.getLogger(BlenderInputStream.class.getName()); private static final Logger LOGGER = Logger.getLogger(BlenderInputStream.class.getName());
/** The default size of the blender buffer. */ /** The default size of the blender buffer. */
private static final int DEFAULT_BUFFER_SIZE = 1048576; //1MB private static final int DEFAULT_BUFFER_SIZE = 1048576; //1MB
/** The application's asset manager. */
private AssetManager assetManager;
/** /**
* Size of a pointer; all pointers in the file are stored in this format. '_' means 4 bytes and '-' means 8 bytes. * Size of a pointer; all pointers in the file are stored in this format. '_' means 4 bytes and '-' means 8 bytes.
*/ */
@ -73,13 +70,10 @@ public class BlenderInputStream extends InputStream {
* Constructor. The input stream is stored and used to read data. * Constructor. The input stream is stored and used to read data.
* @param inputStream * @param inputStream
* the stream we read data from * the stream we read data from
* @param assetManager
* the application's asset manager
* @throws BlenderFileException * @throws BlenderFileException
* this exception is thrown if the file header has some invalid data * this exception is thrown if the file header has some invalid data
*/ */
public BlenderInputStream(InputStream inputStream, AssetManager assetManager) throws BlenderFileException { public BlenderInputStream(InputStream inputStream) throws BlenderFileException {
this.assetManager = assetManager;
//the size value will canche while reading the file; the available() method cannot be counted on //the size value will canche while reading the file; the available() method cannot be counted on
try { try {
size = inputStream.available(); size = inputStream.available();
@ -355,14 +349,6 @@ public class BlenderInputStream extends InputStream {
return pointerSize; return pointerSize;
} }
/**
* This method returns the application's asset manager.
* @return the application's asset manager
*/
public AssetManager getAssetManager() {
return assetManager;
}
/** /**
* This method aligns cursor position forward to a given amount of bytes. * This method aligns cursor position forward to a given amount of bytes.
* @param bytesAmount * @param bytesAmount

Loading…
Cancel
Save