protected synchronized void copy ( Writable other ) { if ( other != null ) { try { DataOutputBuffer out = new DataOutputBuffer ( ) ; other . write ( out ) ; DataInputBuffer in = new DataInputBuffer ( ) ; in . reset ( out . getData ( ) , out . getLength ( ) ) ; readFields ( in ) ; } catch ( IOException e ) { throw new IllegalArgumentException ( "map cannot be copied: " + e . getMessage ( ) ) ; } } else { throw new IllegalArgumentException ( "source map cannot be null" ) ; } }
Used by child copy constructors .