Brad Wood

Greenhorn
+ Follow
since Oct 01, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
4
Given in last 30 days
4
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Brad Wood

Hey guys. It's me again. So they told me today that I shouldn't have used XMLEncoder/XMLDecoder. It wasn't allowed. Dave Tolls was right. But they gave me some time to come up with another solution. Looks like I have to use reflection for this task. The problem is that I'm fairly new to Java and don't have experience with dealing with reflection whatsoever. So could you guys give me a piece of advice on this? How can this be done? Should I use the ClassLoader? I'd really be grateful for you help. guys.
1 week ago
Hey guys. It's me again. Thank you so much for your replies. I really appreciate it. Looks like I've managed to come up with a solution. Here's a link to GitHub: https://github.com/Ashmor00/JavaBeansSerialization2

I'd be really grateful for your feedback guys.
2 weeks ago

Tim Moores wrote:Welcome to the Ranch.

You could use java.beans.XMLEncoder and XMLDecoder for encoding/decoding, and convert to and from byte[] using java.util.Base64.


Thanks! I'm gonna try it.

Dave Tolls wrote:Why the restrictions?


I was applying for a job and they gave me this assignment. Guess depending on how well I'll tackle this problem, they'll be deciding whether to give me a job or not.
2 weeks ago
Hey guys. How's everybody doing? Hope y'all doing fine. I'm fairly new to Java and I've got a bit of a problem here. Is it possible to serialize JavaBeans to byte array without implementing Serializable? I was given a task to write a class that serializes and deserializes JavaBeans without using JSON, Protobuf, Java serialization API, and other serializations. I'm obliged to implement this interface instead:



Could you guys give me a piece of advice on how this can be done?
Thanks for your time.
2 weeks ago