Code example for OptionalDataException

Methods: printStackTrace

0
		public Object recieveObject(){
			Object o = null;
			try { 
				o = inStream.readObject();
			} catch (OptionalDataException e) {
				e.printStackTrace();
			} catch (ClassNotFoundException e) {
				e.printStackTrace();
			} catch (IOException e) {
				e.printStackTrace();
			} 
			return o;
		} 
		public void sendObject(Object o)
		{ 
				try { 
					outStream.writeObject(o);
				} catch (IOException e) {
					// TODO Auto-generated catch block 
					e.printStackTrace();
Stop searching for code, let great code find you!  Add Codota to your java IDE