Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/sixlegs/image/png/Chunk_gIFx.java


1   // Copyright (C) 1998, 1999, 2001 Chris Nokleberg
2   // Please see included LICENSE.TXT
3   
4   package com.sixlegs.image.png;
5   import java.io.IOException;
6   
7   final class Chunk_gIFx
8   extends Chunk
9   implements GifExtension
10  {
11      private String identifier;
12      private byte[] auth_code;
13      private byte[] data;
14      
15      Chunk_gIFx()
16      {
17          super(gIFx);
18      }
19  
20      protected void readData()
21      throws IOException
22      {
23          identifier = in_data.readString(8, PngImage.ASCII_ENCODING);
24          in_data.skip(8 - identifier.length());
25  
26          auth_code = new byte[3];
27          in_data.readFully(auth_code);
28          
29          data = new byte[bytesRemaining()];
30          in_data.readFully(data);
31  
32          img.data.gifExtensions.addElement(this);
33      }
34  
35      public String getIdentifier()
36      {
37          return identifier;
38      }
39  
40      public byte[] getAuthenticationCode()
41      {
42          return auth_code;
43      }
44  
45      public byte[] getData()
46      {
47          return data;
48      }
49  }