~brian-thomason/+junk/bouncycastle

« back to all changes in this revision

Viewing changes to src/org/bouncycastle/bcpg/MarkerPacket.java

  • Committer: Brian Thomason
  • Date: 2011-12-20 17:20:32 UTC
  • Revision ID: brian.thomason@canonical.com-20111220172032-rdtm13jgdxtksacr
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.bouncycastle.bcpg;
 
2
 
 
3
import java.io.IOException;
 
4
 
 
5
/**
 
6
 * Basic type for a marker packet
 
7
 */
 
8
public class MarkerPacket 
 
9
    extends ContainedPacket
 
10
{    
 
11
    // "PGP"
 
12
        
 
13
    byte[]    marker = { (byte)0x50, (byte)0x47, (byte)0x50 };
 
14
    
 
15
    public MarkerPacket(
 
16
        BCPGInputStream  in)
 
17
        throws IOException
 
18
    {
 
19
         in.readFully(marker);
 
20
    }
 
21
    
 
22
    public void encode(
 
23
        BCPGOutputStream    out)
 
24
        throws IOException
 
25
    {
 
26
        out.writePacket(MARKER, marker, true);
 
27
    }
 
28
}