jnetpcap includes the class PcapDumper which will write an array of bytes to a pcap file as documented here.
[note to original questioner: this answer was downvoted because i answered your question, and criticised others for closing a reasonable question, not because the answer is actually wrong in any way]