Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. public void broadcast (String msg){
  2. synchronized(hm){
  3. Collection<PrintWriter> collection = hm.values();
  4. Iterator<PrintWriter> iter = collection.iterator();
  5. while(iter.hasNext()) { PrintWriter pw = iter.next(); pw.println(msg);
  6. pw.flush(); }
  7. }
  8. }
  9.  
  10. `public void broadcastImg (Bitmap bitmap){
  11. synchronized(hmA){
  12. Collection<Bitmap> collection = hmA.values();
  13. Iterator<Bitmap> iter = collection.iterator();
  14. while(iter.hasNext()) {
  15. Bitmap bw = iter.next(); imgv.setImageBitmap(bitmap);
  16. }
  17. }
  18. }`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement