public static List < DomainControllerData > domainControllerDataFromByteBuffer ( byte [ ] buffer ) throws Exception { List < DomainControllerData > retval = new ArrayList < DomainControllerData > ( ) ; if ( buffer == null ) { return retval ; } ByteArrayInputStream in_stream = new ByteArrayInputStream ( buffer ) ; DataInputStream in = new DataInputStream ( in_stream ) ; String content = SEPARATOR ; while ( SEPARATOR . equals ( content ) ) { DomainControllerData data = new DomainControllerData ( ) ; data . readFrom ( in ) ; retval . add ( data ) ; try { content = readString ( in ) ; } catch ( EOFException ex ) { content = null ; } } in . close ( ) ; return retval ; }
Get the domain controller data from the given byte buffer .