Top Fields Constructors Methods
org.bouncycastle.bcpg

pack-priv Class StreamUtil

extends Object
Class Inheritance
Imports
java.io.ByteArrayInputStream, .FileInputStream, .IOException, .InputStream, .OutputStream, java.nio.channels.FileChannel, org.bouncycastle.util.Arrays

Field Summary

Modifier and TypeField and Description
pack-priv static int
pack-priv static int
pack-priv static int
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static int

Returns:

length calculation or MAX_VALUE.
findLimit
(InputStream
input stream of interest
in
)

Find out possible longest length, capped by available memory.

pack-priv static int
pack-priv static int
pack-priv static long
pack-priv static int
readBodyLen(InputStream in, boolean[] flags)

Note

flags is an array of three boolean values: flags[0] indicates l is negative, flag for eof flags[1] indicates (is)longLength = true flags[2] indicate partial = true

pack-priv static long
pack-priv static long
pack-priv static long
pack-priv static void
pack-priv static void
pack-priv static void
pack-priv static void
writeBodyLen(OutputStream out, long bodyLen)

pack-priv static void
writeKeyID(BCPGOutputStream pOut, long keyID)

pack-priv static void
pack-priv static void
writeSeconds(BCPGOutputStream pOut, long time)

pack-priv static void
writeTime(BCPGOutputStream pOut, long time)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

flag_eofback to summary
pack-priv static int flag_eof
flag_isLongLengthback to summary
pack-priv static int flag_isLongLength
flag_partialback to summary
pack-priv static int flag_partial
MAX_MEMORYback to summary
private static final long MAX_MEMORY

Constructor Detail

StreamUtilback to summary
pack-priv StreamUtil()

Method Detail

findLimitback to summary
pack-priv static int findLimit(InputStream in)

Find out possible longest length, capped by available memory.

Parameters
in:InputStream

input stream of interest

Returns:int

length calculation or MAX_VALUE.

read2OctetLengthback to summary
pack-priv static int read2OctetLength(InputStream in) throws IOException
read4OctetLengthback to summary
pack-priv static int read4OctetLength(InputStream in) throws IOException
read8OctetLengthback to summary
pack-priv static long read8OctetLength(InputStream in) throws IOException
readBodyLenback to summary
pack-priv static int readBodyLen(InputStream in, boolean[] flags) throws IOException

Note

flags is an array of three boolean values: flags[0] indicates l is negative, flag for eof flags[1] indicates (is)longLength = true flags[2] indicate partial = true

readKeyIDback to summary
pack-priv static long readKeyID(BCPGInputStream in) throws IOException
readSecondsback to summary
pack-priv static long readSeconds(BCPGInputStream in) throws IOException
readTimeback to summary
pack-priv static long readTime(BCPGInputStream in) throws IOException
write2OctetLengthback to summary
pack-priv static void write2OctetLength(OutputStream pOut, int len) throws IOException
write4OctetLengthback to summary
pack-priv static void write4OctetLength(OutputStream pOut, int len) throws IOException
write8OctetLengthback to summary
pack-priv static void write8OctetLength(OutputStream pOut, long len) throws IOException
writeBodyLenback to summary
pack-priv static void writeBodyLen(OutputStream out, long bodyLen) throws IOException
writeKeyIDback to summary
pack-priv static void writeKeyID(BCPGOutputStream pOut, long keyID) throws IOException
writeNewPacketLengthback to summary
pack-priv static void writeNewPacketLength(OutputStream out, long bodyLen) throws IOException
writeSecondsback to summary
pack-priv static void writeSeconds(BCPGOutputStream pOut, long time) throws IOException
writeTimeback to summary
pack-priv static void writeTime(BCPGOutputStream pOut, long time) throws IOException