public class MacInputStream
extends java.io.FilterInputStream
Constructor and Description |
---|
MacInputStream(java.io.InputStream in,
IMac mac)
Creates a new MacInputStream.
|
Modifier and Type | Method and Description |
---|---|
IMac |
getMac()
Returns the MAC this stream is updating.
|
void |
on(boolean flag)
Turns the digesting state on or off.
|
int |
read() |
int |
read(byte[] buf,
int off,
int len) |
void |
setMac(IMac mac)
Sets the MAC this stream is updating, which must have already been
initialized.
|
public MacInputStream(java.io.InputStream in, IMac mac)
in
- The underlying input stream.mac
- The mac instance to use.public IMac getMac()
public void setMac(IMac mac)
mac
- The new MAC.java.lang.NullPointerException
- If the argument is null.public void on(boolean flag)
flag
- The new digesting state.public int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] buf, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
Copyright © 2025. All rights reserved.