mirror of
				https://gitee.com/BDWare/common
				synced 2025-10-31 04:42:17 +00:00 
			
		
		
		
	add write boolean to util
This commit is contained in:
		
							parent
							
								
									488fbb4a63
								
							
						
					
					
						commit
						821add2a62
					
				| @ -80,6 +80,14 @@ public class ByteUtil { | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     public static boolean readBoolean(ByteArrayInputStream bi) { | ||||
|         return bi.read() == 0x01; | ||||
|     } | ||||
| 
 | ||||
|     public static void writeBoolean(ByteArrayOutputStream bo, boolean b) { | ||||
|         bo.write(b ? 0x01 : 0x00); | ||||
|     } | ||||
| 
 | ||||
|     public static byte[] readBytes(ByteArrayInputStream bi, int len) { | ||||
|         byte[] ret = new byte[len]; | ||||
|         bi.read(ret, 0, len); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user