~ubuntu-branches/ubuntu/jaunty/beagle/jaunty-security

« back to all changes in this revision

Viewing changes to Util/F-Spot/Imaging/OrderedWriter.cs

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Ebner
  • Date: 2008-05-04 00:31:32 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20080504003132-2tkm5o8moo5952ri
Tags: 0.3.7-2ubuntu1
 * Merge from Debian unstable. (LP: #225746) Remaining Ubuntu changes:
  - debian/control:
    + Rename ice{weasel,dove}-beagle to {mozilla,thunderbird}-beagle and
      and update the dependencies accordingly.
    + Change Maintainer to Ubuntu Mono Team.
  - debian/rules:
    + Install the mozilla-beagle and thunderbird-beagle extensions.
  - ice{dove,weasel}.dirs:
    + Renamed to {mozilla,thunderbird}-beagle.dirs.
    + Fixed paths to point to usr/lib/{firefox,thunderbird}

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
using System.IO;
 
2
 
 
3
namespace FSpot {
 
4
        public class OrderedWriter {
 
5
                Stream stream;
 
6
                bool is_little;
 
7
 
 
8
                public Stream Stream {
 
9
                        get { return stream; }
 
10
                }
 
11
 
 
12
                public OrderedWriter (Stream stream, bool is_little)
 
13
                {
 
14
                        this.stream = stream;
 
15
                        this.is_little = is_little;
 
16
                }
 
17
 
 
18
                public void Write (byte b)
 
19
                {
 
20
                        stream.WriteByte (b);
 
21
                }
 
22
 
 
23
                public void Write (uint val)
 
24
                {
 
25
                        byte [] value = FSpot.BitConverter.GetBytes (val, is_little);
 
26
                        stream.Write (value, 0, value.Length);
 
27
                }
 
28
 
 
29
                public void Write (ushort val)
 
30
                {
 
31
                        byte [] value = FSpot.BitConverter.GetBytes (val, is_little);
 
32
                        stream.Write (value, 0, value.Length);
 
33
                }
 
34
        }
 
35
}