javapns/src/main/java/javapns/communication/KeystoreManager.java
/**
	 * Given an object representing a keystore, returns an actual stream for that keystore.
	 * Allows you to provide an actual keystore as an InputStream or a byte[] array,
	 * or a reference to a keystore file as a File object or a String path.
	 * 
	 * 
	 * @param keystore InputStream, File, byte[] or String (as a file path)
	 * @return A stream to the keystore.
	 * @throws FileNotFoundException
	 */
Given an object representing a keystore, returns an actual stream for that keystore.
Allows you to provide an actual keystore as an InputStream or a byte[] array,
or a reference to a keystore file as a File object or a String path.

@param keystore InputStream, File, byte[] or String (as a file path)
@return A stream to the keystore.
Given an object representing a keystore returns an actual stream for that keystore . Allows you to provide an actual keystore as an InputStream or a byte [] array or a reference to a keystore file as a File object or a String path . @param keystore InputStream File byte [] or String ( as a file path ) @return A stream to the keystore .
public static InputStream streamKeystore(Object keystore) throws FileNotFoundException {
		if (keystore instanceof InputStream) return (InputStream) keystore;
		else if (keystore instanceof File) return new BufferedInputStream(new FileInputStream((File) keystore));
		else if (keystore instanceof String) return new BufferedInputStream(new FileInputStream((String) keystore));
		else if (keystore instanceof byte[]) return new ByteArrayInputStream((byte[]) keystore);
		else throw new IllegalArgumentException("Unsupported keystore reference: " + keystore);
	}
public static InputStream streamKeystore ( Object keystore ) throws FileNotFoundException { if ( keystore instanceof InputStream ) return ( InputStream ) keystore ; else if ( keystore instanceof File ) return new BufferedInputStream ( new FileInputStream ( ( File ) keystore ) ) ; else if ( keystore instanceof String ) return new BufferedInputStream ( new FileInputStream ( ( String ) keystore ) ) ; else if ( keystore instanceof byte [ ] ) return new ByteArrayInputStream ( ( byte [ ] ) keystore ) ; else throw new IllegalArgumentException ( "Unsupported keystore reference: " + keystore ) ; }
Given an object representing a keystore, returns an actual stream for that keystore.
Given an object representing a keystore returns an actual stream for that keystore .