Search in sources :

Example 1 with Literal

use of com.zimbra.cs.imap.Literal in project zm-mailbox by Zimbra.

the class ImapCommandThrottleTest method makeAppendPart.

private Part makeAppendPart(AppendMessage append, int size, byte fillByte) throws IOException {
    Literal literal = Literal.newInstance(size);
    byte[] bytes = new byte[size];
    Arrays.fill(bytes, fillByte);
    literal.put(bytes, 0, bytes.length);
    return append.new Part(literal);
}
Also used : Part(com.zimbra.cs.imap.AppendMessage.Part) Literal(com.zimbra.cs.imap.Literal)

Aggregations

Part (com.zimbra.cs.imap.AppendMessage.Part)1 Literal (com.zimbra.cs.imap.Literal)1