Code example for SSLSocket

Methods: getInputStream, getOutputStream, isClosed

0
			// TODO Auto-generated catch block 
			e1.printStackTrace();
		}		 
		Log.v(TAG, "Getting Socket");
		SSLSocket aSock = sslSF.getSSLSocket();
		if (aSock.isClosed())
			aSock = sslSF.createSSLSocket(this.getActivity());
		try 
		{ 
			Log.v(TAG, "Sending Size");
			OutputStream aOS = aSock.getOutputStream();
			aOS.write(aPBReq.getSerializedSize());
			byte[] vbuf = aPBReq.toByteArray();
			//aPBReq.writeTo(aOS); 
			Log.v(TAG, "Sending Payload");
			aOS.write(vbuf);
			InputStream aIS = aSock.getInputStream();
			vbuf = new byte[1];
			Log.v(TAG, "Receiving Payload");
			aIS.read(vbuf);
			vbuf = new byte[vbuf[0]];
			Log.v(TAG, "Parsing Payload");