mirror of
https://github.com/samsonjs/media.git
synced 2026-04-18 13:25:47 +00:00
Update AssetDataSource.java
This commit is contained in:
parent
647d9bedb8
commit
a43dd6ba68
1 changed files with 3 additions and 4 deletions
|
|
@ -61,7 +61,7 @@ public final class AssetDataSource implements DataSource {
|
|||
* @param listener An optional listener. Specify {@code null} for no listener.
|
||||
*/
|
||||
public AssetDataSource(AssetManager assetManager, TransferListener listener) {
|
||||
this.assetManager = assetManager;
|
||||
this.assetManager = assetManager;
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
|
|
@ -105,19 +105,18 @@ public final class AssetDataSource implements DataSource {
|
|||
listener.onBytesTransferred(bytesRead);
|
||||
}
|
||||
}
|
||||
Log.i("AssetDataSource", "read(). bytesRead = " + bytesRead);
|
||||
|
||||
return bytesRead;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws FileDataSourceException {
|
||||
public void close() throws AssetDataSourceException {
|
||||
if (assetInputStream != null) {
|
||||
try {
|
||||
assetInputStream.close();
|
||||
} catch (IOException e) {
|
||||
throw new FileDataSourceException(e);
|
||||
throw new AssetDataSourceException(e);
|
||||
} finally {
|
||||
assetInputStream = null;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue