Code example for InputStream

Methods: mark

0
	public static InputStream openInPackage(String path)
	{ 
		try { 
			//Log.d(TAG, "Open " + path + "..."); 
			InputStream is = am.open(path, AssetManager.ACCESS_RANDOM);
			is.mark(MAX_SIZE);
			return is;
		} 
		catch (IOException e) {
			Log.e(TAG, e.getMessage());
			return null; 
		} 
	} 
	 
	public static void close(InputStream is)
	{ 
		try { 
			if (is == null)
				return; 
			is.close();
		}