classMethodsCount <- get
classMethods <- replicateM (fromIntegral classMethodsCount) get
asCount <- get
- as <- replicateM (fromIntegral $ asCount - 1) get
+ as <- replicateM (fromIntegral $ asCount) get
return $ ClassFile magic minor major poolsize pool af this super
interfacesCount ifaces classFieldsCount classFields classMethodsCount classMethods asCount as
return (c: next)
else return []
+putString :: String -> Put
+putString str = forM_ str put
+
instance Binary FieldType where
put SignedByte = put 'B'
put CharByte = put 'C'
put LongInt = put 'J'
put ShortInt = put 'S'
put BoolType = put 'Z'
- put (ObjectType name) = put 'L' >> put name
+ put (ObjectType name) = put 'L' >> putString name >> put ';'
put (Array Nothing sig) = put '[' >> put sig
put (Array (Just n) sig) = put '[' >> put (show n) >> put sig
value <- getLazyByteString (fromIntegral len)
return $ AttributeInfo name len value
-