samples/delegatingwriter/test/org/apidesign/delegatingwriter/CryptoWriter.java
changeset 133 50bf1b976c0d
parent 63 cbba5b31d11c
child 152 eb6f29070331
     1.1 --- a/samples/delegatingwriter/test/org/apidesign/delegatingwriter/CryptoWriter.java	Sat Jun 14 09:53:04 2008 +0200
     1.2 +++ b/samples/delegatingwriter/test/org/apidesign/delegatingwriter/CryptoWriter.java	Sat Jun 14 09:56:16 2008 +0200
     1.3 @@ -13,7 +13,9 @@
     1.4      public CryptoWriter(Writer out) {
     1.5          super(out);
     1.6      }
     1.7 -    public CryptoWriter(Writer out, AltBufferedWriter.Behaviour behaviour) {
     1.8 +    public CryptoWriter(
     1.9 +        Writer out, AltBufferedWriter.Behaviour behaviour
    1.10 +    ) {
    1.11          super(out, behaviour);
    1.12      }
    1.13  /* The above code is here to let us simulate different behaviours of the append
    1.14 @@ -24,15 +26,15 @@
    1.15          super(out);
    1.16      }
    1.17      
    1.18 -    /* We need to override all known methods of BufferedWriter and do conversion
    1.19 -    * of the argument char, string or char array.
    1.20 +    /* We need to override all known methods of BufferedWriter 
    1.21 +    * and do conversion of the argument char, string or char array.
    1.22      */
    1.23      
    1.24      @Override
    1.25 -    public void write(char[] cbuf, int off, int len) throws IOException {
    1.26 +    public void write(char[] buf, int off, int len) throws IOException {
    1.27          char[] arr = new char[len];
    1.28          for (int i = 0; i < len; i++) {
    1.29 -            arr[i] = convertChar(cbuf[off + i]);
    1.30 +            arr[i] = convertChar(buf[off + i]);
    1.31          }
    1.32          super.write(arr, 0, len);
    1.33      }