diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-11-14 23:55:29 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-11-14 23:55:29 +0000 |
commit | 63628550708a616c5c58bc5c707db1e7fd9cd7c2 (patch) | |
tree | b6b7d466db687ba360cd760245d1146e973863c0 /cs-dotnet/src/gatsinteger.cs | |
parent | 9d86cba840252b451c4b86d9ea16c821b6c97245 (diff) | |
download | libgats-63628550708a616c5c58bc5c707db1e7fd9cd7c2.tar.gz libgats-63628550708a616c5c58bc5c707db1e7fd9cd7c2.tar.bz2 libgats-63628550708a616c5c58bc5c707db1e7fd9cd7c2.tar.xz libgats-63628550708a616c5c58bc5c707db1e7fd9cd7c2.zip |
Strings, bools, and ints all seem fine, the more complex container types are
coming next, and will implement the full range of appropriate interfaces.
Diffstat (limited to '')
-rw-r--r-- | cs-dotnet/src/gatsinteger.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cs-dotnet/src/gatsinteger.cs b/cs-dotnet/src/gatsinteger.cs index cbb552e..9a9abbe 100644 --- a/cs-dotnet/src/gatsinteger.cs +++ b/cs-dotnet/src/gatsinteger.cs | |||
@@ -16,7 +16,7 @@ namespace Com.Xagasoft.Gats | |||
16 | return Value.ToString(); | 16 | return Value.ToString(); |
17 | } | 17 | } |
18 | 18 | ||
19 | public override void Read( Stream s, byte cType ) | 19 | public override void Read( Stream s, char cType ) |
20 | { | 20 | { |
21 | Value = ReadPackedInt( s ); | 21 | Value = ReadPackedInt( s ); |
22 | } | 22 | } |
@@ -35,7 +35,7 @@ namespace Com.Xagasoft.Gats | |||
35 | 35 | ||
36 | b = s.ReadByte(); | 36 | b = s.ReadByte(); |
37 | if( b == -1 ) | 37 | if( b == -1 ) |
38 | throw new GatsException("Premature end of stream encountered."); | 38 | throw new GatsException( GatsException.Type.PrematureEnd ); |
39 | bNeg = (b&0x40) == 0x40; | 39 | bNeg = (b&0x40) == 0x40; |
40 | rOut |= ((long)b)&0x3F; | 40 | rOut |= ((long)b)&0x3F; |
41 | int c = 0; | 41 | int c = 0; |
@@ -43,7 +43,7 @@ namespace Com.Xagasoft.Gats | |||
43 | { | 43 | { |
44 | b = s.ReadByte(); | 44 | b = s.ReadByte(); |
45 | if( b == -1 ) | 45 | if( b == -1 ) |
46 | throw new GatsException("Premature end of stream encountered."); | 46 | throw new GatsException( GatsException.Type.PrematureEnd ); |
47 | rOut |= (long)(b&0x7F) << (6+7*(c++)); | 47 | rOut |= (long)(b&0x7F) << (6+7*(c++)); |
48 | } | 48 | } |
49 | if( bNeg ) | 49 | if( bNeg ) |