1 21 22 27 28 package com.sun.mail.imap.protocol; 29 30 import java.io.ByteArrayInputStream ; 31 import com.sun.mail.iap.*; 32 import com.sun.mail.util.ASCIIUtility; 33 34 40 41 public class RFC822DATA implements Item { 42 43 public static char [] name = {'R','F','C','8','2','2'}; 44 public int msgno; 45 public ByteArray data; 46 47 51 public RFC822DATA(FetchResponse r) throws ParsingException { 52 msgno = r.getNumber(); 53 r.skipSpaces(); 54 data = r.readByteArray(); 55 } 56 57 public ByteArray getByteArray() { 58 return data; 59 } 60 61 public ByteArrayInputStream getByteArrayInputStream() { 62 if (data != null) 63 return data.toByteArrayInputStream(); 64 else 65 return null; 66 } 67 } 68 | Popular Tags |