commit 9dacccd1d57fdb99838ef706de1530b1ac13d56d Author: 孙源 <12802056+sy20000123@user.noreply.gitee.com> Date: Fri Jul 11 14:12:47 2025 +0800 上传 diff --git a/BLL/BLL.csproj b/BLL/BLL.csproj new file mode 100644 index 0000000..553d685 --- /dev/null +++ b/BLL/BLL.csproj @@ -0,0 +1,59 @@ + + + + + Debug + AnyCPU + {02A200E7-551A-4DD7-B23A-AFAA9DBECF81} + Library + Properties + BLL + BLL + v4.5.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + {5A80DE64-FCD5-4D7C-8A1E-4199412D80BD} + Model + + + {cc8994b7-1312-45e6-abda-92413692feb3} + Tool + + + + \ No newline at end of file diff --git a/BLL/CheckBLL.cs b/BLL/CheckBLL.cs new file mode 100644 index 0000000..46484c1 --- /dev/null +++ b/BLL/CheckBLL.cs @@ -0,0 +1,775 @@ +using Model; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection.Emit; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Linq; +using Tool; + +namespace BLL +{ + public class CheckBLL + { + private SqlHelper sql = new SqlHelper(); + private ConfigHelper configHelper = new ConfigHelper(); + private FileHelper file = new FileHelper(); + public void SetConfig(SettingModel set) + { + configHelper.Write("Index", set.index.ToString()); + } + /// + /// 读取配置文件内容 + /// + /// + public SettingModel LoadConfig() + { + //地址 + string setPath1 = System.Environment.CurrentDirectory + "\\Setting1.config"; + //夹具号 + string setPath2 = System.Environment.CurrentDirectory + "\\Setting2.config"; + //机型 + string setPath3 = System.Environment.CurrentDirectory + "\\Setting3.config"; + try + { + SettingModel set = new SettingModel(); + Dictionary dic = configHelper.ReadAll(); + //地址 + Dictionary dic1 = configHelper.ReadAll(setPath1); + //夹具号 + Dictionary dic2 = configHelper.ReadAll(setPath2); + //机型 + Dictionary dic3 = configHelper.ReadAll(setPath3); + if (dic1.ContainsKey("pathini")) + { + set.pathini = dic1["pathini"]; + } + if (dic1.ContainsKey("pathLoad")) + { + set.pathLoad = dic1["pathLoad"]; + } + if (dic1.ContainsKey("pathch1")) + { + set.pathch1 = dic1["pathch1"]; + } + if (dic1.ContainsKey("pathch2")) + { + set.pathch2 = dic1["pathch2"]; + } + if (dic2.ContainsKey("devcode1")) + { + set.devcode1 = dic2["devcode1"]; + } + if (dic2.ContainsKey("devcode2")) + { + set.devcode2 = dic2["devcode2"]; + } + if (dic3.ContainsKey("type")) + { + set.Types = dic3["type"].Split(';'); + } + if (dic.ContainsKey("Index")) + { + set.index = int.Parse(dic["Index"]); + } + return set; + } + catch (Exception ee) + { + LogHelper.WriteLog(ee.ToString()); + return null; + } + } + public List getReplacetest1(string path,string imei) + { + string pathen = ""; + string textna = ""; + List topexcl = new List(); + DirectoryInfo theFolder1 = new DirectoryInfo(path); + DirectoryInfo[] dir12 = theFolder1.GetDirectories(); + if (dir12.Length!=1) + { + return topexcl; + } + foreach (DirectoryInfo NextFolder2 in dir12) + { + textna = NextFolder2.Name; + if (NextFolder2.Name.Contains(imei) && NextFolder2.Name.Contains("PASS")) + { + pathen = NextFolder2.FullName+ "\\LTE_FT.csv"; + }else + { + return topexcl; + } + } + using (var reader = new StreamReader(pathen)) + { + string line; + // 循环读取文件中的每一行 + while ((line = reader.ReadLine()) != null) + { + // 使用Split函数按逗号分隔行内容 + string[] fields = line.Split(','); + + // 这里可以对分隔后的字段数据进行处理或存储 + // 示例:打印每一行的字段 + //for (int i = 0; i < fields.Length; i++) + //{ + // Console.WriteLine($"Field {i + 1}: {fields[i]}"); + //} + ExclModel itme = new ExclModel(); + itme.textname = textna; + itme.Band = fields[1]; + itme.Channel = fields[2]; + itme.Result = fields[7]; + topexcl.Add(itme); + // 实际应用中,您可以在此处替换为实际的数据处理逻辑 + } + } + return topexcl; + } + /// + /// 从log文件读取功率 + /// + /// + /// + /// + public Tuple, string> getReplacetest(string path, string imei,int num) + { + string pathen = ""; + string textna = ""; + string retul = "OK"; + List topexcl = new List(); + DirectoryInfo theFolder1 = new DirectoryInfo(path); + DirectoryInfo[] dir12 = theFolder1.GetDirectories(); + List dir13 = theFolder1.GetDirectories().ToList(); + if (dir12.Length != num + 1) + { + retul = "log文件数量不为" + (num + 1); + return new Tuple, string>(topexcl, retul); + } + //List onetextna1 = dir13.OrderByDescending(it => it.CreationTime).ToList(); + DirectoryInfo onetextna = dir13.OrderByDescending(it => it.CreationTime).First(); + textna = onetextna.Name; + pathen = onetextna.FullName + "\\LTE_FT.csv"; + DateTime s = onetextna.CreationTime; + DateTime s1 = DateTime.Today; + if (s, string>(topexcl, retul); + } + //if (dir12.Length != num+1) + //{ + // retul="log文件数量不为"+ (num+1); + // return new Tuple, string>(topexcl, retul); + //} + foreach (DirectoryInfo NextFolder2 in dir12) + { + //textna = NextFolder2.Name; + //if (NextFolder2.Name.Contains(imei) && NextFolder2.Name.Contains("PASS")) + //{ + // pathen = NextFolder2.FullName + "\\LTE_FT.csv"; + //} + //else + //{ + // retul = "log文件名称没有PASS或与金机号不符"; + // return new Tuple, string>(topexcl, retul); + //} + if (!NextFolder2.Name.Contains(imei) || !NextFolder2.Name.Contains("PASS")) + { + retul = "log文件名称没有PASS或与金机号不符"; + return new Tuple, string>(topexcl, retul); + } + } + using (var reader = new StreamReader(pathen)) + { + string line; + // 循环读取文件中的每一行 + while ((line = reader.ReadLine()) != null) + { + // 使用Split函数按逗号分隔行内容 + string[] fields = line.Split(','); + + // 这里可以对分隔后的字段数据进行处理或存储 + // 示例:打印每一行的字段 + //for (int i = 0; i < fields.Length; i++) + //{ + // Console.WriteLine($"Field {i + 1}: {fields[i]}"); + //} + if (fields[2].Contains("Channel")) + { + continue; + } + ExclModel itme = new ExclModel(); + itme.textname = textna; + itme.Band = fields[1]; + itme.Channel = fields[2]; + itme.Result = fields[7]; + topexcl.Add(itme); + // 实际应用中,您可以在此处替换为实际的数据处理逻辑 + } + } + return new Tuple, string>(topexcl, retul); + } + /// + /// 从软件的配置文件里读取线损 + /// + /// + /// + /// + public List getinitest(string path,int numb) + { + string DateStr = DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"); + string pathen = AppDomain.CurrentDomain.BaseDirectory + "ini备份"; + //this.file.Transport(path, "D:\\xiansun", DateStr+"line.ini"); + this.file.Transport(path, pathen, DateStr + "line.ini"); + List < IniModel > lsit = new List(); + for (int i = 0; i < 48; i++) + { + IniModel one = new IniModel(); + one.several_line_loss = (lsit.Count + 1).ToString(); + one.textname = DateStr + "Line.ini"; + lsit.Add(one); + } + using (StreamReader sr = new StreamReader(pathen+"\\" + DateStr + "Line.ini", Encoding.UTF8)) + //using (StreamReader sr = new StreamReader("D:\\xiansun\\" + DateStr + "Line.ini", Encoding.UTF8)) + { + string line; + bool isRead = false; + List lines = new List(); + //IniModel one = new IniModel(); + int number = 0; + while ((line = sr.ReadLine()) != null) + { + lines.Add(line); + if (line.Contains("[Instrument Setting TS"+ (numb).ToString() +"]")) + { + isRead = true; + } + if (line.Contains("[Instrument Setting TS" + (numb+1).ToString() + "]")) + { + isRead = false; + } + if (line == ""|| !isRead||line.Contains("DIV")|| line.Contains("66_")) + { + continue; + } + if (!line.Contains("LTE_BAND")) + { + + continue; + } + if (line.Contains("LTE_BAND") && line.Contains("TX_LOW_LOSS")) + { + number = int.Parse(line.Split(new char[2] { 'D', '_' })[2])-1; + lsit[number].LTE_BAND_TX_LOW_LOSS= line.Split('=')[1].Trim(); + //one.LTE_BAND_TX_LOW_LOSS = line.Split('=')[1].Trim(); + //number = number + 1; + } + else if (line.Contains("LTE_BAND") && line.Contains("TX_MID_LOSS")) + { + number = int.Parse(line.Split(new char[2] { 'D', '_' })[2]) - 1; + lsit[number].LTE_BAND_TX_MID_LOSS = line.Split('=')[1].Trim(); + //one.LTE_BAND_TX_MID_LOSS = line.Split('=')[1].Trim(); + //number = number + 1; + } + else if (line.Contains("LTE_BAND") && line.Contains("TX_HIGH_LOSS")) + { + number = int.Parse(line.Split(new char[2] { 'D', '_' })[2]) - 1; + lsit[number].LTE_BAND_TX_HIGH_LOSS = line.Split('=')[1].Trim(); + //one.LTE_BAND_TX_HIGH_LOSS = line.Split('=')[1].Trim(); + //number = number + 1; + } + else if (line.Contains("LTE_BAND") && line.Contains("RX_LOW_LOSS")) + { + number = int.Parse(line.Split(new char[2] { 'D', '_' })[2]) - 1; + lsit[number].LTE_BAND_RX_LOW_LOSS = line.Split('=')[1].Trim(); + //one.LTE_BAND_RX_LOW_LOSS = line.Split('=')[1].Trim(); + //number = number + 1; + } + else if (line.Contains("LTE_BAND") && line.Contains("RX_MID_LOSS")) + { + number = int.Parse(line.Split(new char[2] { 'D', '_' })[2]) - 1; + lsit[number].LTE_BAND_RX_MID_LOSS = line.Split('=')[1].Trim(); + //one.LTE_BAND_RX_MID_LOSS = line.Split('=')[1].Trim(); + //number = number + 1; + } + else if (line.Contains("LTE_BAND") && line.Contains("RX_HIGH_LOSS")) + { + number = int.Parse(line.Split(new char[2] { 'D', '_' })[2]) - 1; + lsit[number].LTE_BAND_RX_HIGH_LOSS = line.Split('=')[1].Trim(); + //one.LTE_BAND_RX_HIGH_LOSS = line.Split('=')[1].Trim(); + //number = number + 1; + } + //if (number==6) + //{ + // lsit.Add(one); + // one = new IniModel(); + // number = 0; + //} + } + + return lsit; + } + } + /// + /// 从软件的配置文件里读取线损 + /// + /// + /// + /// + public string getloadtest(string path) + { + //string DateStr = DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"); + //this.file.Transport(path, "D:\\xiansun", DateStr + "Load.ini"); + //List lsit = new List(); + + //using (StreamReader sr = new StreamReader("D:\\xiansun\\" + DateStr + "Load.ini", Encoding.UTF8)) + //{ + // string line; + // List lines = new List(); + // //IniModel one = new IniModel(); + // while ((line = sr.ReadLine()) != null) + // { + // lines.Add(line); + // if (line.Contains("EnableScript1=")) + // { + // string setingd = line.Split('=')[1].Trim(); + // lsit.Add(setingd); + // } + // } + // if (lsit.Count!=2) + // { + // return "Load.ini读取的EnableScript1数量为"+ lsit.Count+"条"; + // } + //if (lsit[1]!="0") + //{ + // return "Load.ini未取消校准"; + //} + return "OK"; + //} //} + } + /// + /// 将log文件的位置清理,准备点检或抓取 + /// + /// + public void Clearfile(SettingModel set) + { + DirectoryInfo theFolder1 = new DirectoryInfo(set.pathch1); + DirectoryInfo theFolder2 = new DirectoryInfo(set.pathch2); + DirectoryInfo parsent = theFolder1.Parent; + string path1 = parsent.FullName + "\\errch1"; + string path2 = parsent.FullName + "\\errch2"; + if (!Directory.Exists(path1)) + { + Directory.CreateDirectory(path1); + } + if (!Directory.Exists(path2)) + { + Directory.CreateDirectory(path2); + } + DirectoryInfo[] dir11 = theFolder1.GetDirectories(); + foreach (DirectoryInfo NextFolder1 in dir11) + { + NextFolder1.MoveTo(path1 + "\\" + NextFolder1.Name); + } + DirectoryInfo[] dir12 = theFolder2.GetDirectories(); + foreach (DirectoryInfo NextFolder2 in dir12) + { + NextFolder2.MoveTo(path2 + "\\" + NextFolder2.Name); + } + //theFolder1.MoveTo(path1+ "\\" + “xxx_xx_xxx”); + //theFolder2.MoveTo(path2+"\\" + “xxx_xx_xxx”); + } + /// + /// 将log文件上传共享文件夹,并在本地备份 + /// + /// + /// + /// + public string coply(string path,int num,string devcode) + { + try + { + DateTime dt = sql.db3.GetDate(); + string DateStr = dt.ToString("yyyy-MM-dd"); + string pathup = "\\\\192.168.2.149\\生产数据-2\\制造二课\\制造二课(模组车间)\\中移上传点检\\日常点检\\" + DateStr + "\\" + devcode; + string pathcp = ""; + + DirectoryInfo theFolder1 = new DirectoryInfo(path); + pathcp = theFolder1.Parent.FullName+"\\备份\\"+ DateStr; + if (!Directory.Exists(pathcp)) + { + Directory.CreateDirectory(pathcp); + } + DirectoryInfo[] dir12 = theFolder1.GetDirectories(); + if (dir12.Length != num) + { + return "文件数量错误"; + } + foreach (DirectoryInfo NextFolder2 in dir12) + { + if (!Directory.Exists(pathup+"\\"+ NextFolder2.Name)) + { + Directory.CreateDirectory(pathup + "\\" + NextFolder2.Name); + } + FileInfo[] dir11 = NextFolder2.GetFiles(); + foreach (FileInfo NextFolder3 in dir11) + { + if (Copy_directory(NextFolder3.FullName, pathup + "\\" + NextFolder2.Name)) + { + if (File.Exists(pathcp + "\\" + NextFolder2.Name + "\\" + NextFolder3.Name)) + { + File.Delete(pathcp + "\\" + NextFolder2.Name + "\\" + NextFolder3.Name); + } + } + else + { + return "文件上传失败"+ NextFolder2.Name; + } + } + NextFolder2.MoveTo(pathcp + "\\" + NextFolder2.Name); + } + return "OK"; + } + catch (Exception ee) + { + return ee.ToString(); + } + } + /// + /// 复制文件 + /// + /// + /// + /// + public static bool Copy_directory(string sourcePath, string destinationPath) + { + + Boolean fpss = true; + + string dPath = destinationPath + sourcePath.Substring(sourcePath.LastIndexOf("\\")); + FileInfo old = new FileInfo(sourcePath); + File.Copy(sourcePath, dPath, true); + + if (File.Exists(dPath)) + { + FileInfo romote = new FileInfo(dPath); + if (old.Length != romote.Length) + { + fpss = false; + } + } + + return fpss; + } + /// + /// 判断从文件读取的log功率是否读取完整。线损是否小于4 + /// + /// + /// + /// + public string Checktest(List exclModel, List initestModel) + { + foreach (var item1 in exclModel) + { + if (item1.Band==""|| item1.Result == "" || item1.Channel == "" ) + { + return "log数据未采集完整!"; + } + } + foreach (var item2 in initestModel) + { + if (item2.LTE_BAND_TX_LOW_LOSS == "" || item2.LTE_BAND_TX_MID_LOSS == "" + || item2.LTE_BAND_TX_HIGH_LOSS == "" || item2.LTE_BAND_RX_LOW_LOSS == "" + || item2.LTE_BAND_RX_MID_LOSS == "" || item2.LTE_BAND_RX_HIGH_LOSS == "") + { + return "ini数据未采集完整!"; + } + if(double.Parse(item2.LTE_BAND_TX_LOW_LOSS) >100) + { + return "ini的index" + item2.several_line_loss + "的LTE_BAND_TX_LOW_LOSS的为" + item2.LTE_BAND_TX_LOW_LOSS + "大于100"; + } + if (double.Parse(item2.LTE_BAND_TX_MID_LOSS) > 100) + { + return "ini的index" + item2.several_line_loss + "的LTE_BAND_TX_MID_LOSS的为" + item2.LTE_BAND_TX_MID_LOSS + "大于100"; + } + if (double.Parse(item2.LTE_BAND_TX_HIGH_LOSS) > 100) + { + return "ini的index" + item2.several_line_loss + "的LTE_BAND_TX_HIGH_LOSS的为" + item2.LTE_BAND_TX_HIGH_LOSS + "大于100"; + } + if (double.Parse(item2.LTE_BAND_RX_LOW_LOSS) > 100) + { + return "ini的index" + item2.several_line_loss + "的LTE_BAND_RX_LOW_LOSS的为" + item2.LTE_BAND_RX_LOW_LOSS + "大于100"; + } + if (double.Parse(item2.LTE_BAND_RX_MID_LOSS) > 100) + { + return "ini的index" + item2.several_line_loss + "的LTE_BAND_RX_MID_LOSS的为" + item2.LTE_BAND_RX_MID_LOSS + "大于100"; + } + if (double.Parse(item2.LTE_BAND_RX_HIGH_LOSS) > 100) + { + return "ini的index" + item2.several_line_loss + "的LTE_BAND_RX_HIGH_LOSS的为" + item2.LTE_BAND_RX_HIGH_LOSS + "大于100"; + } + } + return "OK"; + } + /// + /// 对比两个log功率的差距是否大于0.3 + /// + /// + /// + /// + public string Checklog(List exclModel, List standardExclModelModel,string exc1name,string exc2name,string type) + { + try + { + if (exclModel.Count != standardExclModelModel.Count) + { + return exc1name+"的数据条数" + exclModel.Count + "与"+ exc2name+"的条数" + standardExclModelModel.Count + "不同"; + } + foreach (var item in exclModel) + { + //bool chck = false; + //foreach (var item1 in standardExclModelModel) + //{ + // if (item.Channel == item1.Channel) + // { + // chck = true; + // double value1 = double.Parse(item.Result.Replace("dBm", "")); + // double value2 = double.Parse(item1.Result.Replace("dBm", "")); + // double difference = Math.Abs(value1 - value2); + // if (difference >= 0.5) + // { + // return (item.Channel + "的" + item.Result + "与数据库的" + item1.Result + "差超过0.5"); + // } + // if (difference >= 0.3) + // { + // return (item.Channel + "的" + item.Result + "与数据库的" + item1.Result + "差超过0.3"); + // } + // } + //} + var item2 = standardExclModelModel.Find(m=>m.Band== item.Band&&m.Channel==item.Channel); + if (item2==null) + { + return exc1name + "的数据Channel:" + item.Channel + "在"+ exc2name + "未找到对应的记录"; + } + double value1 = double.Parse(item.Result.Replace("dBm", "")); + double value2 = double.Parse(item2.Result.Replace("dBm", "")); + double difference = Math.Abs(value1 - value2); + if (difference >= 0.5) + { + return (exc1name + "的数据Channel:"+item.Channel + "的" + item.Result + "与"+ exc2name+"的" + item2.Result + "差超过0.5"); + } + //if (type == "ML307R芯朴" && item.Band == "8") + //{ + // if (difference >= 0.4) + // { + // return ("ML307R芯朴"+exc1name + "的数据Channel:" + item.Channel + "的" + item.Result + "与" + exc2name + "的" + item2.Result + "差超过0.4"); + // } + //} + //else + //{ + // if (difference >= 0.3) + // { + // return (exc1name + "的数据Channel:" + item.Channel + "的" + item.Result + "与" + exc2name + "的" + item2.Result + "差超过0.3"); + // } + //} + } + return "OK"; + } + catch (Exception ee) { + LogHelper.WriteLog(ee.ToString()); + return ee.ToString(); + } + } + /// + /// 对比两个线损的差距是否小于.03 + /// + /// + /// + /// + public string Checkini(List initestModel, List standardInitestModel, string exc1name, string exc2name) + { + try + { + if (initestModel.Count != standardInitestModel.Count) + { + return exc1name+"线损的数据条数" + initestModel.Count + "与"+ exc2name + "线损的条数" + standardInitestModel.Count + "不同"; + } + foreach (var item in initestModel) + { + ////bool chck = false; + //foreach (var item1 in standardInitestModel) + //{ + // if (item.index == item1.index) + // { + // chck = true; + // string difff =""; + // difff=matchekc(item.LTE_BAND_TX_LOW_LOSS, item1.LTE_BAND_TX_LOW_LOSS); + // if (difff!="OK") + // { + // return "线损的数据index:" + item.index + "LTE_BAND_TX_LOW_LOSS"+ difff; + // } + // difff = matchekc(item.LTE_BAND_TX_MID_LOSS, item1.LTE_BAND_TX_MID_LOSS); + // if (difff != "OK") + // { + // return "线损的数据index:" + item.index + "LTE_BAND_TX_MID_LOSS" + difff; + // } + // difff = matchekc(item.LTE_BAND_TX_HIGH_LOSS, item1.LTE_BAND_TX_HIGH_LOSS); + // if (difff != "OK") + // { + // return "线损的数据index:" + item.index + "LTE_BAND_TX_HIGH_LOSS" + difff; + // } + // difff = matchekc(item.LTE_BAND_RX_LOW_LOSS, item1.LTE_BAND_RX_LOW_LOSS); + // if (difff != "OK") + // { + // return "线损的数据index:" + item.index + "LTE_BAND_RX_LOW_LOSS" + difff; + // } + // difff = matchekc(item.LTE_BAND_RX_MID_LOSS, item1.LTE_BAND_RX_MID_LOSS); + // if (difff != "OK") + // { + // return "线损的数据index:" + item.index + "LTE_BAND_RX_MID_LOSS" + difff; + // } + // difff = matchekc(item.LTE_BAND_RX_HIGH_LOSS, item1.LTE_BAND_RX_HIGH_LOSS); + // if (difff != "OK") + // { + // return "线损的数据index:" + item.index + "LTE_BAND_RX_HIGH_LOSS" + difff; + // } + // } + //} + //if (!chck) + //{ + // return "线损的数据index:" + item.index + "未找到对应的记录"; + //} + var item2 = standardInitestModel.Find(m=>m.several_line_loss == item.several_line_loss); + if (item2 == null) + { + return exc1name+"线损的数据index:" + item.several_line_loss + "在" +exc2name + "未找到对应的记录"; + } + string difff = ""; + difff = matchekc(item.LTE_BAND_TX_LOW_LOSS, item2.LTE_BAND_TX_LOW_LOSS); + if (difff != "OK") + { + return exc1name + "线损的数据index:" + item.several_line_loss + "对比"+ exc2name + "LTE_BAND_TX_LOW_LOSS" + difff; + } + difff = matchekc(item.LTE_BAND_TX_MID_LOSS, item2.LTE_BAND_TX_MID_LOSS); + if (difff != "OK") + { + return exc1name + "线损的数据index:" + item.several_line_loss + "对比" + exc2name + "LTE_BAND_TX_MID_LOSS" + difff; + } + difff = matchekc(item.LTE_BAND_TX_HIGH_LOSS, item2.LTE_BAND_TX_HIGH_LOSS); + if (difff != "OK") + { + return exc1name + "线损的数据index:" + item.several_line_loss + "对比" + exc2name + "LTE_BAND_TX_HIGH_LOSS" + difff; + } + difff = matchekc(item.LTE_BAND_RX_LOW_LOSS, item2.LTE_BAND_RX_LOW_LOSS); + if (difff != "OK") + { + return exc1name + "线损的数据index:" + item.several_line_loss + "对比" + exc2name + "LTE_BAND_RX_LOW_LOSS" + difff; + } + difff = matchekc(item.LTE_BAND_RX_MID_LOSS, item2.LTE_BAND_RX_MID_LOSS); + if (difff != "OK") + { + return exc1name + "线损的数据index:" + item.several_line_loss + "对比" + exc2name + "LTE_BAND_RX_MID_LOSS" + difff; + } + difff = matchekc(item.LTE_BAND_RX_HIGH_LOSS, item2.LTE_BAND_RX_HIGH_LOSS); + if (difff != "OK") + { + return "线损的数据index:" + item.several_line_loss + "对比" + exc2name + "LTE_BAND_RX_HIGH_LOSS" + difff; + } + } + return "OK"; + } + catch (Exception ee) + { + return ee.ToString(); + } + } + /// + /// 判断两个数是否相差大于0.3 + /// + /// + /// + /// + public string matchekc(string tvalue1,string tvalue2) + { + try + { + double value1 = double.Parse(tvalue1); + double value2 = double.Parse(tvalue2); + double difference = Math.Abs(value1 - value2); + if (difference >= 0.5) + { + return ("差超过0.5"); + } + //if (difference >= 0.3) + //{ + // return ("差超过0.3"); + //} + return "OK"; + } + catch (Exception ee) { + return ee.ToString(); + } + } + /// + /// 将共享文件内的文件移动到其他地方 + /// + /// + /// + /// + /// + /// + public string moveto(string devcode1, string type, string snimei) + { + DateTime dt = sql.db3.GetDate(); + string DateStr = dt.ToString("yyyy-MM-dd"); + string path = "\\\\192.168.2.149\\生产数据-2\\制造二课\\制造二课(模组车间)\\中移上传点检\\日常点检\\" + DateStr+"\\"+ devcode1; + string pathto = "\\\\192.168.2.149\\生产数据-2\\制造二课\\制造二课(模组车间)\\中移上传点检\\日常点检备份\\" + DateStr + "\\" + devcode1; + + if (!Directory.Exists(path)) + { + Directory.CreateDirectory(path); + } + DirectoryInfo theFolder1 = new DirectoryInfo(path); + + DirectoryInfo[] dir12 = theFolder1.GetDirectories(); + if (dir12.Length == 0) + { + return "OK"; + } + + if (!Directory.Exists(pathto)) + { + Directory.CreateDirectory(pathto); + } + foreach (DirectoryInfo NextFolder2 in dir12) + { + //if (!Directory.Exists(pathto + "\\" + NextFolder2.Name)) + //{ + // Directory.CreateDirectory(pathto + "\\" + NextFolder2.Name); + //} + //FileInfo[] dir11 = NextFolder2.GetFiles(); + //foreach (FileInfo NextFolder3 in dir11) + //{ + // if (Copy_directory(NextFolder3.FullName, pathto + "\\" + NextFolder2.Name)) + // { + // if (File.Exists(pathto + "\\" + NextFolder2.Name + "\\" + NextFolder3.Name)) + // { + // File.Delete(pathto + "\\" + NextFolder2.Name + "\\" + NextFolder3.Name); + // } + // } + // else + // { + // return "文件上传失败" + NextFolder2.Name; + // } + //} + NextFolder2.MoveTo(pathto + "\\" + NextFolder2.Name); + } + return "OK"; + } + } +} diff --git a/BLL/Properties/AssemblyInfo.cs b/BLL/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..bbde1eb --- /dev/null +++ b/BLL/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("BLL")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("BLL")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("02a200e7-551a-4dd7-b23a-afaa9dbecf81")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BLL/bin/Debug/BLL.dll b/BLL/bin/Debug/BLL.dll new file mode 100644 index 0000000..9d7cc0a Binary files /dev/null and b/BLL/bin/Debug/BLL.dll differ diff --git a/BLL/bin/Debug/BLL.pdb b/BLL/bin/Debug/BLL.pdb new file mode 100644 index 0000000..d248839 Binary files /dev/null and b/BLL/bin/Debug/BLL.pdb differ diff --git a/BLL/bin/Debug/Model.dll b/BLL/bin/Debug/Model.dll new file mode 100644 index 0000000..7ce17f8 Binary files /dev/null and b/BLL/bin/Debug/Model.dll differ diff --git a/BLL/bin/Debug/Model.pdb b/BLL/bin/Debug/Model.pdb new file mode 100644 index 0000000..91b11a9 Binary files /dev/null and b/BLL/bin/Debug/Model.pdb differ diff --git a/BLL/bin/Debug/SqlSugar.dll b/BLL/bin/Debug/SqlSugar.dll new file mode 100644 index 0000000..e0ac058 Binary files /dev/null and b/BLL/bin/Debug/SqlSugar.dll differ diff --git a/BLL/bin/Debug/Tool.dll b/BLL/bin/Debug/Tool.dll new file mode 100644 index 0000000..d76f056 Binary files /dev/null and b/BLL/bin/Debug/Tool.dll differ diff --git a/BLL/bin/Debug/Tool.pdb b/BLL/bin/Debug/Tool.pdb new file mode 100644 index 0000000..3ec701c Binary files /dev/null and b/BLL/bin/Debug/Tool.pdb differ diff --git a/BLL/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs b/BLL/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs new file mode 100644 index 0000000..f1a77a1 --- /dev/null +++ b/BLL/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.2", FrameworkDisplayName = ".NET Framework 4.5.2")] diff --git a/BLL/obj/Debug/BLL.csproj.AssemblyReference.cache b/BLL/obj/Debug/BLL.csproj.AssemblyReference.cache new file mode 100644 index 0000000..ab2dcf9 Binary files /dev/null and b/BLL/obj/Debug/BLL.csproj.AssemblyReference.cache differ diff --git a/BLL/obj/Debug/BLL.csproj.CoreCompileInputs.cache b/BLL/obj/Debug/BLL.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..6448d7d --- /dev/null +++ b/BLL/obj/Debug/BLL.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +b1a84f9457003ac7d2ad72352989e29f41b8275d375cf8d680061b79df40335e diff --git a/BLL/obj/Debug/BLL.csproj.FileListAbsolute.txt b/BLL/obj/Debug/BLL.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..1c77920 --- /dev/null +++ b/BLL/obj/Debug/BLL.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +D:\桌面文件夹\Desktop\中移版本库\金机点检\BLL\bin\Debug\BLL.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\BLL\bin\Debug\BLL.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\BLL\obj\Debug\BLL.csproj.AssemblyReference.cache +D:\桌面文件夹\Desktop\中移版本库\金机点检\BLL\obj\Debug\BLL.csproj.CoreCompileInputs.cache +D:\桌面文件夹\Desktop\中移版本库\金机点检\BLL\obj\Debug\BLL.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\BLL\obj\Debug\BLL.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\BLL\bin\Debug\Model.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\BLL\bin\Debug\Tool.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\BLL\bin\Debug\Model.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\BLL\bin\Debug\Tool.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\BLL\obj\Debug\BLL.csproj.Up2Date diff --git a/BLL/obj/Debug/BLL.csproj.Up2Date b/BLL/obj/Debug/BLL.csproj.Up2Date new file mode 100644 index 0000000..e69de29 diff --git a/BLL/obj/Debug/BLL.dll b/BLL/obj/Debug/BLL.dll new file mode 100644 index 0000000..9d7cc0a Binary files /dev/null and b/BLL/obj/Debug/BLL.dll differ diff --git a/BLL/obj/Debug/BLL.pdb b/BLL/obj/Debug/BLL.pdb new file mode 100644 index 0000000..d248839 Binary files /dev/null and b/BLL/obj/Debug/BLL.pdb differ diff --git a/BLL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/BLL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..de5df25 Binary files /dev/null and b/BLL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/DAL/CheckDAL.cs b/DAL/CheckDAL.cs new file mode 100644 index 0000000..8a9709d --- /dev/null +++ b/DAL/CheckDAL.cs @@ -0,0 +1,293 @@ +using Model; +using NPOI.HSSF.UserModel; +using NPOI.SS.Formula.Functions; +using NPOI.SS.UserModel; +using NPOI.XSSF.UserModel; +using System; +using System.Collections.Generic; +using System.Data; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tool; + +namespace DAL +{ + public class CheckDAL + { + private SqlHelper sql = new SqlHelper(); + /// + /// 抓取模式功率值取平均值 + /// + /// + /// + /// + /// + public List getendinitest(List initestModel, List initestModel2, List initestModel3) + { + List Ini = new List(); + foreach (var item1 in initestModel) + { + IniModel ind = new IniModel(); + var itme2 = initestModel2.Find(m => m.several_line_loss == item1.several_line_loss); + var itme3 = initestModel3.Find(m => m.several_line_loss == item1.several_line_loss); + if (itme2==null|| itme3 == null) + { + return new List(); + } + ind.several_line_loss = item1.several_line_loss; + ind.LTE_BAND_TX_LOW_LOSS = getendini3(item1.LTE_BAND_TX_LOW_LOSS, itme2.LTE_BAND_TX_LOW_LOSS, itme3.LTE_BAND_TX_LOW_LOSS); + ind.LTE_BAND_TX_MID_LOSS = getendini3(item1.LTE_BAND_TX_MID_LOSS, itme2.LTE_BAND_TX_MID_LOSS, itme3.LTE_BAND_TX_MID_LOSS); + ind.LTE_BAND_TX_HIGH_LOSS = getendini3(item1.LTE_BAND_TX_HIGH_LOSS, itme2.LTE_BAND_TX_HIGH_LOSS, itme3.LTE_BAND_TX_HIGH_LOSS); + ind.LTE_BAND_RX_LOW_LOSS = getendini3(item1.LTE_BAND_RX_LOW_LOSS, itme2.LTE_BAND_RX_LOW_LOSS, itme3.LTE_BAND_RX_LOW_LOSS); + ind.LTE_BAND_RX_MID_LOSS = getendini3(item1.LTE_BAND_RX_MID_LOSS, itme2.LTE_BAND_RX_MID_LOSS, itme3.LTE_BAND_RX_MID_LOSS); + ind.LTE_BAND_RX_HIGH_LOSS = getendini3(item1.LTE_BAND_RX_HIGH_LOSS, itme2.LTE_BAND_RX_HIGH_LOSS, itme3.LTE_BAND_RX_HIGH_LOSS); + Ini.Add(ind); + } + return Ini; + } + /// + /// 计算三个数的平均值,保留小数点后两位 + /// + /// + /// + /// + /// + public string getendini3(string lTE_BAND_RX_LOW_LOSS1, string lTE_BAND_RX_LOW_LOSS2, string lTE_BAND_RX_LOW_LOSS3) + { + double value1 = double.Parse(lTE_BAND_RX_LOW_LOSS1); + double value2 = double.Parse(lTE_BAND_RX_LOW_LOSS2); + double value3 = double.Parse(lTE_BAND_RX_LOW_LOSS3); + double difference = Math.Round((value1 + value2+ value3)/3,2); + return difference.ToString(); + } + /// + /// 计算抓取模式下线损的平均值 + /// + /// + /// + /// + /// + public List getendtest(List exclModel, List exclModel2, List exclModel3) + { + List Excl = new List(); + foreach (var item in exclModel) + { + ExclModel excd = new ExclModel(); + var itme2 = exclModel2.Find(m => m.Channel == item.Channel&& m.Band == item.Band); + var itme3 = exclModel3.Find(m => m.Channel == item.Channel&&m.Band == item.Band); + if (itme2 == null || itme3 == null) + { + return new List(); + } + excd.Band = item.Band; + excd.Channel = item.Channel; + excd.Result = getendini3(item.Result.Replace("dBm", ""), itme2.Result.Replace("dBm", ""), itme3.Result.Replace("dBm", "")) + "dBm"; + Excl.Add(excd); + } + return Excl; + } + /// + /// 从数据库读取金机与机型的关系 + /// + /// + /// + public string[] Getimei(string type) + { + string[] Jinjiimei; + string imei = ""; + List lS = sql.db3.Queryable(). + Where(it => it.type == type).ToList(); + if (lS.Count>0) + { + foreach (var yj in lS) + { + if (imei == "") + { + imei = yj.snimei; + } + else { + imei = imei+";"+ yj.snimei; + } + } + } + Jinjiimei= imei.Split(';'); + return Jinjiimei; + } + /// + /// 抓取作为标准的功率值 + /// + /// + /// + /// + /// + /// + public List GetStandardExcl(string devcode1, string type, string snimei) + { + try + { + List exciset = new List(); + SqlHelper.t_CMCC_JinjiPower LinExc = sql.db3.Queryable(). + Where(it => it.Devcode == devcode1 && it.snimei == snimei && it.kind == "标准"). + OrderBy(it => it.PowerTime, SqlSugar.OrderByType.Desc).First(); + if (LinExc != null) + { + List lsitpower = sql.db3.Queryable(). + Where(it => it.PowerTime == LinExc.PowerTime && it.Devcode == devcode1 && it.snimei == snimei && it.kind == "标准").ToList(); + foreach (var item in lsitpower) + { + ExclModel excModel = new ExclModel(); + excModel.Band = item.Band; + excModel.Result = item.Result; + excModel.Channel = item.Channel; + exciset.Add(excModel); + } + return exciset; + } + else + { + LogHelper.WriteLog("数据库为空"); + return null; + } + } + catch (Exception ee) + { + LogHelper.WriteLog(ee.ToString()); + return null; + } + } + /// + /// 抓取作为标准的线损值 + /// + /// + /// + /// + /// + /// + public List GetStandardIni(string devcode1, string type, string snimei) + { + try + { + List linliset = new List(); + SqlHelper.t_CMCC_JinjiLine Lin = sql.db3.Queryable(). + Where(it => it.Devcode == devcode1&&it.snimei == snimei && it.kind == "标准"). + OrderBy(it => it.LineTime, SqlSugar.OrderByType.Desc).First(); + if (Lin != null) + { + List lsitline = sql.db3.Queryable(). + Where(it => it.LineTime== Lin.LineTime&& it.Devcode == devcode1 && it.snimei == snimei&&it.kind=="标准").ToList(); + foreach (var item in lsitline) + { + IniModel lineModel = new IniModel(); + lineModel.several_line_loss = item.several_line_loss; + lineModel.LTE_BAND_TX_LOW_LOSS = item.LTE_BAND_TX_LOW_LOSS; + lineModel.LTE_BAND_TX_MID_LOSS = item.LTE_BAND_TX_MID_LOSS; + lineModel.LTE_BAND_TX_HIGH_LOSS = item.LTE_BAND_TX_HIGH_LOSS; + lineModel.LTE_BAND_RX_LOW_LOSS = item.LTE_BAND_RX_LOW_LOSS; + lineModel.LTE_BAND_RX_MID_LOSS = item.LTE_BAND_RX_MID_LOSS; + lineModel.LTE_BAND_RX_HIGH_LOSS = item.LTE_BAND_RX_HIGH_LOSS; + linliset.Add(lineModel); + } + return linliset; + } + else + { + LogHelper.WriteLog("数据库为空"); + return null; + } + } + catch (Exception ee) + { + LogHelper.WriteLog(ee.ToString()); + return null; + } + } + /// + /// 上传合格的功率值和线损值 + /// + /// + /// + /// + /// + public string updata(List initestModel, List exclModel,string classify,string devcode,string type,string snimei,string name) + { + try { + DateTime dt = sql.db3.GetDate(); + List powelist = new List(); + foreach (var item in exclModel) + { + SqlHelper.t_CMCC_JinjiPower powerone = new SqlHelper.t_CMCC_JinjiPower(); + powerone.Band = item.Band; + powerone.Channel = item.Channel; + powerone.Result = item.Result; + powerone.PowerTime = dt; + powerone.Powername = name; + powerone.kind = classify; + powerone.textname = item.textname; + powerone.Devcode = devcode; + powerone.type = type; + powerone.snimei = snimei; + powelist.Add(powerone); + } + int result = sql.db3.Insertable(powelist).ExecuteCommand(); + if (result != powelist.Count) + { + return "功率数据上传异常!"; + } + List Linelist = new List(); + foreach (var item in initestModel) + { + SqlHelper.t_CMCC_JinjiLine lineone = new SqlHelper.t_CMCC_JinjiLine(); + lineone.LTE_BAND_TX_LOW_LOSS = item.LTE_BAND_TX_LOW_LOSS; + lineone.LTE_BAND_TX_MID_LOSS = item.LTE_BAND_TX_MID_LOSS; + lineone.LTE_BAND_TX_HIGH_LOSS = item.LTE_BAND_TX_HIGH_LOSS; + lineone.LTE_BAND_RX_LOW_LOSS = item.LTE_BAND_RX_LOW_LOSS; + lineone.LTE_BAND_RX_MID_LOSS = item.LTE_BAND_RX_MID_LOSS; + lineone.LTE_BAND_RX_HIGH_LOSS = item.LTE_BAND_RX_HIGH_LOSS; + lineone.several_line_loss = item.several_line_loss; + lineone.kind = classify; + lineone.LineTime = dt; + lineone.Linename = name; + lineone.textname = item.textname; + lineone.Devcode = devcode; + lineone.type = type; + lineone.snimei = snimei; + Linelist.Add(lineone); + } + result = sql.db3.Insertable(Linelist).ExecuteCommand(); + if (result != Linelist.Count) + { + return "功率数据上传异常!"; + } + return "OK"; + } + catch (Exception ee) + { + LogHelper.WriteLog(ee.ToString()); + return "MES连接异常!"; + } + } + + public string checkdist(string devcode1, string type, string snimei, string name) + { + if(devcode1==""|| devcode1==null) + { + return "对应的夹具号为空"; + } + if (type =="" || type == null) + { + return "机型为空"; + } + if (snimei=="" || snimei == null) + { + return "对应的金机编号为空"; + } + if (name=="" || name == null) + { + return "未登录"; + } + return "OK"; + } + } +} diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj new file mode 100644 index 0000000..9831a7e --- /dev/null +++ b/DAL/DAL.csproj @@ -0,0 +1,82 @@ + + + + + Debug + AnyCPU + {EED41D82-0ECD-49C0-B753-4DE90642BE69} + Library + Properties + DAL + DAL + v4.5.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\点检\packages\Portable.BouncyCastle.1.8.9\lib\net40\BouncyCastle.Crypto.dll + + + ..\点检\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll + + + ..\点检\packages\NPOI.2.5.6\lib\net45\NPOI.dll + + + ..\点检\packages\NPOI.2.5.6\lib\net45\NPOI.OOXML.dll + + + ..\点检\packages\NPOI.2.5.6\lib\net45\NPOI.OpenXml4Net.dll + + + ..\点检\packages\NPOI.2.5.6\lib\net45\NPOI.OpenXmlFormats.dll + + + ..\点检\packages\SqlSugar.5.0.3\lib\SqlSugar.dll + + + + + + + + + + + + + + + + + {5a80de64-fcd5-4d7c-8a1e-4199412d80bd} + Model + + + {CC8994B7-1312-45E6-ABDA-92413692FEB3} + Tool + + + + + + + \ No newline at end of file diff --git a/DAL/Properties/AssemblyInfo.cs b/DAL/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..19fe9ce --- /dev/null +++ b/DAL/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("DAL")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("DAL")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("eed41d82-0ecd-49c0-b753-4de90642be69")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/DAL/bin/Debug/BouncyCastle.Crypto.dll b/DAL/bin/Debug/BouncyCastle.Crypto.dll new file mode 100644 index 0000000..967a933 Binary files /dev/null and b/DAL/bin/Debug/BouncyCastle.Crypto.dll differ diff --git a/DAL/bin/Debug/BouncyCastle.Crypto.xml b/DAL/bin/Debug/BouncyCastle.Crypto.xml new file mode 100644 index 0000000..364abd3 --- /dev/null +++ b/DAL/bin/Debug/BouncyCastle.Crypto.xml @@ -0,0 +1,26258 @@ + + + + BouncyCastle.Crypto + + + + return the X9ECParameters object for the named curve represented by + the passed in object identifier. Null if the curve isn't present. + + @param oid an object identifier representing a named curve, if present. + + + return the object identifier signified by the passed in name. Null + if there is no object identifier associated with name. + + @return the object identifier associated with name, if present. + + + return the named curve name represented by the given object identifier. + + + returns an enumeration containing the name strings for curves + contained in this structure. + + + Return the DER encoding of the object, null if the DER encoding can not be made. + + @return a DER byte array, null otherwise. + + + Mutable class for building ASN.1 constructed objects such as SETs or SEQUENCEs. + + + a general purpose ASN.1 decoder - note: this class differs from the + others in that it returns null after it has read the last object in + the stream. If an ASN.1 Null is encountered a Der/BER Null object is + returned. + + + Create an ASN1InputStream where no DER object will be longer than limit. + + @param input stream containing ASN.1 encoded data. + @param limit maximum size of a DER encoded object. + + + Create an ASN1InputStream based on the input byte array. The length of DER objects in + the stream is automatically limited to the length of the input array. + + @param input array containing ASN.1 encoded data. + + + build an object given its tag and the number of bytes to construct it from. + + + A Null object. + + + Create a base ASN.1 object from a byte array. + The byte array to parse. + The base ASN.1 object represented by the byte array. + + If there is a problem parsing the data, or parsing an object did not exhaust the available data. + + + + Read a base ASN.1 object from a stream. + The stream to parse. + The base ASN.1 object represented by the byte array. + If there is a problem parsing the data. + + + return an Octet string from a tagged object. + + @param obj the tagged object holding the object we want. + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + return an Octet string from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + @param string the octets making up the octet string. + + + return an Asn1Sequence from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Return an ASN1 sequence from a tagged object. There is a special + case here, if an object appears to have been explicitly tagged on + reading but we were expecting it to be implicitly tagged in the + normal course of events it indicates that we lost the surrounding + sequence - so we need to add it back (this will happen if the tagged + object is a sequence that contains other sequences). If you are + dealing with implicitly tagged sequences you really should + be using this method. + + @param obj the tagged object. + @param explicitly true if the object is meant to be explicitly tagged, + false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + return the object at the sequence position indicated by index. + + @param index the sequence number (starting at zero) of the object + @return the object at the sequence position indicated by index. + + + return an ASN1Set from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Return an ASN1 set from a tagged object. There is a special + case here, if an object appears to have been explicitly tagged on + reading but we were expecting it to be implicitly tagged in the + normal course of events it indicates that we lost the surrounding + set - so we need to add it back (this will happen if the tagged + object is a sequence that contains other sequences). If you are + dealing with implicitly tagged sets you really should + be using this method. + + @param obj the tagged object. + @param explicitly true if the object is meant to be explicitly tagged + false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + return the object at the set position indicated by index. + + @param index the set number (starting at zero) of the object + @return the object at the set position indicated by index. + + + ASN.1 TaggedObject - in ASN.1 notation this is any object preceded by + a [n] where n is some number - these are assumed to follow the construction + rules (as with sequences). + + + @param tagNo the tag number for this object. + @param obj the tagged object. + + + @param explicitly true if the object is explicitly tagged. + @param tagNo the tag number for this object. + @param obj the tagged object. + + + return whether or not the object may be explicitly tagged. +

+ Note: if the object has been read from an input stream, the only + time you can be sure if isExplicit is returning the true state of + affairs is if it returns false. An implicitly tagged object may appear + to be explicitly tagged, so you need to understand the context under + which the reading was done as well, see GetObject below.

+
+ + return whatever was following the tag. +

+ Note: tagged objects are generally context dependent if you're + trying to extract a tagged object you should be going via the + appropriate GetInstance method.

+
+ + Return the object held in this tagged object as a parser assuming it has + the type of the passed in tag. If the object doesn't have a parser + associated with it, the base object is returned. + + + iso.org.dod.internet.private.enterprise.legion-of-the-bouncy-castle +

1.3.6.1.4.1.22554

+
+ + pbe(1) algorithms +

1.3.6.1.4.1.22554.1

+
+ + SHA-1(1) +

1.3.6.1.4.1.22554.1.1

+
+ + SHA-2.SHA-256; 1.3.6.1.4.1.22554.1.2.1 + + + SHA-2.SHA-384; 1.3.6.1.4.1.22554.1.2.2 + + + SHA-2.SHA-512; 1.3.6.1.4.1.22554.1.2.3 + + + SHA-2.SHA-224; 1.3.6.1.4.1.22554.1.2.4 + + + PKCS-5(1)|PKCS-12(2) + SHA-1.PKCS5; 1.3.6.1.4.1.22554.1.1.1 + + + SHA-1.PKCS12; 1.3.6.1.4.1.22554.1.1.2 + + + SHA-256.PKCS12; 1.3.6.1.4.1.22554.1.2.1.1 + + + SHA-256.PKCS12; 1.3.6.1.4.1.22554.1.2.1.2 + + + AES(1) . (CBC-128(2)|CBC-192(22)|CBC-256(42)) + 1.3.6.1.4.1.22554.1.1.2.1.2 + + + 1.3.6.1.4.1.22554.1.1.2.1.22 + + + 1.3.6.1.4.1.22554.1.1.2.1.42 + + + 1.3.6.1.4.1.22554.1.1.2.2.2 + + + 1.3.6.1.4.1.22554.1.1.2.2.22 + + + 1.3.6.1.4.1.22554.1.1.2.2.42 + + + signature(2) algorithms + + + Sphincs-256 + + + XMSS + + + XMSS^MT + + + key_exchange(3) algorithms + + + NewHope + + + + Extension to tie an alternate certificate to the containing certificate. +
+                LinkedCertificate := SEQUENCE {
+                    digest        DigestInfo,                   -- digest of PQC certificate
+                    certLocation  GeneralName,                  -- location of PQC certificate
+                    certIssuer    [0] Name OPTIONAL,            -- issuer of PQC cert (if different from current certificate)
+                    cACerts       [1] GeneralNames OPTIONAL,    -- CA certificates for PQC cert (one of more locations)
+            }
+            
+
+ + A BER Null object. + + + return the DER octets that make up this string. + + + create an empty sequence + + + create a sequence containing one object + + + create a sequence containing a vector of objects. + + + create an empty sequence + + + create a set containing one object + + + create a set containing a vector of objects. + + + BER TaggedObject - in ASN.1 notation this is any object preceded by + a [n] where n is some number - these are assumed to follow the construction + rules (as with sequences). + + + @param tagNo the tag number for this object. + @param obj the tagged object. + + + @param explicitly true if an explicitly tagged object. + @param tagNo the tag number for this object. + @param obj the tagged object. + + + create an implicitly tagged object that contains a zero + length sequence. + + + See https://www.bsi.bund.de/cae/servlet/contentblob/471398/publicationFile/30615/BSI-TR-03111_pdf.pdf + + + 0.4.0.127.0.7.1 + + + ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963 OID: 0.4.0.127.0.7.1.1.5.1.1 + + + ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963 + with hash function SHA-1 + OID: 0.4.0.127.0.7.1.1.5.1.1.1 + + + ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963 + with hash function SHA224 + OID: 0.4.0.127.0.7.1.1.5.1.1.2 + + + ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963 + with hash function SHA256 + OID: 0.4.0.127.0.7.1.1.5.1.1.3 + + + ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963 + with hash function SHA384 + OID: 0.4.0.127.0.7.1.1.5.1.1.4 + + + ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963 + with hash function SHA512 + OID: 0.4.0.127.0.7.1.1.5.1.1.5 + + + ElGamal Elliptic Curve Key Agreement and Key Derivation according to X963 + with hash function RIPEMD160 + OID: 0.4.0.127.0.7.1.1.5.1.1.6 + + + Key Derivation Function for Session Keys + + +
+            CAKeyUpdAnnContent ::= SEQUENCE {
+                                        oldWithNew   CmpCertificate, -- old pub signed with new priv
+                                        newWithOld   CmpCertificate, -- new pub signed with old priv
+                                        newWithNew   CmpCertificate  -- new pub signed with new priv
+             }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            CertConfirmContent ::= SEQUENCE OF CertStatus
+            
+ @return a basic ASN.1 object representation. +
+ +
+            CertifiedKeyPair ::= SEQUENCE {
+                                             certOrEncCert       CertOrEncCert,
+                                             privateKey      [0] EncryptedValue      OPTIONAL,
+                                             -- see [CRMF] for comment on encoding
+                                             publicationInfo [1] PKIPublicationInfo  OPTIONAL
+                  }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            CertOrEncCert ::= CHOICE {
+                                 certificate     [0] CMPCertificate,
+                                 encryptedCert   [1] EncryptedValue
+                      }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            CertRepMessage ::= SEQUENCE {
+                                     caPubs       [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
+                                                                                        OPTIONAL,
+                                     response         SEQUENCE OF CertResponse
+            }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            CertResponse ::= SEQUENCE {
+                                       certReqId           INTEGER,
+                                       -- to match this response with corresponding request (a value
+                                       -- of -1 is to be used if certReqId is not specified in the
+                                       -- corresponding request)
+                                       status              PKIStatusInfo,
+                                       certifiedKeyPair    CertifiedKeyPair    OPTIONAL,
+                                       rspInfo             OCTET STRING        OPTIONAL
+                                       -- analogous to the id-regInfo-utf8Pairs string defined
+                                       -- for regInfo in CertReqMsg [CRMF]
+                        }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            CertStatus ::= SEQUENCE {
+                              certHash    OCTET STRING,
+                              -- the hash of the certificate, using the same hash algorithm
+                              -- as is used to create and verify the certificate signature
+                              certReqId   INTEGER,
+                              -- to match this confirmation with the corresponding req/rep
+                              statusInfo  PKIStatusInfo OPTIONAL
+            }
+            
+ @return a basic ASN.1 object representation. +
+ +
+             Challenge ::= SEQUENCE {
+                             owf                 AlgorithmIdentifier  OPTIONAL,
+            
+                             -- MUST be present in the first Challenge; MAY be omitted in
+                             -- any subsequent Challenge in POPODecKeyChallContent (if
+                             -- omitted, then the owf used in the immediately preceding
+                             -- Challenge is to be used).
+            
+                             witness             OCTET STRING,
+                             -- the result of applying the one-way function (owf) to a
+                             -- randomly-generated INTEGER, A.  [Note that a different
+                             -- INTEGER MUST be used for each Challenge.]
+                             challenge           OCTET STRING
+                             -- the encryption (under the public key for which the cert.
+                             -- request is being made) of Rand, where Rand is specified as
+                             --   Rand ::= SEQUENCE {
+                             --      int      INTEGER,
+                             --       - the randomly-generated INTEGER A (above)
+                             --      sender   GeneralName
+                             --       - the sender's name (as included in PKIHeader)
+                             --   }
+                  }
+             
+ @return a basic ASN.1 object representation. +
+ + Note: the addition of attribute certificates is a BC extension. + + +
+             CMPCertificate ::= CHOICE {
+                        x509v3PKCert        Certificate
+                        x509v2AttrCert      [1] AttributeCertificate
+              }
+             
+ Note: the addition of attribute certificates is a BC extension. + + @return a basic ASN.1 object representation. +
+ +
+            CrlAnnContent ::= SEQUENCE OF CertificateList
+            
+ @return a basic ASN.1 object representation. +
+ +
+            ErrorMsgContent ::= SEQUENCE {
+                                   pKIStatusInfo          PKIStatusInfo,
+                                   errorCode              INTEGER           OPTIONAL,
+                                   -- implementation-specific error codes
+                                   errorDetails           PKIFreeText       OPTIONAL
+                                   -- implementation-specific error details
+            }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            GenMsgContent ::= SEQUENCE OF InfoTypeAndValue
+            
+ @return a basic ASN.1 object representation. +
+ +
+            GenRepContent ::= SEQUENCE OF InfoTypeAndValue
+            
+ @return a basic ASN.1 object representation. +
+ + Example InfoTypeAndValue contents include, but are not limited + to, the following (un-comment in this ASN.1 module and use as + appropriate for a given environment): +
+               id-it-caProtEncCert    OBJECT IDENTIFIER ::= {id-it 1}
+                  CAProtEncCertValue      ::= CMPCertificate
+               id-it-signKeyPairTypes OBJECT IDENTIFIER ::= {id-it 2}
+                 SignKeyPairTypesValue   ::= SEQUENCE OF AlgorithmIdentifier
+               id-it-encKeyPairTypes  OBJECT IDENTIFIER ::= {id-it 3}
+                 EncKeyPairTypesValue    ::= SEQUENCE OF AlgorithmIdentifier
+               id-it-preferredSymmAlg OBJECT IDENTIFIER ::= {id-it 4}
+                  PreferredSymmAlgValue   ::= AlgorithmIdentifier
+               id-it-caKeyUpdateInfo  OBJECT IDENTIFIER ::= {id-it 5}
+                  CAKeyUpdateInfoValue    ::= CAKeyUpdAnnContent
+               id-it-currentCRL       OBJECT IDENTIFIER ::= {id-it 6}
+                  CurrentCRLValue         ::= CertificateList
+               id-it-unsupportedOIDs  OBJECT IDENTIFIER ::= {id-it 7}
+                  UnsupportedOIDsValue    ::= SEQUENCE OF OBJECT IDENTIFIER
+               id-it-keyPairParamReq  OBJECT IDENTIFIER ::= {id-it 10}
+                  KeyPairParamReqValue    ::= OBJECT IDENTIFIER
+               id-it-keyPairParamRep  OBJECT IDENTIFIER ::= {id-it 11}
+                  KeyPairParamRepValue    ::= AlgorithmIdentifer
+               id-it-revPassphrase    OBJECT IDENTIFIER ::= {id-it 12}
+                  RevPassphraseValue      ::= EncryptedValue
+               id-it-implicitConfirm  OBJECT IDENTIFIER ::= {id-it 13}
+                  ImplicitConfirmValue    ::= NULL
+               id-it-confirmWaitTime  OBJECT IDENTIFIER ::= {id-it 14}
+                  ConfirmWaitTimeValue    ::= GeneralizedTime
+               id-it-origPKIMessage   OBJECT IDENTIFIER ::= {id-it 15}
+                  OrigPKIMessageValue     ::= PKIMessages
+               id-it-suppLangTags     OBJECT IDENTIFIER ::= {id-it 16}
+                  SuppLangTagsValue       ::= SEQUENCE OF UTF8String
+            
+             where
+            
+               id-pkix OBJECT IDENTIFIER ::= {
+                  iso(1) identified-organization(3)
+                  dod(6) internet(1) security(5) mechanisms(5) pkix(7)}
+             and
+                  id-it   OBJECT IDENTIFIER ::= {id-pkix 4}
+             
+
+ +
+            InfoTypeAndValue ::= SEQUENCE {
+                                    infoType               OBJECT IDENTIFIER,
+                                    infoValue              ANY DEFINED BY infoType  OPTIONAL
+            }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            KeyRecRepContent ::= SEQUENCE {
+                                    status                  PKIStatusInfo,
+                                    newSigCert          [0] CMPCertificate OPTIONAL,
+                                    caCerts             [1] SEQUENCE SIZE (1..MAX) OF
+                                                                      CMPCertificate OPTIONAL,
+                                    keyPairHist         [2] SEQUENCE SIZE (1..MAX) OF
+                                                                      CertifiedKeyPair OPTIONAL
+                         }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            OobCertHash ::= SEQUENCE {
+                                 hashAlg     [0] AlgorithmIdentifier     OPTIONAL,
+                                 certId      [1] CertId                  OPTIONAL,
+                                 hashVal         BIT STRING
+                                 -- hashVal is calculated over the Der encoding of the
+                                 -- self-signed certificate with the identifier certID.
+                  }
+            
+ @return a basic ASN.1 object representation. +
+ +
+             PbmParameter ::= SEQUENCE {
+                                   salt                OCTET STRING,
+                                   -- note:  implementations MAY wish to limit acceptable sizes
+                                   -- of this string to values appropriate for their environment
+                                   -- in order to reduce the risk of denial-of-service attacks
+                                   owf                 AlgorithmIdentifier,
+                                   -- AlgId for a One-Way Function (SHA-1 recommended)
+                                   iterationCount      INTEGER,
+                                   -- number of times the OWF is applied
+                                   -- note:  implementations MAY wish to limit acceptable sizes
+                                   -- of this integer to values appropriate for their environment
+                                   -- in order to reduce the risk of denial-of-service attacks
+                                   mac                 AlgorithmIdentifier
+                                   -- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
+               }   -- or HMAC [RFC2104, RFC2202])
+            
+ @return a basic ASN.1 object representation. +
+ + Creates a new PkiBody. + @param type one of the TYPE_* constants + @param content message content + + +
+            PkiBody ::= CHOICE {       -- message-specific body elements
+                   ir       [0]  CertReqMessages,        --Initialization Request
+                   ip       [1]  CertRepMessage,         --Initialization Response
+                   cr       [2]  CertReqMessages,        --Certification Request
+                   cp       [3]  CertRepMessage,         --Certification Response
+                   p10cr    [4]  CertificationRequest,   --imported from [PKCS10]
+                   popdecc  [5]  POPODecKeyChallContent, --pop Challenge
+                   popdecr  [6]  POPODecKeyRespContent,  --pop Response
+                   kur      [7]  CertReqMessages,        --Key Update Request
+                   kup      [8]  CertRepMessage,         --Key Update Response
+                   krr      [9]  CertReqMessages,        --Key Recovery Request
+                   krp      [10] KeyRecRepContent,       --Key Recovery Response
+                   rr       [11] RevReqContent,          --Revocation Request
+                   rp       [12] RevRepContent,          --Revocation Response
+                   ccr      [13] CertReqMessages,        --Cross-Cert. Request
+                   ccp      [14] CertRepMessage,         --Cross-Cert. Response
+                   ckuann   [15] CAKeyUpdAnnContent,     --CA Key Update Ann.
+                   cann     [16] CertAnnContent,         --Certificate Ann.
+                   rann     [17] RevAnnContent,          --Revocation Ann.
+                   crlann   [18] CRLAnnContent,          --CRL Announcement
+                   pkiconf  [19] PKIConfirmContent,      --Confirmation
+                   nested   [20] NestedMessageContent,   --Nested Message
+                   genm     [21] GenMsgContent,          --General Message
+                   genp     [22] GenRepContent,          --General Response
+                   error    [23] ErrorMsgContent,        --Error Message
+                   certConf [24] CertConfirmContent,     --Certificate confirm
+                   pollReq  [25] PollReqContent,         --Polling request
+                   pollRep  [26] PollRepContent          --Polling response
+            }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            PkiConfirmContent ::= NULL
+            
+ @return a basic ASN.1 object representation. +
+ +
+            PKIFailureInfo ::= BIT STRING {
+            badAlg               (0),
+              -- unrecognized or unsupported Algorithm Identifier
+            badMessageCheck      (1), -- integrity check failed (e.g., signature did not verify)
+            badRequest           (2),
+              -- transaction not permitted or supported
+            badTime              (3), -- messageTime was not sufficiently close to the system time, as defined by local policy
+            badCertId            (4), -- no certificate could be found matching the provided criteria
+            badDataFormat        (5),
+              -- the data submitted has the wrong format
+            wrongAuthority       (6), -- the authority indicated in the request is different from the one creating the response token
+            incorrectData        (7), -- the requester's data is incorrect (for notary services)
+            missingTimeStamp     (8), -- when the timestamp is missing but should be there (by policy)
+            badPOP               (9)  -- the proof-of-possession failed
+            certRevoked         (10),
+            certConfirmed       (11),
+            wrongIntegrity      (12),
+            badRecipientNonce   (13), 
+            timeNotAvailable    (14),
+              -- the TSA's time source is not available
+            unacceptedPolicy    (15),
+              -- the requested TSA policy is not supported by the TSA
+            unacceptedExtension (16),
+              -- the requested extension is not supported by the TSA
+            addInfoNotAvailable (17)
+              -- the additional information requested could not be understood
+              -- or is not available
+            badSenderNonce      (18),
+            badCertTemplate     (19),
+            signerNotTrusted    (20),
+            transactionIdInUse  (21),
+            unsupportedVersion  (22),
+            notAuthorized       (23),
+            systemUnavail       (24),    
+            systemFailure       (25),
+              -- the request cannot be handled due to system failure
+            duplicateCertReq    (26) 
+            
+
+ + Basic constructor. + + + Return the number of string elements present. + + @return number of elements present. + + + Return the UTF8STRING at index. + + @param index index of the string of interest + @return the string at index. + + +
+            PkiFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String
+            
+
+ + Value for a "null" recipient or sender. + + +
+             PkiHeader ::= SEQUENCE {
+                       pvno                INTEGER     { cmp1999(1), cmp2000(2) },
+                       sender              GeneralName,
+                       -- identifies the sender
+                       recipient           GeneralName,
+                       -- identifies the intended recipient
+                       messageTime     [0] GeneralizedTime         OPTIONAL,
+                       -- time of production of this message (used when sender
+                       -- believes that the transport will be "suitable"; i.e.,
+                       -- that the time will still be meaningful upon receipt)
+                       protectionAlg   [1] AlgorithmIdentifier     OPTIONAL,
+                       -- algorithm used for calculation of protection bits
+                       senderKID       [2] KeyIdentifier           OPTIONAL,
+                       recipKID        [3] KeyIdentifier           OPTIONAL,
+                       -- to identify specific keys used for protection
+                       transactionID   [4] OCTET STRING            OPTIONAL,
+                       -- identifies the transaction; i.e., this will be the same in
+                       -- corresponding request, response, certConf, and PKIConf
+                       -- messages
+                       senderNonce     [5] OCTET STRING            OPTIONAL,
+                       recipNonce      [6] OCTET STRING            OPTIONAL,
+                       -- nonces used to provide replay protection, senderNonce
+                       -- is inserted by the creator of this message; recipNonce
+                       -- is a nonce previously inserted in a related message by
+                       -- the intended recipient of this message
+                       freeText        [7] PKIFreeText             OPTIONAL,
+                       -- this may be used to indicate context-specific instructions
+                       -- (this field is intended for human consumption)
+                       generalInfo     [8] SEQUENCE SIZE (1..MAX) OF
+                                            InfoTypeAndValue     OPTIONAL
+                       -- this may be used to convey context-specific information
+                       -- (this field not primarily intended for human consumption)
+            }
+            
+ @return a basic ASN.1 object representation. +
+ +
+             PKIHeader ::= SEQUENCE {
+                       pvno                INTEGER     { cmp1999(1), cmp2000(2) },
+                       sender              GeneralName,
+                       -- identifies the sender
+                       recipient           GeneralName,
+                       -- identifies the intended recipient
+                       messageTime     [0] GeneralizedTime         OPTIONAL,
+                       -- time of production of this message (used when sender
+                       -- believes that the transport will be "suitable"; i.e.,
+                       -- that the time will still be meaningful upon receipt)
+                       protectionAlg   [1] AlgorithmIdentifier     OPTIONAL,
+                       -- algorithm used for calculation of protection bits
+                       senderKID       [2] KeyIdentifier           OPTIONAL,
+                       recipKID        [3] KeyIdentifier           OPTIONAL,
+                       -- to identify specific keys used for protection
+                       transactionID   [4] OCTET STRING            OPTIONAL,
+                       -- identifies the transaction; i.e., this will be the same in
+                       -- corresponding request, response, certConf, and PKIConf
+                       -- messages
+                       senderNonce     [5] OCTET STRING            OPTIONAL,
+                       recipNonce      [6] OCTET STRING            OPTIONAL,
+                       -- nonces used to provide replay protection, senderNonce
+                       -- is inserted by the creator of this message; recipNonce
+                       -- is a nonce previously inserted in a related message by
+                       -- the intended recipient of this message
+                       freeText        [7] PKIFreeText             OPTIONAL,
+                       -- this may be used to indicate context-specific instructions
+                       -- (this field is intended for human consumption)
+                       generalInfo     [8] SEQUENCE SIZE (1..MAX) OF
+                                            InfoTypeAndValue     OPTIONAL
+                       -- this may be used to convey context-specific information
+                       -- (this field not primarily intended for human consumption)
+            }
+            
+ @return a basic ASN.1 object representation. +
+ + Creates a new PkiMessage. + + @param header message header + @param body message body + @param protection message protection (may be null) + @param extraCerts extra certificates (may be null) + + +
+            PkiMessage ::= SEQUENCE {
+                             header           PKIHeader,
+                             body             PKIBody,
+                             protection   [0] PKIProtection OPTIONAL,
+                             extraCerts   [1] SEQUENCE SIZE (1..MAX) OF CMPCertificate
+                                                                                OPTIONAL
+            }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            PkiMessages ::= SEQUENCE SIZE (1..MAX) OF PkiMessage
+            
+ @return a basic ASN.1 object representation. +
+ + @param status + + + @param status + @param statusString + + +
+             PkiStatusInfo ::= SEQUENCE {
+                 status        PKIStatus,                (INTEGER)
+                 statusString  PkiFreeText     OPTIONAL,
+                 failInfo      PkiFailureInfo  OPTIONAL  (BIT STRING)
+             }
+            
+             PKIStatus:
+               granted                (0), -- you got exactly what you asked for
+               grantedWithMods        (1), -- you got something like what you asked for
+               rejection              (2), -- you don't get it, more information elsewhere in the message
+               waiting                (3), -- the request body part has not yet been processed, expect to hear more later
+               revocationWarning      (4), -- this message contains a warning that a revocation is imminent
+               revocationNotification (5), -- notification that a revocation has occurred
+               keyUpdateWarning       (6)  -- update already done for the oldCertId specified in CertReqMsg
+            
+             PkiFailureInfo:
+               badAlg           (0), -- unrecognized or unsupported Algorithm Identifier
+               badMessageCheck  (1), -- integrity check failed (e.g., signature did not verify)
+               badRequest       (2), -- transaction not permitted or supported
+               badTime          (3), -- messageTime was not sufficiently close to the system time, as defined by local policy
+               badCertId        (4), -- no certificate could be found matching the provided criteria
+               badDataFormat    (5), -- the data submitted has the wrong format
+               wrongAuthority   (6), -- the authority indicated in the request is different from the one creating the response token
+               incorrectData    (7), -- the requester's data is incorrect (for notary services)
+               missingTimeStamp (8), -- when the timestamp is missing but should be there (by policy)
+               badPOP           (9)  -- the proof-of-possession failed
+            
+             
+
+ +
+            PollRepContent ::= SEQUENCE OF SEQUENCE {
+                    certReqId              INTEGER,
+                    checkAfter             INTEGER,  -- time in seconds
+                    reason                 PKIFreeText OPTIONAL
+                }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            PollReqContent ::= SEQUENCE OF SEQUENCE {
+                                   certReqId              INTEGER
+            }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            PopoDecKeyChallContent ::= SEQUENCE OF Challenge
+            
+ @return a basic ASN.1 object representation. +
+ +
+            PopoDecKeyRespContent ::= SEQUENCE OF INTEGER
+            
+ @return a basic ASN.1 object representation. +
+ +
+            ProtectedPart ::= SEQUENCE {
+                               header    PKIHeader,
+                               body      PKIBody
+            }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            RevAnnContent ::= SEQUENCE {
+                  status              PKIStatus,
+                  certId              CertId,
+                  willBeRevokedAt     GeneralizedTime,
+                  badSinceDate        GeneralizedTime,
+                  crlDetails          Extensions  OPTIONAL
+                   -- extra CRL details (e.g., crl number, reason, location, etc.)
+            }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            RevDetails ::= SEQUENCE {
+                             certDetails         CertTemplate,
+                              -- allows requester to specify as much as they can about
+                              -- the cert. for which revocation is requested
+                              -- (e.g., for cases in which serialNumber is not available)
+                              crlEntryDetails     Extensions       OPTIONAL
+                              -- requested crlEntryExtensions
+                        }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            RevRepContent ::= SEQUENCE {
+                   status       SEQUENCE SIZE (1..MAX) OF PKIStatusInfo,
+                   -- in same order as was sent in RevReqContent
+                   revCerts [0] SEQUENCE SIZE (1..MAX) OF CertId OPTIONAL,
+                   -- IDs for which revocation was requested
+                   -- (same order as status)
+                   crls     [1] SEQUENCE SIZE (1..MAX) OF CertificateList OPTIONAL
+                   -- the resulting CRLs (there may be more than one)
+              }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            RevReqContent ::= SEQUENCE OF RevDetails
+            
+ @return a basic ASN.1 object representation. +
+ + return an Attribute object from the given object. + + @param o the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            Attribute ::= SEQUENCE {
+                attrType OBJECT IDENTIFIER,
+                attrValues SET OF AttributeValue
+            }
+            
+
+ +
+            Attributes ::=
+              SET SIZE(1..MAX) OF Attribute -- according to RFC 5652
+            
+ @return +
+ + Return the first attribute matching the given OBJECT IDENTIFIER + + + Return all the attributes matching the OBJECT IDENTIFIER oid. The vector will be + empty if there are no attributes of the required type present. + + @param oid type of attribute required. + @return a vector of all the attributes found of type oid. + + + Return a new table with the passed in attribute added. + + @param attrType + @param attrValue + @return + + + return an AuthenticatedData object from a tagged object. + + @param obj the tagged object holding the object we want. + @param isExplicit true if the object is meant to be explicitly + tagged false otherwise. + @throws ArgumentException if the object held by the + tagged object cannot be converted. + + + return an AuthenticatedData object from the given object. + + @param obj the object we want converted. + @throws ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+             AuthenticatedData ::= SEQUENCE {
+                   version CMSVersion,
+                   originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+                   recipientInfos RecipientInfos,
+                   macAlgorithm MessageAuthenticationCodeAlgorithm,
+                   digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
+                   encapContentInfo EncapsulatedContentInfo,
+                   authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
+                   mac MessageAuthenticationCode,
+                   unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }
+            
+             AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
+            
+             UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
+            
+             MessageAuthenticationCode ::= OCTET STRING
+             
+
+ + Produce an object suitable for an Asn1OutputStream. +
+             AuthenticatedData ::= SEQUENCE {
+                   version CMSVersion,
+                   originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+                   recipientInfos RecipientInfos,
+                   macAlgorithm MessageAuthenticationCodeAlgorithm,
+                   digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
+                   encapContentInfo EncapsulatedContentInfo,
+                   authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
+                   mac MessageAuthenticationCode,
+                   unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }
+            
+             AuthAttributes ::= SET SIZE (1..MAX) OF Attribute
+            
+             UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute
+            
+             MessageAuthenticationCode ::= OCTET STRING
+             
+
+ + return an AuthEnvelopedData object from a tagged object. + + @param obj the tagged object holding the object we want. + @param isExplicit true if the object is meant to be explicitly + tagged false otherwise. + @throws ArgumentException if the object held by the + tagged object cannot be converted. + + + return an AuthEnvelopedData object from the given object. + + @param obj the object we want converted. + @throws ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            AuthEnvelopedData ::= SEQUENCE {
+              version CMSVersion,
+              originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+              recipientInfos RecipientInfos,
+              authEncryptedContentInfo EncryptedContentInfo,
+              authAttrs [1] IMPLICIT AuthAttributes OPTIONAL,
+              mac MessageAuthenticationCode,
+              unauthAttrs [2] IMPLICIT UnauthAttributes OPTIONAL }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. + +
+            AuthEnvelopedData ::= SEQUENCE {
+              version CMSVersion,
+              originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+              recipientInfos RecipientInfos,
+              authEncryptedContentInfo EncryptedContentInfo,
+              authAttrs [1] IMPLICIT AuthAttributes OPTIONAL,
+              mac MessageAuthenticationCode,
+              unauthAttrs [2] IMPLICIT UnauthAttributes OPTIONAL }
+            
+
+ + The other Revocation Info arc + id-ri OBJECT IDENTIFIER ::= { iso(1) identified-organization(3) + dod(6) internet(1) security(5) mechanisms(5) pkix(7) ri(16) } + + + RFC 3274 - CMS Compressed Data. +
+            CompressedData ::= Sequence {
+             version CMSVersion,
+             compressionAlgorithm CompressionAlgorithmIdentifier,
+             encapContentInfo EncapsulatedContentInfo
+            }
+            
+
+ + return a CompressedData object from a tagged object. + + @param ato the tagged object holding the object we want. + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the object held by the + tagged object cannot be converted. + + + return a CompressedData object from the given object. + + @param _obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + RFC 3274 - CMS Compressed Data. +
+            CompressedData ::= SEQUENCE {
+             version CMSVersion,
+             compressionAlgorithm CompressionAlgorithmIdentifier,
+             encapContentInfo EncapsulatedContentInfo
+            }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            ContentInfo ::= Sequence {
+                     contentType ContentType,
+                     content
+                     [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            ContentInfo ::= SEQUENCE {
+                     contentType ContentType,
+                     content
+                     [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+            
+
+ + return an AuthEnvelopedData object from a tagged object. + + @param obj the tagged object holding the object we want. + @param isExplicit true if the object is meant to be explicitly + tagged false otherwise. + @throws ArgumentException if the object held by the + tagged object cannot be converted. + + + return an AuthEnvelopedData object from the given object. + + @param obj the object we want converted. + @throws ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            MQVuserKeyingMaterial ::= SEQUENCE {
+              ephemeralPublicKey OriginatorPublicKey,
+              addedukm [0] EXPLICIT UserKeyingMaterial OPTIONAL  }
+            
+
+ + return an EncryptedContentInfo object from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            EncryptedContentInfo ::= Sequence {
+                contentType ContentType,
+                contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+                encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+            }
+            
+
+ +
+            EncryptedContentInfo ::= SEQUENCE {
+                contentType ContentType,
+                contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
+                encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+            }
+            
+
+ +
+                  EncryptedData ::= SEQUENCE {
+                                version CMSVersion,
+                                encryptedContentInfo EncryptedContentInfo,
+                                unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
+            
+ @return a basic ASN.1 object representation. +
+ + return an EnvelopedData object from a tagged object. + + @param obj the tagged object holding the object we want. + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the object held by the + tagged object cannot be converted. + + + return an EnvelopedData object from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            EnvelopedData ::= Sequence {
+                version CMSVersion,
+                originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+                recipientInfos RecipientInfos,
+                encryptedContentInfo EncryptedContentInfo,
+                unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
+            }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            EnvelopedData ::= SEQUENCE {
+                version CMSVersion,
+                originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
+                recipientInfos RecipientInfos,
+                encryptedContentInfo EncryptedContentInfo,
+                unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
+            }
+            
+
+ + return a KekIdentifier object from a tagged object. + + @param obj the tagged object holding the object we want. + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the object held by the + tagged object cannot be converted. + + + return a KekIdentifier object from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            KekIdentifier ::= Sequence {
+                keyIdentifier OCTET STRING,
+                date GeneralizedTime OPTIONAL,
+                other OtherKeyAttribute OPTIONAL
+            }
+            
+
+ + return a KekRecipientInfo object from a tagged object. + + @param obj the tagged object holding the object we want. + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the object held by the + tagged object cannot be converted. + + + return a KekRecipientInfo object from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            KekRecipientInfo ::= Sequence {
+                version CMSVersion,  -- always set to 4
+                kekID KekIdentifier,
+                keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+                encryptedKey EncryptedKey
+            }
+            
+
+ + return an KeyAgreeRecipientIdentifier object from a tagged object. + + @param obj the tagged object holding the object we want. + @param isExplicit true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the object held by the + tagged object cannot be converted. + + + return an KeyAgreeRecipientIdentifier object from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            KeyAgreeRecipientIdentifier ::= CHOICE {
+                issuerAndSerialNumber IssuerAndSerialNumber,
+                rKeyId [0] IMPLICIT RecipientKeyIdentifier
+            }
+            
+
+ + return a KeyAgreeRecipientInfo object from a tagged object. + + @param obj the tagged object holding the object we want. + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the object held by the + tagged object cannot be converted. + + + return a KeyAgreeRecipientInfo object from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + * Produce an object suitable for an Asn1OutputStream. + *
+                     * KeyAgreeRecipientInfo ::= Sequence {
+                     *     version CMSVersion,  -- always set to 3
+                     *     originator [0] EXPLICIT OriginatorIdentifierOrKey,
+                     *     ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
+                     *     keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+                     *     recipientEncryptedKeys RecipientEncryptedKeys
+                     * }
+            		 *
+            		 * UserKeyingMaterial ::= OCTET STRING
+                     * 
+
+ + return a KeyTransRecipientInfo object from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            KeyTransRecipientInfo ::= Sequence {
+                version CMSVersion,  -- always set to 0 or 2
+                rid RecipientIdentifier,
+                keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+                encryptedKey EncryptedKey
+            }
+            
+
+ +
+            MetaData ::= SEQUENCE {
+              hashProtected        BOOLEAN,
+              fileName             UTF8String OPTIONAL,
+              mediaType            IA5String OPTIONAL,
+              otherMetaData        Attributes OPTIONAL
+            }
+            
+ @return +
+ + return an OriginatorIdentifierOrKey object from a tagged object. + + @param o the tagged object holding the object we want. + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the object held by the + tagged object cannot be converted. + + + return an OriginatorIdentifierOrKey object from the given object. + + @param o the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+             OriginatorIdentifierOrKey ::= CHOICE {
+                 issuerAndSerialNumber IssuerAndSerialNumber,
+                 subjectKeyIdentifier [0] SubjectKeyIdentifier,
+                 originatorKey [1] OriginatorPublicKey
+             }
+            
+             SubjectKeyIdentifier ::= OCTET STRING
+             
+
+ + return an OriginatorInfo object from a tagged object. + + @param obj the tagged object holding the object we want. + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the object held by the + tagged object cannot be converted. + + + return an OriginatorInfo object from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            OriginatorInfo ::= Sequence {
+                certs [0] IMPLICIT CertificateSet OPTIONAL,
+                crls [1] IMPLICIT CertificateRevocationLists OPTIONAL
+            }
+            
+
+ + return an OriginatorPublicKey object from a tagged object. + + @param obj the tagged object holding the object we want. + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the object held by the + tagged object cannot be converted. + + + return an OriginatorPublicKey object from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            OriginatorPublicKey ::= Sequence {
+                algorithm AlgorithmIdentifier,
+                publicKey BIT STRING
+            }
+            
+
+ + return an OtherKeyAttribute object from the given object. + + @param o the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            OtherKeyAttribute ::= Sequence {
+                keyAttrId OBJECT IDENTIFIER,
+                keyAttr ANY DEFINED BY keyAttrId OPTIONAL
+            }
+            
+
+ + return a OtherRecipientInfo object from a tagged object. + + @param obj the tagged object holding the object we want. + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the object held by the + tagged object cannot be converted. + + + return a OtherRecipientInfo object from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            OtherRecipientInfo ::= Sequence {
+               oriType OBJECT IDENTIFIER,
+               oriValue ANY DEFINED BY oriType }
+            
+
+ + return a OtherRevocationInfoFormat object from a tagged object. + + @param obj the tagged object holding the object we want. + @param explicit true if the object is meant to be explicitly + tagged false otherwise. + @exception IllegalArgumentException if the object held by the + tagged object cannot be converted. + + + return a OtherRevocationInfoFormat object from the given object. + + @param obj the object we want converted. + @exception IllegalArgumentException if the object cannot be converted. + + + Produce an object suitable for an ASN1OutputStream. +
+            OtherRevocationInfoFormat ::= SEQUENCE {
+                 otherRevInfoFormat OBJECT IDENTIFIER,
+                 otherRevInfo ANY DEFINED BY otherRevInfoFormat }
+            
+
+ + return a PasswordRecipientInfo object from a tagged object. + + @param obj the tagged object holding the object we want. + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the object held by the + tagged object cannot be converted. + + + return a PasswordRecipientInfo object from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            PasswordRecipientInfo ::= Sequence {
+              version CMSVersion,   -- Always set to 0
+              keyDerivationAlgorithm [0] KeyDerivationAlgorithmIdentifier
+                                        OPTIONAL,
+             keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
+             encryptedKey EncryptedKey }
+            
+
+ + return an RecipientEncryptedKey object from a tagged object. + + @param obj the tagged object holding the object we want. + @param isExplicit true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the object held by the + tagged object cannot be converted. + + + return a RecipientEncryptedKey object from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            RecipientEncryptedKey ::= SEQUENCE {
+                rid KeyAgreeRecipientIdentifier,
+                encryptedKey EncryptedKey
+            }
+            
+
+ + return a RecipientIdentifier object from the given object. + + @param o the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+             RecipientIdentifier ::= CHOICE {
+                 issuerAndSerialNumber IssuerAndSerialNumber,
+                 subjectKeyIdentifier [0] SubjectKeyIdentifier
+             }
+            
+             SubjectKeyIdentifier ::= OCTET STRING
+             
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            RecipientInfo ::= CHOICE {
+                ktri KeyTransRecipientInfo,
+                kari [1] KeyAgreeRecipientInfo,
+                kekri [2] KekRecipientInfo,
+                pwri [3] PasswordRecipientInfo,
+                ori [4] OtherRecipientInfo }
+            
+
+ + return a RecipientKeyIdentifier object from a tagged object. + + @param _ato the tagged object holding the object we want. + @param _explicit true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the object held by the + tagged object cannot be converted. + + + return a RecipientKeyIdentifier object from the given object. + + @param _obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+             RecipientKeyIdentifier ::= Sequence {
+                 subjectKeyIdentifier SubjectKeyIdentifier,
+                 date GeneralizedTime OPTIONAL,
+                 other OtherKeyAttribute OPTIONAL
+             }
+            
+             SubjectKeyIdentifier ::= OCTET STRING
+             
+
+ +
+               ScvpReqRes ::= SEQUENCE {
+               request  [0] EXPLICIT ContentInfo OPTIONAL,
+               response     ContentInfo }
+            
+ @return the ASN.1 primitive representation. +
+ + a signed data object. + + + Produce an object suitable for an Asn1OutputStream. +
+            SignedData ::= Sequence {
+                version CMSVersion,
+                digestAlgorithms DigestAlgorithmIdentifiers,
+                encapContentInfo EncapsulatedContentInfo,
+                certificates [0] IMPLICIT CertificateSet OPTIONAL,
+                crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+                signerInfos SignerInfos
+              }
+            
+
+ +
+            SignedData ::= SEQUENCE {
+                version CMSVersion,
+                digestAlgorithms DigestAlgorithmIdentifiers,
+                encapContentInfo EncapsulatedContentInfo,
+                certificates [0] IMPLICIT CertificateSet OPTIONAL,
+                crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+                signerInfos SignerInfos
+              }
+            
+
+ + return a SignerIdentifier object from the given object. + + @param o the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+             SignerIdentifier ::= CHOICE {
+                 issuerAndSerialNumber IssuerAndSerialNumber,
+                 subjectKeyIdentifier [0] SubjectKeyIdentifier
+             }
+            
+             SubjectKeyIdentifier ::= OCTET STRING
+             
+
+ + Produce an object suitable for an Asn1OutputStream. +
+              SignerInfo ::= Sequence {
+                  version Version,
+                  SignerIdentifier sid,
+                  digestAlgorithm DigestAlgorithmIdentifier,
+                  authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,
+                  digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,
+                  encryptedDigest EncryptedDigest,
+                  unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL
+              }
+            
+              EncryptedDigest ::= OCTET STRING
+            
+              DigestAlgorithmIdentifier ::= AlgorithmIdentifier
+            
+              DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
+             
+
+ + creates a time object from a given date - if the date is between 1950 + and 2049 a UTCTime object is Generated, otherwise a GeneralizedTime + is used. + + + Produce an object suitable for an Asn1OutputStream. +
+            Time ::= CHOICE {
+                        utcTime        UTCTime,
+                        generalTime    GeneralizedTime }
+            
+
+ +
+            TimeStampAndCRL ::= SEQUENCE {
+                timeStamp   TimeStampToken,          -- according to RFC 3161
+                crl         CertificateList OPTIONAL -- according to RFC 5280
+             }
+            
+ @return +
+ +
+            TimeStampedData ::= SEQUENCE {
+              version              INTEGER { v1(1) },
+              dataUri              IA5String OPTIONAL,
+              metaData             MetaData OPTIONAL,
+              content              OCTET STRING OPTIONAL,
+              temporalEvidence     Evidence
+            }
+            
+ @return +
+ +
+            TimeStampTokenEvidence ::=
+               SEQUENCE SIZE(1..MAX) OF TimeStampAndCrl
+            
+ @return +
+ +
+            AttributeTypeAndValue ::= SEQUENCE {
+                      type         OBJECT IDENTIFIER,
+                      value        ANY DEFINED BY type }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            CertId ::= SEQUENCE {
+                            issuer           GeneralName,
+                            serialNumber     INTEGER }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            CertReqMessages ::= SEQUENCE SIZE (1..MAX) OF CertReqMsg
+            
+ @return a basic ASN.1 object representation. +
+ + Creates a new CertReqMsg. + @param certReq CertRequest + @param popo may be null + @param regInfo may be null + + +
+            CertReqMsg ::= SEQUENCE {
+                               certReq   CertRequest,
+                               pop       ProofOfPossession  OPTIONAL,
+                               -- content depends upon key type
+                               regInfo   SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue OPTIONAL }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            CertRequest ::= SEQUENCE {
+                                 certReqId     INTEGER,          -- ID for matching request and reply
+                                 certTemplate  CertTemplate,  -- Selected fields of cert to be issued
+                                 controls      Controls OPTIONAL }   -- Attributes affecting issuance
+            
+ @return a basic ASN.1 object representation. +
+ +
+             CertTemplate ::= SEQUENCE {
+                 version      [0] Version               OPTIONAL,
+                 serialNumber [1] INTEGER               OPTIONAL,
+                 signingAlg   [2] AlgorithmIdentifier   OPTIONAL,
+                 issuer       [3] Name                  OPTIONAL,
+                 validity     [4] OptionalValidity      OPTIONAL,
+                 subject      [5] Name                  OPTIONAL,
+                 publicKey    [6] SubjectPublicKeyInfo  OPTIONAL,
+                 issuerUID    [7] UniqueIdentifier      OPTIONAL,
+                 subjectUID   [8] UniqueIdentifier      OPTIONAL,
+                 extensions   [9] Extensions            OPTIONAL }
+            
+ @return a basic ASN.1 object representation. +
+ + Sets the X.509 version. Note: for X509v3, use 2 here. + + + Sets the issuer unique ID (deprecated in X.509v3) + + + Sets the subject unique ID (deprecated in X.509v3) + + +
+             CertTemplate ::= SEQUENCE {
+                 version      [0] Version               OPTIONAL,
+                 serialNumber [1] INTEGER               OPTIONAL,
+                 signingAlg   [2] AlgorithmIdentifier   OPTIONAL,
+                 issuer       [3] Name                  OPTIONAL,
+                 validity     [4] OptionalValidity      OPTIONAL,
+                 subject      [5] Name                  OPTIONAL,
+                 publicKey    [6] SubjectPublicKeyInfo  OPTIONAL,
+                 issuerUID    [7] UniqueIdentifier      OPTIONAL,
+                 subjectUID   [8] UniqueIdentifier      OPTIONAL,
+                 extensions   [9] Extensions            OPTIONAL }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            Controls  ::= SEQUENCE SIZE(1..MAX) OF AttributeTypeAndValue
+            
+ @return a basic ASN.1 object representation. +
+ +
+            EncKeyWithID ::= SEQUENCE {
+                 privateKey           PrivateKeyInfo,
+                 identifier CHOICE {
+                    string               UTF8String,
+                    generalName          GeneralName
+                } OPTIONAL
+            }
+            
+ @return +
+ +
+               EncryptedKey ::= CHOICE {
+                   encryptedValue        EncryptedValue, -- deprecated
+                   envelopedData     [0] EnvelopedData }
+                   -- The encrypted private key MUST be placed in the envelopedData
+                   -- encryptedContentInfo encryptedContent OCTET STRING.
+            
+
+ +
+            EncryptedValue ::= SEQUENCE {
+                                intendedAlg   [0] AlgorithmIdentifier  OPTIONAL,
+                                -- the intended algorithm for which the value will be used
+                                symmAlg       [1] AlgorithmIdentifier  OPTIONAL,
+                                -- the symmetric algorithm used to encrypt the value
+                                encSymmKey    [2] BIT STRING           OPTIONAL,
+                                -- the (encrypted) symmetric key used to encrypt the value
+                                keyAlg        [3] AlgorithmIdentifier  OPTIONAL,
+                                -- algorithm used to encrypt the symmetric key
+                                valueHint     [4] OCTET STRING         OPTIONAL,
+                                -- a brief description or identifier of the encValue content
+                                -- (may be meaningful only to the sending entity, and used only
+                                -- if EncryptedValue might be re-examined by the sending entity
+                                -- in the future)
+                                encValue       BIT STRING }
+                                -- the encrypted value itself
+            
+ @return a basic ASN.1 object representation. +
+ +
+            OptionalValidity ::= SEQUENCE {
+                                   notBefore  [0] Time OPTIONAL,
+                                   notAfter   [1] Time OPTIONAL } --at least one MUST be present
+            
+ @return a basic ASN.1 object representation. +
+ +
+             PkiArchiveOptions ::= CHOICE {
+                 encryptedPrivKey     [0] EncryptedKey,
+                 -- the actual value of the private key
+                 keyGenParameters     [1] KeyGenParameters,
+                 -- parameters which allow the private key to be re-generated
+                 archiveRemGenPrivKey [2] BOOLEAN }
+                 -- set to TRUE if sender wishes receiver to archive the private
+                 -- key of a key pair that the receiver generates in response to
+                 -- this request; set to FALSE if no archival is desired.
+            
+
+ +
+            PkiPublicationInfo ::= SEQUENCE {
+                             action     INTEGER {
+                                            dontPublish (0),
+                                            pleasePublish (1) },
+                             pubInfos  SEQUENCE SIZE (1..MAX) OF SinglePubInfo OPTIONAL }
+            -- pubInfos MUST NOT be present if action is "dontPublish"
+            -- (if action is "pleasePublish" and pubInfos is omitted,
+            -- "dontCare" is assumed)
+            
+ @return a basic ASN.1 object representation. +
+ + Password-based MAC value for use with POPOSigningKeyInput. + + + Creates a new PKMACValue. + @param params parameters for password-based MAC + @param value MAC of the DER-encoded SubjectPublicKeyInfo + + + Creates a new PKMACValue. + @param aid CMPObjectIdentifiers.passwordBasedMAC, with PBMParameter + @param value MAC of the DER-encoded SubjectPublicKeyInfo + + +
+            PKMACValue ::= SEQUENCE {
+                 algId  AlgorithmIdentifier,
+                 -- algorithm value shall be PasswordBasedMac 1.2.840.113533.7.66.13
+                 -- parameter value is PBMParameter
+                 value  BIT STRING }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            PopoPrivKey ::= CHOICE {
+                   thisMessage       [0] BIT STRING,         -- Deprecated
+                    -- possession is proven in this message (which contains the private
+                    -- key itself (encrypted for the CA))
+                   subsequentMessage [1] SubsequentMessage,
+                    -- possession will be proven in a subsequent message
+                   dhMAC             [2] BIT STRING,         -- Deprecated
+                   agreeMAC          [3] PKMACValue,
+                   encryptedKey      [4] EnvelopedData }
+            
+
+ + Creates a new Proof of Possession object for a signing key. + @param poposkIn the PopoSigningKeyInput structure, or null if the + CertTemplate includes both subject and publicKey values. + @param aid the AlgorithmIdentifier used to sign the proof of possession. + @param signature a signature over the DER-encoded value of poposkIn, + or the DER-encoded value of certReq if poposkIn is null. + + +
+            PopoSigningKey ::= SEQUENCE {
+                                 poposkInput           [0] PopoSigningKeyInput OPTIONAL,
+                                 algorithmIdentifier   AlgorithmIdentifier,
+                                 signature             BIT STRING }
+             -- The signature (using "algorithmIdentifier") is on the
+             -- DER-encoded value of poposkInput.  NOTE: If the CertReqMsg
+             -- certReq CertTemplate contains the subject and publicKey values,
+             -- then poposkInput MUST be omitted and the signature MUST be
+             -- computed on the DER-encoded value of CertReqMsg certReq.  If
+             -- the CertReqMsg certReq CertTemplate does not contain the public
+             -- key and subject values, then poposkInput MUST be present and
+             -- MUST be signed.  This strategy ensures that the public key is
+             -- not present in both the poposkInput and CertReqMsg certReq
+             -- CertTemplate fields.
+            
+ @return a basic ASN.1 object representation. +
+ + Creates a new PopoSigningKeyInput with sender name as authInfo. + + + Creates a new PopoSigningKeyInput using password-based MAC. + + + Returns the sender field, or null if authInfo is publicKeyMac + + + Returns the publicKeyMac field, or null if authInfo is sender + + +
+            PopoSigningKeyInput ::= SEQUENCE {
+                   authInfo             CHOICE {
+                                            sender              [0] GeneralName,
+                                            -- used only if an authenticated identity has been
+                                            -- established for the sender (e.g., a DN from a
+                                            -- previously-issued and currently-valid certificate
+                                            publicKeyMac        PKMacValue },
+                                            -- used if no authenticated GeneralName currently exists for
+                                            -- the sender; publicKeyMac contains a password-based MAC
+                                            -- on the DER-encoded value of publicKey
+                   publicKey           SubjectPublicKeyInfo }  -- from CertTemplate
+            
+ @return a basic ASN.1 object representation. +
+ + Creates a ProofOfPossession with type raVerified. + + + Creates a ProofOfPossession for a signing key. + + + Creates a ProofOfPossession for key encipherment or agreement. + @param type one of TYPE_KEY_ENCIPHERMENT or TYPE_KEY_AGREEMENT + + +
+            ProofOfPossession ::= CHOICE {
+                                      raVerified        [0] NULL,
+                                      -- used if the RA has already verified that the requester is in
+                                      -- possession of the private key
+                                      signature         [1] PopoSigningKey,
+                                      keyEncipherment   [2] PopoPrivKey,
+                                      keyAgreement      [3] PopoPrivKey }
+            
+ @return a basic ASN.1 object representation. +
+ +
+            SinglePubInfo ::= SEQUENCE {
+                   pubMethod    INTEGER {
+                      dontCare    (0),
+                      x500        (1),
+                      web         (2),
+                      ldap        (3) },
+                  pubLocation  GeneralName OPTIONAL }
+            
+ @return a basic ASN.1 object representation. +
+ + + Table of the available named parameters for GOST 3410-2001 / 2012. + + + + return the ECDomainParameters object for the given OID, null if it + isn't present. + + @param oid an object identifier representing a named parameters, if present. + + + returns an enumeration containing the name strings for curves + contained in this structure. + + + return the named curve name represented by the given object identifier. + + +
+             Gost28147-89-Parameters ::=
+                           SEQUENCE {
+                                   iv                   Gost28147-89-IV,
+                                   encryptionParamSet   OBJECT IDENTIFIER
+                            }
+            
+               Gost28147-89-IV ::= OCTET STRING (SIZE (8))
+             
+
+ + table of the available named parameters for GOST 3410-94. + + + return the GOST3410ParamSetParameters object for the given OID, null if it + isn't present. + + @param oid an object identifier representing a named parameters, if present. + + + returns an enumeration containing the name strings for parameters + contained in this structure. + + + Base class for an application specific object + + + Return the enclosed object assuming explicit tagging. + + @return the resulting object + @throws IOException if reconstruction fails. + + + Return the enclosed object assuming implicit tagging. + + @param derTagNo the type tag that should be applied to the object's contents. + @return the resulting object + @throws IOException if reconstruction fails. + + + return a Bit string from the passed in object + + @exception ArgumentException if the object cannot be converted. + + + return a Bit string from a tagged object. + + @param obj the tagged object holding the object we want + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + @param data the octets making up the bit string. + @param padBits the number of extra bits at the end of the string. + + + Return the octets contained in this BIT STRING, checking that this BIT STRING really + does represent an octet aligned string. Only use this method when the standard you are + following dictates that the BIT STRING will be octet aligned. + + @return a copy of the octet aligned data. + + + @return the value of the bit string as an int (truncating if necessary) + + + Der BMPString object. + + + return a BMP string from the given object. + + @param obj the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + return a BMP string from a tagged object. + + @param obj the tagged object holding the object we want + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + basic constructor - byte encoded string. + + + basic constructor + + + return a bool from the passed in object. + + @exception ArgumentException if the object cannot be converted. + + + return a DerBoolean from the passed in bool. + + + return a Boolean from a tagged object. + + @param obj the tagged object holding the object we want + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + return an integer from the passed in object + + @exception ArgumentException if the object cannot be converted. + + + return an Enumerated from a tagged object. + + @param obj the tagged object holding the object we want + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + Class representing the DER-type External + + + Creates a new instance of DerExternal + See X.690 for more informations about the meaning of these parameters + @param directReference The direct reference or null if not set. + @param indirectReference The indirect reference or null if not set. + @param dataValueDescriptor The data value descriptor or null if not set. + @param externalData The external data in its encoded form. + + + Creates a new instance of DerExternal. + See X.690 for more informations about the meaning of these parameters + @param directReference The direct reference or null if not set. + @param indirectReference The indirect reference or null if not set. + @param dataValueDescriptor The data value descriptor or null if not set. + @param encoding The encoding to be used for the external data + @param externalData The external data + + + The encoding of the content. Valid values are +
    +
  • 0 single-ASN1-type
  • +
  • 1 OCTET STRING
  • +
  • 2 BIT STRING
  • +
+
+ + Generalized time object. + + + return a generalized time from the passed in object + + @exception ArgumentException if the object cannot be converted. + + + return a Generalized Time object from a tagged object. + + @param obj the tagged object holding the object we want + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + The correct format for this is YYYYMMDDHHMMSS[.f]Z, or without the Z + for local time, or Z+-HHMM on the end, for difference between local + time and UTC time. The fractional second amount f must consist of at + least one number with trailing zeroes removed. + + @param time the time string. + @exception ArgumentException if string is an illegal format. + + + base constructor from a local time object + + + Return the time. + @return The time string as it appeared in the encoded object. + + + return the time - always in the form of + YYYYMMDDhhmmssGMT(+hh:mm|-hh:mm). +

+ Normally in a certificate we would expect "Z" rather than "GMT", + however adding the "GMT" means we can just use: +

+                dateF = new SimpleDateFormat("yyyyMMddHHmmssz");
+            
+ To read in the time and Get a date which is compatible with our local + time zone.

+
+ + return a Graphic String from the passed in object + + @param obj a DerGraphicString or an object that can be converted into one. + @exception IllegalArgumentException if the object cannot be converted. + @return a DerGraphicString instance, or null. + + + return a Graphic String from a tagged object. + + @param obj the tagged object holding the object we want + @param explicit true if the object is meant to be explicitly + tagged false otherwise. + @exception IllegalArgumentException if the tagged object cannot + be converted. + @return a DerGraphicString instance, or null. + + + basic constructor - with bytes. + @param string the byte encoding of the characters making up the string. + + + Der IA5String object - this is an ascii string. + + + return a IA5 string from the passed in object + + @exception ArgumentException if the object cannot be converted. + + + return an IA5 string from a tagged object. + + @param obj the tagged object holding the object we want + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + basic constructor - with bytes. + + + basic constructor - without validation. + + + Constructor with optional validation. + + @param string the base string to wrap. + @param validate whether or not to check the string. + @throws ArgumentException if validate is true and the string + contains characters that should not be in an IA5String. + + + return true if the passed in String can be represented without + loss as an IA5String, false otherwise. + + @return true if in printable set, false otherwise. + + + return an integer from the passed in object + + @exception ArgumentException if the object cannot be converted. + + + return an Integer from a tagged object. + + @param obj the tagged object holding the object we want + @param isExplicit true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + in some cases positive values Get crammed into a space, + that's not quite big enough... + + + Apply the correct validation for an INTEGER primitive following the BER rules. + + @param bytes The raw encoding of the integer. + @return true if the (in)put fails this validation. + + + A Null object. + + + Der NumericString object - this is an ascii string of characters {0,1,2,3,4,5,6,7,8,9, }. + + + return a Numeric string from the passed in object + + @exception ArgumentException if the object cannot be converted. + + + return an Numeric string from a tagged object. + + @param obj the tagged object holding the object we want + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + basic constructor - with bytes. + + + basic constructor - without validation.. + + + Constructor with optional validation. + + @param string the base string to wrap. + @param validate whether or not to check the string. + @throws ArgumentException if validate is true and the string + contains characters that should not be in a NumericString. + + + Return true if the string can be represented as a NumericString ('0'..'9', ' ') + + @param str string to validate. + @return true if numeric, fale otherwise. + + + return an Oid from the passed in object + + @exception ArgumentException if the object cannot be converted. + + + return an object Identifier from a tagged object. + + @param obj the tagged object holding the object we want + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + Return true if this oid is an extension of the passed in branch, stem. + @param stem the arc or branch that is a possible parent. + @return true if the branch is on the passed in stem, false otherwise. + + + The octets making up the octet string. + + + Der PrintableString object. + + + return a printable string from the passed in object. + + @exception ArgumentException if the object cannot be converted. + + + return a Printable string from a tagged object. + + @param obj the tagged object holding the object we want + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + basic constructor - byte encoded string. + + + basic constructor - this does not validate the string + + + Constructor with optional validation. + + @param string the base string to wrap. + @param validate whether or not to check the string. + @throws ArgumentException if validate is true and the string + contains characters that should not be in a PrintableString. + + + return true if the passed in String can be represented without + loss as a PrintableString, false otherwise. + + @return true if in printable set, false otherwise. + + + create an empty sequence + + + create a sequence containing one object + + + create a sequence containing a vector of objects. + + + A Der encoded set object + + + create an empty set + + + @param obj - a single object that makes up the set. + + + @param v - a vector of objects making up the set. + + + Der T61String (also the teletex string) - 8-bit characters + + + return a T61 string from the passed in object. + + @exception ArgumentException if the object cannot be converted. + + + return an T61 string from a tagged object. + + @param obj the tagged object holding the object we want + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + basic constructor - with bytes. + + + basic constructor - with string. + + + DER TaggedObject - in ASN.1 notation this is any object preceded by + a [n] where n is some number - these are assumed to follow the construction + rules (as with sequences). + + + @param tagNo the tag number for this object. + @param obj the tagged object. + + + @param explicitly true if an explicitly tagged object. + @param tagNo the tag number for this object. + @param obj the tagged object. + + + create an implicitly tagged object that contains a zero + length sequence. + + + Der UniversalString object. + + + return a Universal string from the passed in object. + + @exception ArgumentException if the object cannot be converted. + + + return a Universal string from a tagged object. + + @param obj the tagged object holding the object we want + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + basic constructor - byte encoded string. + + + UTC time object. + + + return an UTC Time from the passed in object. + + @exception ArgumentException if the object cannot be converted. + + + return an UTC Time from a tagged object. + + @param obj the tagged object holding the object we want + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + The correct format for this is YYMMDDHHMMSSZ (it used to be that seconds were + never encoded. When you're creating one of these objects from scratch, that's + what you want to use, otherwise we'll try to deal with whatever Gets read from + the input stream... (this is why the input format is different from the GetTime() + method output). +

+ @param time the time string.

+
+ + base constructor from a DateTime object + + + return the time as a date based on whatever a 2 digit year will return. For + standardised processing use ToAdjustedDateTime(). + + @return the resulting date + @exception ParseException if the date string cannot be parsed. + + + return the time as an adjusted date + in the range of 1950 - 2049. + + @return a date in the range of 1950 to 2049. + @exception ParseException if the date string cannot be parsed. + + + return the time - always in the form of + YYMMDDhhmmssGMT(+hh:mm|-hh:mm). +

+ Normally in a certificate we would expect "Z" rather than "GMT", + however adding the "GMT" means we can just use: +

+                dateF = new SimpleDateFormat("yyMMddHHmmssz");
+            
+ To read in the time and Get a date which is compatible with our local + time zone.

+

+ Note: In some cases, due to the local date processing, this + may lead to unexpected results. If you want to stick the normal + convention of 1950 to 2049 use the GetAdjustedTime() method.

+
+ + + Return a time string as an adjusted date with a 4 digit year. + This goes in the range of 1950 - 2049. + + + + Der UTF8String object. + + + return an UTF8 string from the passed in object. + + @exception ArgumentException if the object cannot be converted. + + + return an UTF8 string from a tagged object. + + @param obj the tagged object holding the object we want + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + basic constructor - byte encoded string. + + + basic constructor + + + return a Videotex String from the passed in object + + @param obj a DERVideotexString or an object that can be converted into one. + @exception IllegalArgumentException if the object cannot be converted. + @return a DERVideotexString instance, or null. + + + return a Videotex String from a tagged object. + + @param obj the tagged object holding the object we want + @param explicit true if the object is meant to be explicitly + tagged false otherwise. + @exception IllegalArgumentException if the tagged object cannot + be converted. + @return a DERVideotexString instance, or null. + + + basic constructor - with bytes. + @param string the byte encoding of the characters making up the string. + + + Der VisibleString object. + + + return a Visible string from the passed in object. + + @exception ArgumentException if the object cannot be converted. + + + return a Visible string from a tagged object. + + @param obj the tagged object holding the object we want + @param explicitly true if the object is meant to be explicitly + tagged false otherwise. + @exception ArgumentException if the tagged object cannot + be converted. + + + basic constructor - byte encoded string. + + + basic constructor + + + Edwards Elliptic Curve Object Identifiers (RFC 8410) + + + + RFC 3126: 4.3.1 Certificate Values Attribute Definition + + CertificateValues ::= SEQUENCE OF Certificate + + + + +
+            CommitmentTypeIndication ::= SEQUENCE {
+                 commitmentTypeId   CommitmentTypeIdentifier,
+                 commitmentTypeQualifier   SEQUENCE SIZE (1..MAX) OF
+                         CommitmentTypeQualifier OPTIONAL }
+            
+
+ + Commitment type qualifiers, used in the Commitment-Type-Indication attribute (RFC3126). + +
+               CommitmentTypeQualifier ::= SEQUENCE {
+                   commitmentTypeIdentifier  CommitmentTypeIdentifier,
+                   qualifier          ANY DEFINED BY commitmentTypeIdentifier OPTIONAL }
+             
+
+ + Creates a new CommitmentTypeQualifier instance. + + @param commitmentTypeIdentifier a CommitmentTypeIdentifier value + + + Creates a new CommitmentTypeQualifier instance. + + @param commitmentTypeIdentifier a CommitmentTypeIdentifier value + @param qualifier the qualifier, defined by the above field. + + + Creates a new CommitmentTypeQualifier instance. + + @param as CommitmentTypeQualifier structure + encoded as an Asn1Sequence. + + + Returns a DER-encodable representation of this instance. + + @return a Asn1Object value + + + + RFC 3126: 4.2.1 Complete Certificate Refs Attribute Definition + + CompleteCertificateRefs ::= SEQUENCE OF OtherCertID + + + + + + RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition + + CompleteRevocationRefs ::= SEQUENCE OF CrlOcspRef + + + + + + RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition + + CrlIdentifier ::= SEQUENCE + { + crlissuer Name, + crlIssuedTime UTCTime, + crlNumber INTEGER OPTIONAL + } + + + + + + RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition + + CRLListID ::= SEQUENCE + { + crls SEQUENCE OF CrlValidatedID + } + + + + + + RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition + + CrlOcspRef ::= SEQUENCE { + crlids [0] CRLListID OPTIONAL, + ocspids [1] OcspListID OPTIONAL, + otherRev [2] OtherRevRefs OPTIONAL + } + + + + + + RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition + + CrlValidatedID ::= SEQUENCE { + crlHash OtherHash, + crlIdentifier CrlIdentifier OPTIONAL} + + + + + + RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition + + OcspIdentifier ::= SEQUENCE { + ocspResponderID ResponderID, + -- As in OCSP response data + producedAt GeneralizedTime + -- As in OCSP response data + } + + + + + + RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition + + OcspListID ::= SEQUENCE { + ocspResponses SEQUENCE OF OcspResponsesID + } + + + + + + RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition + + OcspResponsesID ::= SEQUENCE { + ocspIdentifier OcspIdentifier, + ocspRepHash OtherHash OPTIONAL + } + + + + + + + OtherCertID ::= SEQUENCE { + otherCertHash OtherHash, + issuerSerial IssuerSerial OPTIONAL + } + + + + + + + OtherHash ::= CHOICE { + sha1Hash OtherHashValue, -- This contains a SHA-1 hash + otherHash OtherHashAlgAndValue + } + + OtherHashValue ::= OCTET STRING + + + + + + Summary description for OtherHashAlgAndValue. + + + + OtherHashAlgAndValue ::= SEQUENCE { + hashAlgorithm AlgorithmIdentifier, + hashValue OtherHashValue + } + + OtherHashValue ::= OCTET STRING + + + + + + RFC 3126: 4.2.2 Complete Revocation Refs Attribute Definition + + OtherRevRefs ::= SEQUENCE + { + otherRevRefType OtherRevRefType, + otherRevRefs ANY DEFINED BY otherRevRefType + } + + OtherRevRefType ::= OBJECT IDENTIFIER + + + + + + RFC 3126: 4.3.2 Revocation Values Attribute Definition + + OtherRevVals ::= SEQUENCE + { + otherRevValType OtherRevValType, + otherRevVals ANY DEFINED BY otherRevValType + } + + OtherRevValType ::= OBJECT IDENTIFIER + + + + + + + OtherSigningCertificate ::= SEQUENCE { + certs SEQUENCE OF OtherCertID, + policies SEQUENCE OF PolicyInformation OPTIONAL + } + + + + + + RFC 5126: 6.3.4. revocation-values Attribute Definition + + RevocationValues ::= SEQUENCE { + crlVals [0] SEQUENCE OF CertificateList OPTIONAL, + ocspVals [1] SEQUENCE OF BasicOCSPResponse OPTIONAL, + otherRevVals [2] OtherRevVals OPTIONAL + } + + + + + + + SignaturePolicyId ::= SEQUENCE { + sigPolicyIdentifier SigPolicyId, + sigPolicyHash SigPolicyHash, + sigPolicyQualifiers SEQUENCE SIZE (1..MAX) OF SigPolicyQualifierInfo OPTIONAL + } + + SigPolicyId ::= OBJECT IDENTIFIER + + SigPolicyHash ::= OtherHashAlgAndValue + + + + + + + SignaturePolicyIdentifier ::= CHOICE { + SignaturePolicyId SignaturePolicyId, + SignaturePolicyImplied SignaturePolicyImplied + } + + SignaturePolicyImplied ::= NULL + + + + + +
+              SignerAttribute ::= SEQUENCE OF CHOICE {
+                  claimedAttributes   [0] ClaimedAttributes,
+                  certifiedAttributes [1] CertifiedAttributes }
+            
+              ClaimedAttributes ::= SEQUENCE OF Attribute
+              CertifiedAttributes ::= AttributeCertificate -- as defined in RFC 3281: see clause 4.1.
+             
+
+ + Signer-Location attribute (RFC3126). + +
+               SignerLocation ::= SEQUENCE {
+                   countryName        [0] DirectoryString OPTIONAL,
+                   localityName       [1] DirectoryString OPTIONAL,
+                   postalAddress      [2] PostalAddress OPTIONAL }
+            
+               PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
+             
+
+ +
+               SignerLocation ::= SEQUENCE {
+                   countryName        [0] DirectoryString OPTIONAL,
+                   localityName       [1] DirectoryString OPTIONAL,
+                   postalAddress      [2] PostalAddress OPTIONAL }
+            
+               PostalAddress ::= SEQUENCE SIZE(1..6) OF DirectoryString
+            
+               DirectoryString ::= CHOICE {
+                     teletexString           TeletexString (SIZE (1..MAX)),
+                     printableString         PrintableString (SIZE (1..MAX)),
+                     universalString         UniversalString (SIZE (1..MAX)),
+                     utf8String              UTF8String (SIZE (1.. MAX)),
+                     bmpString               BMPString (SIZE (1..MAX)) }
+             
+
+ + + + SigPolicyQualifierInfo ::= SEQUENCE { + sigPolicyQualifierId SigPolicyQualifierId, + sigQualifier ANY DEFINED BY sigPolicyQualifierId + } + + SigPolicyQualifierId ::= OBJECT IDENTIFIER + + + + + constructor + + +
+            ContentHints ::= SEQUENCE {
+              contentDescription UTF8String (SIZE (1..MAX)) OPTIONAL,
+              contentType ContentType }
+            
+
+ + Create from OCTET STRING whose octets represent the identifier. + + + Create from byte array representing the identifier. + + + The definition of ContentIdentifier is +
+            ContentIdentifier ::=  OCTET STRING
+            
+ id-aa-contentIdentifier OBJECT IDENTIFIER ::= { iso(1) + member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9) + smime(16) id-aa(2) 7 } +
+ + constructor + + +
+            EssCertID ::= SEQUENCE {
+                certHash Hash,
+                issuerSerial IssuerSerial OPTIONAL }
+            
+
+ +
+             EssCertIDv2 ::=  SEQUENCE {
+                 hashAlgorithm     AlgorithmIdentifier
+                          DEFAULT {algorithm id-sha256},
+                 certHash          Hash,
+                 issuerSerial      IssuerSerial OPTIONAL
+             }
+            
+             Hash ::= OCTET STRING
+            
+             IssuerSerial ::= SEQUENCE {
+                 issuer         GeneralNames,
+                 serialNumber   CertificateSerialNumber
+             }
+             
+
+ + constructor + + +
+             OtherCertID ::= SEQUENCE {
+                 otherCertHash    OtherHash,
+                 issuerSerial     IssuerSerial OPTIONAL }
+            
+             OtherHash ::= CHOICE {
+                 sha1Hash     OCTET STRING,
+                 otherHash    OtherHashAlgAndValue }
+            
+             OtherHashAlgAndValue ::= SEQUENCE {
+                 hashAlgorithm    AlgorithmIdentifier,
+                 hashValue        OCTET STRING }
+            
+             
+
+ + constructors + + + The definition of OtherSigningCertificate is +
+            OtherSigningCertificate ::=  SEQUENCE {
+                 certs        SEQUENCE OF OtherCertID,
+                 policies     SEQUENCE OF PolicyInformation OPTIONAL
+            }
+            
+ id-aa-ets-otherSigCert OBJECT IDENTIFIER ::= { iso(1) + member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9) + smime(16) id-aa(2) 19 } +
+ + constructors + + + The definition of SigningCertificate is +
+            SigningCertificate ::=  SEQUENCE {
+                 certs        SEQUENCE OF EssCertID,
+                 policies     SEQUENCE OF PolicyInformation OPTIONAL
+            }
+            
+ id-aa-signingCertificate OBJECT IDENTIFIER ::= { iso(1) + member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9) + smime(16) id-aa(2) 12 } +
+ + The definition of SigningCertificateV2 is +
+            SigningCertificateV2 ::=  SEQUENCE {
+                 certs        SEQUENCE OF EssCertIDv2,
+                 policies     SEQUENCE OF PolicyInformation OPTIONAL
+            }
+            
+ id-aa-signingCertificateV2 OBJECT IDENTIFIER ::= { iso(1) + member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9) + smime(16) id-aa(2) 47 } +
+ + return the X9ECParameters object for the named curve represented by + the passed in object identifier. Null if the curve isn't present. + + @param oid an object identifier representing a named curve, if present. + + + return the object identifier signified by the passed in name. Null + if there is no object identifier associated with name. + + @return the object identifier associated with name, if present. + + + return the named curve name represented by the given object identifier. + + + returns an enumeration containing the name strings for curves + contained in this structure. + + + 1.3.6.1.4.1.11591.15 - ellipticCurve + + + Marker interface for CHOICE objects - if you implement this in a roll-your-own + object, any attempt to tag the object implicitly will convert the tag to an + explicit one as the encoding rules require. +

+ If you use this interface your class should also implement the getInstance + pattern which takes a tag object and the tagging mode used. +

+
+ + basic interface for Der string objects. + + + The CscaMasterList object. This object can be wrapped in a + CMSSignedData to be published in LDAP. + +
+             CscaMasterList ::= SEQUENCE {
+               version                CscaMasterListVersion,
+               certList               SET OF Certificate }
+               
+             CscaMasterListVersion :: INTEGER {v0(0)}
+             
+
+ + The DataGroupHash object. +
+             DataGroupHash  ::=  SEQUENCE {
+                  dataGroupNumber         DataGroupNumber,
+                  dataGroupHashValue     OCTET STRING }
+            
+             DataGroupNumber ::= INTEGER {
+                     dataGroup1    (1),
+                     dataGroup1    (2),
+                     dataGroup1    (3),
+                     dataGroup1    (4),
+                     dataGroup1    (5),
+                     dataGroup1    (6),
+                     dataGroup1    (7),
+                     dataGroup1    (8),
+                     dataGroup1    (9),
+                     dataGroup1    (10),
+                     dataGroup1    (11),
+                     dataGroup1    (12),
+                     dataGroup1    (13),
+                     dataGroup1    (14),
+                     dataGroup1    (15),
+                     dataGroup1    (16) }
+            
+             
+
+ + The LDSSecurityObject object (V1.8). +
+             LDSSecurityObject ::= SEQUENCE {
+               version                LDSSecurityObjectVersion,
+               hashAlgorithm          DigestAlgorithmIdentifier,
+               dataGroupHashValues    SEQUENCE SIZE (2..ub-DataGroups) OF DataHashGroup,
+               ldsVersionInfo         LDSVersionInfo OPTIONAL
+                 -- if present, version MUST be v1 }
+            
+             DigestAlgorithmIdentifier ::= AlgorithmIdentifier,
+            
+             LDSSecurityObjectVersion :: INTEGER {V0(0)}
+             
+
+ +
+            LDSVersionInfo ::= SEQUENCE {
+               ldsVersion PRINTABLE STRING
+               unicodeVersion PRINTABLE STRING
+             }
+            
+ @return +
+ + The id-isismtt-cp-accredited OID indicates that the certificate is a + qualified certificate according to Directive 1999/93/EC of the European + Parliament and of the Council of 13 December 1999 on a Community + Framework for Electronic Signatures, which additionally conforms the + special requirements of the SigG and has been issued by an accredited CA. + + + Certificate extensionDate of certificate generation + +
+            		DateOfCertGenSyntax ::= GeneralizedTime
+             
+
+ + Attribute to indicate that the certificate holder may sign in the name of + a third person. May also be used as extension in a certificate. + + + Attribute to indicate admissions to certain professions. May be used as + attribute in attribute certificate or as extension in a certificate + + + Monetary limit for transactions. The QcEuMonetaryLimit QC statement MUST + be used in new certificates in place of the extension/attribute + MonetaryLimit since January 1, 2004. For the sake of backward + compatibility with certificates already in use, SigG conforming + components MUST support MonetaryLimit (as well as QcEuLimitValue). + + + A declaration of majority. May be used as attribute in attribute + certificate or as extension in a certificate + + + + Serial number of the smart card containing the corresponding private key + +
+            		ICCSNSyntax ::= OCTET STRING (SIZE(8..20))
+             
+
+ + + Reference for a file of a smartcard that stores the public key of this + certificate and that is used as �security anchor�. + +
+            		PKReferenceSyntax ::= OCTET STRING (SIZE(20))
+             
+
+ + Some other restriction regarding the usage of this certificate. May be + used as attribute in attribute certificate or as extension in a + certificate. + +
+            		RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+             
+ + @see Org.BouncyCastle.Asn1.IsisMtt.X509.Restriction +
+ + + (Single)Request extension: Clients may include this extension in a + (single) Request to request the responder to send the certificate in the + response message along with the status information. Besides the LDAP + service, this extension provides another mechanism for the distribution + of certificates, which MAY optionally be provided by certificate + repositories. + +
+            		RetrieveIfAllowed ::= BOOLEAN
+             
+
+ + SingleOCSPResponse extension: The certificate requested by the client by + inserting the RetrieveIfAllowed extension in the request, will be + returned in this extension. + + @see Org.BouncyCastle.Asn1.IsisMtt.Ocsp.RequestedCertificate + + + Base ObjectIdentifier for naming authorities + + + SingleOCSPResponse extension: Date, when certificate has been published + in the directory and status information has become available. Currently, + accrediting authorities enforce that SigG-conforming OCSP servers include + this extension in the responses. + +
+            		CertInDirSince ::= GeneralizedTime
+             
+
+ + Hash of a certificate in OCSP. + + @see Org.BouncyCastle.Asn1.IsisMtt.Ocsp.CertHash + + +
+            		NameAtBirth ::= DirectoryString(SIZE(1..64)
+             
+ + Used in + {@link Org.BouncyCastle.Asn1.X509.SubjectDirectoryAttributes SubjectDirectoryAttributes} +
+ + Some other information of non-restrictive nature regarding the usage of + this certificate. May be used as attribute in atribute certificate or as + extension in a certificate. + +
+                          AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+            
+ + @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdditionalInformationSyntax +
+ + Indicates that an attribute certificate exists, which limits the + usability of this public key certificate. Whenever verifying a signature + with the help of this certificate, the content of the corresponding + attribute certificate should be concerned. This extension MUST be + included in a PKC, if a corresponding attribute certificate (having the + PKC as base certificate) contains some attribute that restricts the + usability of the PKC too. Attribute certificates with restricting content + MUST always be included in the signed document. + +
+            		LiabilityLimitationFlagSyntax ::= BOOLEAN
+             
+
+ + ISIS-MTT PROFILE: The responder may include this extension in a response to + send the hash of the requested certificate to the responder. This hash is + cryptographically bound to the certificate and serves as evidence that the + certificate is known to the responder (i.e. it has been issued and is present + in the directory). Hence, this extension is a means to provide a positive + statement of availability as described in T8.[8]. As explained in T13.[1], + clients may rely on this information to be able to validate signatures after + the expiry of the corresponding certificate. Hence, clients MUST support this + extension. If a positive statement of availability is to be delivered, this + extension syntax and OID MUST be used. +

+

+

+                CertHash ::= SEQUENCE {
+                  hashAlgorithm AlgorithmIdentifier,
+                  certificateHash OCTET STRING
+                }
+            
+
+ + Constructor from Asn1Sequence. +

+ The sequence is of type CertHash: +

+

+                 CertHash ::= SEQUENCE {
+                   hashAlgorithm AlgorithmIdentifier,
+                   certificateHash OCTET STRING
+                 }
+             
+ + @param seq The ASN.1 sequence. +
+ + Constructor from a given details. + + @param hashAlgorithm The hash algorithm identifier. + @param certificateHash The hash of the whole DER encoding of the certificate. + + + Produce an object suitable for an Asn1OutputStream. +

+ Returns: +

+

+                 CertHash ::= SEQUENCE {
+                   hashAlgorithm AlgorithmIdentifier,
+                   certificateHash OCTET STRING
+                 }
+             
+ + @return an Asn1Object +
+ + ISIS-MTT-Optional: The certificate requested by the client by inserting the + RetrieveIfAllowed extension in the request, will be returned in this + extension. +

+ ISIS-MTT-SigG: The signature act allows publishing certificates only then, + when the certificate owner gives his isExplicit permission. Accordingly, there + may be �nondownloadable� certificates, about which the responder must provide + status information, but MUST NOT include them in the response. Clients may + get therefore the following three kind of answers on a single request + including the RetrieveIfAllowed extension: +

    +
  • a) the responder supports the extension and is allowed to publish the + certificate: RequestedCertificate returned including the requested + certificate
  • +
  • b) the responder supports the extension but is NOT allowed to publish + the certificate: RequestedCertificate returned including an empty OCTET + STRING
  • +
  • c) the responder does not support the extension: RequestedCertificate is + not included in the response
  • +
+ Clients requesting RetrieveIfAllowed MUST be able to handle these cases. If + any of the OCTET STRING options is used, it MUST contain the DER encoding of + the requested certificate. +

+

+                       RequestedCertificate ::= CHOICE {
+                         Certificate Certificate,
+                         publicKeyCertificate [0] EXPLICIT OCTET STRING,
+                         attributeCertificate [1] EXPLICIT OCTET STRING
+                       }
+            
+
+ + Constructor from a given details. +

+ Only one parameter can be given. All other must be null. + + @param certificate Given as Certificate + + + Produce an object suitable for an Asn1OutputStream. +

+ Returns: +

+

+                        RequestedCertificate ::= CHOICE {
+                          Certificate Certificate,
+                          publicKeyCertificate [0] EXPLICIT OCTET STRING,
+                          attributeCertificate [1] EXPLICIT OCTET STRING
+                        }
+             
+ + @return an Asn1Object +
+ + Some other information of non-restrictive nature regarding the usage of this + certificate. + +
+               AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+            
+
+ + Constructor from a given details. + + @param information The describtion of the information. + + + Produce an object suitable for an Asn1OutputStream. +

+ Returns: +

+

+               AdditionalInformationSyntax ::= DirectoryString (SIZE(1..2048))
+             
+ + @return an Asn1Object +
+ + An Admissions structure. +

+

+                        Admissions ::= SEQUENCE
+                        {
+                          admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+                          namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+                          professionInfos SEQUENCE OF ProfessionInfo
+                        }
+             

+

+ + @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax + @see Org.BouncyCastle.Asn1.IsisMtt.X509.ProfessionInfo + @see Org.BouncyCastle.Asn1.IsisMtt.X509.NamingAuthority +
+ + Constructor from Asn1Sequence. +

+ The sequence is of type ProcurationSyntax: +

+

+                        Admissions ::= SEQUENCE
+                        {
+                          admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+                          namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+                          professionInfos SEQUENCE OF ProfessionInfo
+                        }
+             
+ + @param seq The ASN.1 sequence. +
+ + Constructor from a given details. +

+ Parameter professionInfos is mandatory. + + @param admissionAuthority The admission authority. + @param namingAuthority The naming authority. + @param professionInfos The profession infos. + + + Produce an object suitable for an Asn1OutputStream. +

+ Returns: +

+

+                   Admissions ::= SEQUENCE
+                   {
+                     admissionAuthority [0] EXPLICIT GeneralName OPTIONAL
+                     namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL
+                     professionInfos SEQUENCE OF ProfessionInfo
+                   }
+             

+

+ + @return an Asn1Object +
+ + Attribute to indicate admissions to certain professions. +

+

+                 AdmissionSyntax ::= SEQUENCE
+                 {
+                   admissionAuthority GeneralName OPTIONAL,
+                   contentsOfAdmissions SEQUENCE OF Admissions
+                 }
+             

+ Admissions ::= SEQUENCE + { + admissionAuthority [0] EXPLICIT GeneralName OPTIONAL + namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL + professionInfos SEQUENCE OF ProfessionInfo + } +

+ NamingAuthority ::= SEQUENCE + { + namingAuthorityId OBJECT IDENTIFIER OPTIONAL, + namingAuthorityUrl IA5String OPTIONAL, + namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL + } +

+ ProfessionInfo ::= SEQUENCE + { + namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL, + professionItems SEQUENCE OF DirectoryString (SIZE(1..128)), + professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL, + registrationNumber PrintableString(SIZE(1..128)) OPTIONAL, + addProfessionInfo OCTET STRING OPTIONAL + } +

+

+

+ ISIS-MTT PROFILE: The relatively complex structure of AdmissionSyntax + supports the following concepts and requirements: +

    +
  • External institutions (e.g. professional associations, chambers, unions, + administrative bodies, companies, etc.), which are responsible for granting + and verifying professional admissions, are indicated by means of the data + field admissionAuthority. An admission authority is indicated by a + GeneralName object. Here an X.501 directory name (distinguished name) can be + indicated in the field directoryName, a URL address can be indicated in the + field uniformResourceIdentifier, and an object identifier can be indicated in + the field registeredId.
  • +
  • The names of authorities which are responsible for the administration of + title registers are indicated in the data field namingAuthority. The name of + the authority can be identified by an object identifier in the field + namingAuthorityId, by means of a text string in the field + namingAuthorityText, by means of a URL address in the field + namingAuthorityUrl, or by a combination of them. For example, the text string + can contain the name of the authority, the country and the name of the title + register. The URL-option refers to a web page which contains lists with + officially registered professions (text and possibly OID) as well as + further information on these professions. Object identifiers for the + component namingAuthorityId are grouped under the OID-branch + id-isis-at-namingAuthorities and must be applied for.
  • +
  • See http://www.teletrust.de/anwend.asp?Id=30200&Sprache=E_&HomePG=0 + for an application form and http://www.teletrust.de/links.asp?id=30220,11 + for an overview of registered naming authorities.
  • +
  • By means of the data type ProfessionInfo certain professions, + specializations, disciplines, fields of activity, etc. are identified. A + profession is represented by one or more text strings, resp. profession OIDs + in the fields professionItems and professionOIDs and by a registration number + in the field registrationNumber. An indication in text form must always be + present, whereas the other indications are optional. The component + addProfessionInfo may contain additional applicationspecific information in + DER-encoded form.
  • +
+

+ By means of different namingAuthority-OIDs or profession OIDs hierarchies of + professions, specializations, disciplines, fields of activity, etc. can be + expressed. The issuing admission authority should always be indicated (field + admissionAuthority), whenever a registration number is presented. Still, + information on admissions can be given without indicating an admission or a + naming authority by the exclusive use of the component professionItems. In + this case the certification authority is responsible for the verification of + the admission information. +

+

+

+ This attribute is single-valued. Still, several admissions can be captured in + the sequence structure of the component contentsOfAdmissions of + AdmissionSyntax or in the component professionInfos of Admissions. The + component admissionAuthority of AdmissionSyntax serves as default value for + the component admissionAuthority of Admissions. Within the latter component + the default value can be overwritten, in case that another authority is + responsible. The component namingAuthority of Admissions serves as a default + value for the component namingAuthority of ProfessionInfo. Within the latter + component the default value can be overwritten, in case that another naming + authority needs to be recorded. +

+ The length of the string objects is limited to 128 characters. It is + recommended to indicate a namingAuthorityURL in all issued attribute + certificates. If a namingAuthorityURL is indicated, the field professionItems + of ProfessionInfo should contain only registered titles. If the field + professionOIDs exists, it has to contain the OIDs of the professions listed + in professionItems in the same order. In general, the field professionInfos + should contain only one entry, unless the admissions that are to be listed + are logically connected (e.g. they have been issued under the same admission + number). + + @see Org.BouncyCastle.Asn1.IsisMtt.X509.Admissions + @see Org.BouncyCastle.Asn1.IsisMtt.X509.ProfessionInfo + @see Org.BouncyCastle.Asn1.IsisMtt.X509.NamingAuthority + + + Constructor from Asn1Sequence. +

+ The sequence is of type ProcurationSyntax: +

+

+                 AdmissionSyntax ::= SEQUENCE
+                 {
+                   admissionAuthority GeneralName OPTIONAL,
+                   contentsOfAdmissions SEQUENCE OF Admissions
+                 }
+             

+ Admissions ::= SEQUENCE + { + admissionAuthority [0] EXPLICIT GeneralName OPTIONAL + namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL + professionInfos SEQUENCE OF ProfessionInfo + } +

+ NamingAuthority ::= SEQUENCE + { + namingAuthorityId OBJECT IDENTIFIER OPTIONAL, + namingAuthorityUrl IA5String OPTIONAL, + namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL + } +

+ ProfessionInfo ::= SEQUENCE + { + namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL, + professionItems SEQUENCE OF DirectoryString (SIZE(1..128)), + professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL, + registrationNumber PrintableString(SIZE(1..128)) OPTIONAL, + addProfessionInfo OCTET STRING OPTIONAL + } +

+ + @param seq The ASN.1 sequence. +
+ + Constructor from given details. + + @param admissionAuthority The admission authority. + @param contentsOfAdmissions The admissions. + + + Produce an object suitable for an Asn1OutputStream. +

+ Returns: +

+

+                 AdmissionSyntax ::= SEQUENCE
+                 {
+                   admissionAuthority GeneralName OPTIONAL,
+                   contentsOfAdmissions SEQUENCE OF Admissions
+                 }
+             

+ Admissions ::= SEQUENCE + { + admissionAuthority [0] EXPLICIT GeneralName OPTIONAL + namingAuthority [1] EXPLICIT NamingAuthority OPTIONAL + professionInfos SEQUENCE OF ProfessionInfo + } +

+ NamingAuthority ::= SEQUENCE + { + namingAuthorityId OBJECT IDENTIFIER OPTIONAL, + namingAuthorityUrl IA5String OPTIONAL, + namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL + } +

+ ProfessionInfo ::= SEQUENCE + { + namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL, + professionItems SEQUENCE OF DirectoryString (SIZE(1..128)), + professionOIDs SEQUENCE OF OBJECT IDENTIFIER OPTIONAL, + registrationNumber PrintableString(SIZE(1..128)) OPTIONAL, + addProfessionInfo OCTET STRING OPTIONAL + } +

+ + @return an Asn1Object +
+ + @return Returns the admissionAuthority if present, null otherwise. + + + @return Returns the contentsOfAdmissions. + + + A declaration of majority. +

+

+                      DeclarationOfMajoritySyntax ::= CHOICE
+                      {
+                        notYoungerThan [0] IMPLICIT INTEGER,
+                        fullAgeAtCountry [1] IMPLICIT SEQUENCE
+                        {
+                          fullAge BOOLEAN DEFAULT TRUE,
+                          country PrintableString (SIZE(2))
+                        }
+                        dateOfBirth [2] IMPLICIT GeneralizedTime
+                      }
+            
+

+ fullAgeAtCountry indicates the majority of the owner with respect to the laws + of a specific country. + + + Produce an object suitable for an Asn1OutputStream. +

+ Returns: +

+

+                       DeclarationOfMajoritySyntax ::= CHOICE
+                       {
+                         notYoungerThan [0] IMPLICIT INTEGER,
+                         fullAgeAtCountry [1] IMPLICIT SEQUENCE
+                         {
+                           fullAge BOOLEAN DEFAULT TRUE,
+                           country PrintableString (SIZE(2))
+                         }
+                         dateOfBirth [2] IMPLICIT GeneralizedTime
+                       }
+             
+ + @return an Asn1Object +
+ + @return notYoungerThan if that's what we are, -1 otherwise + + + Monetary limit for transactions. The QcEuMonetaryLimit QC statement MUST be + used in new certificates in place of the extension/attribute MonetaryLimit + since January 1, 2004. For the sake of backward compatibility with + certificates already in use, components SHOULD support MonetaryLimit (as well + as QcEuLimitValue). +

+ Indicates a monetary limit within which the certificate holder is authorized + to act. (This value DOES NOT express a limit on the liability of the + certification authority). +

+

+               MonetaryLimitSyntax ::= SEQUENCE
+               {
+                 currency PrintableString (SIZE(3)),
+                 amount INTEGER,
+                 exponent INTEGER
+               }
+            
+

+ currency must be the ISO code. +

+ value = amount�10*exponent + + + Constructor from a given details. +

+

+ value = amount�10^exponent + + @param currency The currency. Must be the ISO code. + @param amount The amount + @param exponent The exponent + + + Produce an object suitable for an Asn1OutputStream. +

+ Returns: +

+

+                MonetaryLimitSyntax ::= SEQUENCE
+                {
+                  currency PrintableString (SIZE(3)),
+                  amount INTEGER,
+                  exponent INTEGER
+                }
+             
+ + @return an Asn1Object +
+ + Names of authorities which are responsible for the administration of title + registers. + +
+                        NamingAuthority ::= SEQUENCE 
+                        {
+                          namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+                          namingAuthorityUrl IA5String OPTIONAL,
+                          namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+                        }
+            
+ @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax + +
+ + Profession OIDs should always be defined under the OID branch of the + responsible naming authority. At the time of this writing, the work group + �Recht, Wirtschaft, Steuern� (�Law, Economy, Taxes�) is registered as the + first naming authority under the OID id-isismtt-at-namingAuthorities. + + + Constructor from Asn1Sequence. +

+

+

+                         NamingAuthority ::= SEQUENCE
+                         {
+                           namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+                           namingAuthorityUrl IA5String OPTIONAL,
+                           namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+                         }
+             
+ + @param seq The ASN.1 sequence. +
+ + @return Returns the namingAuthorityID. + + + @return Returns the namingAuthorityText. + + + @return Returns the namingAuthorityUrl. + + + Constructor from given details. +

+ All parameters can be combined. + + @param namingAuthorityID ObjectIdentifier for naming authority. + @param namingAuthorityUrl URL for naming authority. + @param namingAuthorityText Textual representation of naming authority. + + + Produce an object suitable for an Asn1OutputStream. +

+ Returns: +

+

+                         NamingAuthority ::= SEQUENCE
+                         {
+                           namingAuthorityID OBJECT IDENTIFIER OPTIONAL,
+                           namingAuthorityUrl IA5String OPTIONAL,
+                           namingAuthorityText DirectoryString(SIZE(1..128)) OPTIONAL
+                         }
+             
+ + @return an Asn1Object +
+ + Attribute to indicate that the certificate holder may sign in the name of a + third person. +

+ ISIS-MTT PROFILE: The corresponding ProcurationSyntax contains either the + name of the person who is represented (subcomponent thirdPerson) or a + reference to his/her base certificate (in the component signingFor, + subcomponent certRef), furthermore the optional components country and + typeSubstitution to indicate the country whose laws apply, and respectively + the type of procuration (e.g. manager, procuration, custody). +

+

+ ISIS-MTT PROFILE: The GeneralName MUST be of type directoryName and MAY only + contain: - RFC3039 attributes, except pseudonym (countryName, commonName, + surname, givenName, serialNumber, organizationName, organizationalUnitName, + stateOrProvincename, localityName, postalAddress) and - SubjectDirectoryName + attributes (title, dateOfBirth, placeOfBirth, gender, countryOfCitizenship, + countryOfResidence and NameAtBirth). +

+
+                          ProcurationSyntax ::= SEQUENCE {
+                            country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+                            typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+                            signingFor [3] EXPLICIT SigningFor 
+                          }
+                          
+                          SigningFor ::= CHOICE 
+                          { 
+                            thirdPerson GeneralName,
+                            certRef IssuerSerial 
+                          }
+            
+ +
+ + Constructor from Asn1Sequence. +

+ The sequence is of type ProcurationSyntax: +

+

+                           ProcurationSyntax ::= SEQUENCE {
+                             country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+                             typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+                             signingFor [3] EXPLICIT SigningFor
+                           }
+             

+ SigningFor ::= CHOICE + { + thirdPerson GeneralName, + certRef IssuerSerial + } +

+ + @param seq The ASN.1 sequence. +
+ + Constructor from a given details. +

+

+ Either generalName or certRef MUST be + null. + + @param country The country code whose laws apply. + @param typeOfSubstitution The type of procuration. + @param certRef Reference to certificate of the person who is represented. + + + Constructor from a given details. +

+

+ Either generalName or certRef MUST be + null. + + @param country The country code whose laws apply. + @param typeOfSubstitution The type of procuration. + @param thirdPerson The GeneralName of the person who is represented. + + + Produce an object suitable for an Asn1OutputStream. +

+ Returns: +

+

+                           ProcurationSyntax ::= SEQUENCE {
+                             country [1] EXPLICIT PrintableString(SIZE(2)) OPTIONAL,
+                             typeOfSubstitution [2] EXPLICIT DirectoryString (SIZE(1..128)) OPTIONAL,
+                             signingFor [3] EXPLICIT SigningFor
+                           }
+             

+ SigningFor ::= CHOICE + { + thirdPerson GeneralName, + certRef IssuerSerial + } +

+ + @return an Asn1Object +
+ + Professions, specializations, disciplines, fields of activity, etc. + +
+                          ProfessionInfo ::= SEQUENCE 
+                          {
+                            namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+                            professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+                            professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+                            registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+                            addProfessionInfo OCTET STRING OPTIONAL 
+                          }
+            
+ + @see Org.BouncyCastle.Asn1.IsisMtt.X509.AdmissionSyntax +
+ + Rechtsanw�ltin + + + Rechtsanwalt + + + Rechtsbeistand + + + Steuerberaterin + + + Steuerberater + + + Steuerbevollm�chtigte + + + Steuerbevollm�chtigter + + + Notarin + + + Notar + + + Notarvertreterin + + + Notarvertreter + + + Notariatsverwalterin + + + Notariatsverwalter + + + Wirtschaftspr�ferin + + + Wirtschaftspr�fer + + + Vereidigte Buchpr�ferin + + + Vereidigter Buchpr�fer + + + Patentanw�ltin + + + Patentanwalt + + + Constructor from Asn1Sequence. +

+

+

+                           ProfessionInfo ::= SEQUENCE
+                           {
+                             namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+                             professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+                             professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+                             registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+                             addProfessionInfo OCTET STRING OPTIONAL
+                           }
+             
+ + @param seq The ASN.1 sequence. +
+ + Constructor from given details. +

+ professionItems is mandatory, all other parameters are + optional. + + @param namingAuthority The naming authority. + @param professionItems Directory strings of the profession. + @param professionOids DERObjectIdentfier objects for the + profession. + @param registrationNumber Registration number. + @param addProfessionInfo Additional infos in encoded form. + + + Produce an object suitable for an Asn1OutputStream. +

+ Returns: +

+

+                           ProfessionInfo ::= SEQUENCE
+                           {
+                             namingAuthority [0] EXPLICIT NamingAuthority OPTIONAL,
+                             professionItems SEQUENCE OF DirectoryString (SIZE(1..128)),
+                             professionOids SEQUENCE OF OBJECT IDENTIFIER OPTIONAL,
+                             registrationNumber PrintableString(SIZE(1..128)) OPTIONAL,
+                             addProfessionInfo OCTET STRING OPTIONAL
+                           }
+             
+ + @return an Asn1Object +
+ + @return Returns the addProfessionInfo. + + + @return Returns the namingAuthority. + + + @return Returns the professionItems. + + + @return Returns the professionOids. + + + @return Returns the registrationNumber. + + + Some other restriction regarding the usage of this certificate. +

+

+             RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+            
+
+ + Constructor from DirectoryString. +

+ The DirectoryString is of type RestrictionSyntax: +

+

+                  RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+             
+ + @param restriction A IAsn1String. +
+ + Constructor from a given details. + + @param restriction The description of the restriction. + + + Produce an object suitable for an Asn1OutputStream. +

+ Returns: +

+

+                  RestrictionSyntax ::= DirectoryString (SIZE(1..1024))
+             

+

+ + @return an Asn1Object +
+ + Produce an object suitable for an Asn1OutputStream. +
+            cast5CBCParameters ::= Sequence {
+                                      iv         OCTET STRING DEFAULT 0,
+                                             -- Initialization vector
+                                      keyLength  Integer
+                                             -- Key length, in bits
+                                 }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            IDEA-CBCPar ::= Sequence {
+                                 iv    OCTET STRING OPTIONAL -- exactly 8 octets
+                             }
+            
+
+ + The NetscapeCertType object. +
+               NetscapeCertType ::= BIT STRING {
+                    SSLClient               (0),
+                    SSLServer               (1),
+                    S/MIME                  (2),
+                    Object Signing          (3),
+                    Reserved                (4),
+                    SSL CA                  (5),
+                    S/MIME CA               (6),
+                    Object Signing CA       (7) }
+            
+
+ + Basic constructor. + + @param usage - the bitwise OR of the Key Usage flags giving the + allowed uses for the key. + e.g. (X509NetscapeCertType.sslCA | X509NetscapeCertType.smimeCA) + + + This is designed to parse + the PublicKeyAndChallenge created by the KEYGEN tag included by + Mozilla based browsers. +
+              PublicKeyAndChallenge ::= SEQUENCE {
+                spki SubjectPublicKeyInfo,
+                challenge IA5STRING
+              }
+            
+              
+
+ + + KMACwithSHAKE128-params ::= SEQUENCE { + kMACOutputLength INTEGER DEFAULT 256, -- Output length in bits + customizationString OCTET STRING DEFAULT ''H + } + + + + + KMACwithSHAKE256-params ::= SEQUENCE { + kMACOutputLength INTEGER DEFAULT 512, -- Output length in bits + customizationString OCTET STRING DEFAULT ''H + } + + + + Utility class for fetching curves using their NIST names as published in FIPS-PUB 186-3 + + + return the X9ECParameters object for the named curve represented by + the passed in object identifier. Null if the curve isn't present. + + @param oid an object identifier representing a named curve, if present. + + + return the object identifier signified by the passed in name. Null + if there is no object identifier associated with name. + + @return the object identifier associated with name, if present. + + + return the named curve name represented by the given object identifier. + + + returns an enumeration containing the name strings for curves + contained in this structure. + + + 2.16.840.1.101.3.4.3.5 + + + 2.16.840.1.101.3.4.3.6 + + + 2.16.840.1.101.3.4.3.7 + + + 2.16.840.1.101.3.4.3.8 + + + 2.16.840.1.101.3.4.3.9 + + + 2.16.840.1.101.3.4.3.10 + + + 2.16.840.1.101.3.4.3.11 + + + 2.16.840.1.101.3.4.3.12 + + + 2.16.840.1.101.3.4.3.9 + + + 2.16.840.1.101.3.4.3.10 + + + 2.16.840.1.101.3.4.3.11 + + + 2.16.840.1.101.3.4.3.12 + + + From RFC 3657 + + + Produce an object suitable for an Asn1OutputStream. +
+            BasicOcspResponse       ::= Sequence {
+                 tbsResponseData      ResponseData,
+                 signatureAlgorithm   AlgorithmIdentifier,
+                 signature            BIT STRING,
+                 certs                [0] EXPLICIT Sequence OF Certificate OPTIONAL }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            CertID          ::=     Sequence {
+                hashAlgorithm       AlgorithmIdentifier,
+                issuerNameHash      OCTET STRING, -- Hash of Issuer's DN
+                issuerKeyHash       OCTET STRING, -- Hash of Issuers public key
+                serialNumber        CertificateSerialNumber }
+            
+
+ + create a CertStatus object with a tag of zero. + + + Produce an object suitable for an Asn1OutputStream. +
+             CertStatus ::= CHOICE {
+                             good        [0]     IMPLICIT Null,
+                             revoked     [1]     IMPLICIT RevokedInfo,
+                             unknown     [2]     IMPLICIT UnknownInfo }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            CrlID ::= Sequence {
+                crlUrl               [0]     EXPLICIT IA5String OPTIONAL,
+                crlNum               [1]     EXPLICIT Integer OPTIONAL,
+                crlTime              [2]     EXPLICIT GeneralizedTime OPTIONAL }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            OcspRequest     ::=     Sequence {
+                tbsRequest                  TBSRequest,
+                optionalSignature   [0]     EXPLICIT Signature OPTIONAL }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            OcspResponse ::= Sequence {
+                responseStatus         OcspResponseStatus,
+                responseBytes          [0] EXPLICIT ResponseBytes OPTIONAL }
+            
+
+ + The OcspResponseStatus enumeration. +
+            OcspResponseStatus ::= Enumerated {
+                successful            (0),  --Response has valid confirmations
+                malformedRequest      (1),  --Illegal confirmation request
+                internalError         (2),  --Internal error in issuer
+                tryLater              (3),  --Try again later
+                                            --(4) is not used
+                sigRequired           (5),  --Must sign the request
+                unauthorized          (6)   --Request unauthorized
+            }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            Request         ::=     Sequence {
+                reqCert                     CertID,
+                singleRequestExtensions     [0] EXPLICIT Extensions OPTIONAL }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            ResponderID ::= CHOICE {
+                 byName          [1] Name,
+                 byKey           [2] KeyHash }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            ResponseBytes ::=       Sequence {
+                responseType   OBJECT IDENTIFIER,
+                response       OCTET STRING }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            ResponseData ::= Sequence {
+                version              [0] EXPLICIT Version DEFAULT v1,
+                responderID              ResponderID,
+                producedAt               GeneralizedTime,
+                responses                Sequence OF SingleResponse,
+                responseExtensions   [1] EXPLICIT Extensions OPTIONAL }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            RevokedInfo ::= Sequence {
+                 revocationTime              GeneralizedTime,
+                 revocationReason    [0]     EXPLICIT CRLReason OPTIONAL }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            ServiceLocator ::= Sequence {
+                issuer    Name,
+                locator   AuthorityInfoAccessSyntax OPTIONAL }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            Signature       ::=     Sequence {
+                signatureAlgorithm      AlgorithmIdentifier,
+                signature               BIT STRING,
+                certs               [0] EXPLICIT Sequence OF Certificate OPTIONAL}
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+             SingleResponse ::= Sequence {
+                     certID                       CertID,
+                     certStatus                   CertStatus,
+                     thisUpdate                   GeneralizedTime,
+                     nextUpdate         [0]       EXPLICIT GeneralizedTime OPTIONAL,
+                     singleExtensions   [1]       EXPLICIT Extensions OPTIONAL }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            TBSRequest      ::=     Sequence {
+                version             [0]     EXPLICIT Version DEFAULT v1,
+                requestorName       [1]     EXPLICIT GeneralName OPTIONAL,
+                requestList                 Sequence OF Request,
+                requestExtensions   [2]     EXPLICIT Extensions OPTIONAL }
+            
+
+ + class for breaking up an Oid into it's component tokens, ala + java.util.StringTokenizer. We need this class as some of the + lightweight Java environment don't support classes like + StringTokenizer. + + + return an Attribute object from the given object. + + @param o the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            Attr ::= Sequence {
+                attrType OBJECT IDENTIFIER,
+                attrValues Set OF AttributeValue
+            }
+            
+
+ + Pkcs10 Certfication request object. +
+            CertificationRequest ::= Sequence {
+              certificationRequestInfo  CertificationRequestInfo,
+              signatureAlgorithm        AlgorithmIdentifier{{ SignatureAlgorithms }},
+              signature                 BIT STRING
+            }
+            
+
+ + Pkcs10 CertificationRequestInfo object. +
+              CertificationRequestInfo ::= Sequence {
+               version             Integer { v1(0) } (v1,...),
+               subject             Name,
+               subjectPKInfo   SubjectPublicKeyInfo{{ PKInfoAlgorithms }},
+               attributes          [0] Attributes{{ CRIAttributes }}
+              }
+            
+              Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }}
+            
+              Attr { ATTRIBUTE:IOSet } ::= Sequence {
+                type    ATTRIBUTE.&id({IOSet}),
+                values  Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
+              }
+             
+
+ + Produce an object suitable for an Asn1OutputStream. +
+            ContentInfo ::= Sequence {
+                     contentType ContentType,
+                     content
+                     [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
+            
+
+ + The EncryptedData object. +
+                  EncryptedData ::= Sequence {
+                       version Version,
+                       encryptedContentInfo EncryptedContentInfo
+                  }
+            
+            
+                  EncryptedContentInfo ::= Sequence {
+                      contentType ContentType,
+                      contentEncryptionAlgorithm  ContentEncryptionAlgorithmIdentifier,
+                      encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
+                }
+            
+                EncryptedContent ::= OCTET STRING
+             
+
+ + Produce an object suitable for an Asn1OutputStream. +
+             EncryptedPrivateKeyInfo ::= Sequence {
+                  encryptionAlgorithm AlgorithmIdentifier {{KeyEncryptionAlgorithms}},
+                  encryptedData EncryptedData
+             }
+            
+             EncryptedData ::= OCTET STRING
+            
+             KeyEncryptionAlgorithms ALGORITHM-IDENTIFIER ::= {
+                      ... -- For local profiles
+             }
+             
+
+ +
+            MacData ::= SEQUENCE {
+                mac      DigestInfo,
+                macSalt  OCTET STRING,
+                iterations INTEGER DEFAULT 1
+                -- Note: The default is for historic reasons and its use is deprecated. A
+                -- higher value, like 1024 is recommended.
+            
+ @return the basic DERObject construction. +
+ + the infamous Pfx from Pkcs12 + + + PKCS#1: 1.2.840.113549.1.1.15 + + + PKCS#1: 1.2.840.113549.1.1.16 + + +
+             id-alg-AEADChaCha20Poly1305 OBJECT IDENTIFIER ::=
+             { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
+                pkcs9(9) smime(16) alg(3) 18 }
+            
+             AEADChaCha20Poly1305Nonce ::= OCTET STRING (SIZE(12))
+             
+
+ + PKCS#9: 1.2.840.113549.1.9.16.2.37 - RFC 4108 + + + PKCS#9: 1.2.840.113549.1.9.16.2.38 - RFC 4108 + + + PKCS#9: 1.2.840.113549.1.9.16.2.54 RFC7030 + + + PKCS#9: 1.2.840.113549.1.9.16.2.43 RFC7030 + + + PKCS#9: 1.2.840.113549.1.9.16.2.40 RFC7030 + + + RFC 5958 + +
+              [IMPLICIT TAGS]
+            
+              OneAsymmetricKey ::= SEQUENCE {
+                  version                   Version,
+                  privateKeyAlgorithm       PrivateKeyAlgorithmIdentifier,
+                  privateKey                PrivateKey,
+                  attributes            [0] Attributes OPTIONAL,
+                  ...,
+                  [[2: publicKey        [1] PublicKey OPTIONAL ]],
+                  ...
+              }
+            
+              PrivateKeyInfo ::= OneAsymmetricKey
+            
+              Version ::= INTEGER { v1(0), v2(1) } (v1, ..., v2)
+            
+              PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
+                                                 { PUBLIC-KEY,
+                                                   { PrivateKeyAlgorithms } }
+            
+              PrivateKey ::= OCTET STRING
+                                 -- Content varies based on type of key.  The
+                                 -- algorithm identifier dictates the format of
+                                 -- the key.
+            
+              PublicKey ::= BIT STRING
+                                 -- Content varies based on type of key.  The
+                                 -- algorithm identifier dictates the format of
+                                 -- the key.
+            
+              Attributes ::= SET OF Attribute { { OneAsymmetricKeyAttributes } }
+              
+
+ + Return true if a public key is present, false otherwise. + + + For when the public key is an ASN.1 encoding. + + + Return the public key as a raw bit string. + + + The default version + + +
+              RSAES-OAEP-params ::= SEQUENCE {
+                 hashAlgorithm      [0] OAEP-PSSDigestAlgorithms     DEFAULT sha1,
+                 maskGenAlgorithm   [1] PKCS1MGFAlgorithms  DEFAULT mgf1SHA1,
+                 pSourceAlgorithm   [2] PKCS1PSourceAlgorithms  DEFAULT pSpecifiedEmpty
+               }
+            
+               OAEP-PSSDigestAlgorithms    ALGORITHM-IDENTIFIER ::= {
+                 { OID id-sha1 PARAMETERS NULL   }|
+                 { OID id-sha256 PARAMETERS NULL }|
+                 { OID id-sha384 PARAMETERS NULL }|
+                 { OID id-sha512 PARAMETERS NULL },
+                 ...  -- Allows for future expansion --
+               }
+               PKCS1MGFAlgorithms    ALGORITHM-IDENTIFIER ::= {
+                 { OID id-mgf1 PARAMETERS OAEP-PSSDigestAlgorithms },
+                ...  -- Allows for future expansion --
+               }
+               PKCS1PSourceAlgorithms    ALGORITHM-IDENTIFIER ::= {
+                 { OID id-pSpecified PARAMETERS OCTET STRING },
+                 ...  -- Allows for future expansion --
+              }
+             
+ @return the asn1 primitive representing the parameters. +
+ + This outputs the key in Pkcs1v2 format. +
+                  RsaPrivateKey ::= Sequence {
+                                      version Version,
+                                      modulus Integer, -- n
+                                      publicExponent Integer, -- e
+                                      privateExponent Integer, -- d
+                                      prime1 Integer, -- p
+                                      prime2 Integer, -- q
+                                      exponent1 Integer, -- d mod (p-1)
+                                      exponent2 Integer, -- d mod (q-1)
+                                      coefficient Integer -- (inverse of q) mod p
+                                  }
+            
+                  Version ::= Integer
+             
+

This routine is written to output Pkcs1 version 0, private keys.

+
+ + The default version + + +
+             RSASSA-PSS-params ::= SEQUENCE {
+               hashAlgorithm      [0] OAEP-PSSDigestAlgorithms  DEFAULT sha1,
+                maskGenAlgorithm   [1] PKCS1MGFAlgorithms  DEFAULT mgf1SHA1,
+                saltLength         [2] INTEGER  DEFAULT 20,
+                trailerField       [3] TrailerField  DEFAULT trailerFieldBC
+              }
+            
+             OAEP-PSSDigestAlgorithms    ALGORITHM-IDENTIFIER ::= {
+                { OID id-sha1 PARAMETERS NULL   }|
+                { OID id-sha256 PARAMETERS NULL }|
+                { OID id-sha384 PARAMETERS NULL }|
+                { OID id-sha512 PARAMETERS NULL },
+                ...  -- Allows for future expansion --
+             }
+            
+             PKCS1MGFAlgorithms    ALGORITHM-IDENTIFIER ::= {
+               { OID id-mgf1 PARAMETERS OAEP-PSSDigestAlgorithms },
+                ...  -- Allows for future expansion --
+             }
+            
+             TrailerField ::= INTEGER { trailerFieldBC(1) }
+             
+ @return the asn1 primitive representing the parameters. +
+ + a Pkcs#7 signed data object. + + + Produce an object suitable for an Asn1OutputStream. +
+             SignedData ::= Sequence {
+                 version Version,
+                 digestAlgorithms DigestAlgorithmIdentifiers,
+                 contentInfo ContentInfo,
+                 certificates
+                     [0] IMPLICIT ExtendedCertificatesAndCertificates
+                              OPTIONAL,
+                 crls
+                     [1] IMPLICIT CertificateRevocationLists OPTIONAL,
+                 signerInfos SignerInfos }
+            
+
+ + a Pkcs#7 signer info object. + + + Produce an object suitable for an Asn1OutputStream. +
+              SignerInfo ::= Sequence {
+                  version Version,
+                  issuerAndSerialNumber IssuerAndSerialNumber,
+                  digestAlgorithm DigestAlgorithmIdentifier,
+                  authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL,
+                  digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier,
+                  encryptedDigest EncryptedDigest,
+                  unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL
+              }
+            
+              EncryptedDigest ::= OCTET STRING
+            
+              DigestAlgorithmIdentifier ::= AlgorithmIdentifier
+            
+              DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
+             
+
+ + the elliptic curve private key object from SEC 1 + + + ECPrivateKey ::= SEQUENCE { + version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1), + privateKey OCTET STRING, + parameters [0] Parameters OPTIONAL, + publicKey [1] BIT STRING OPTIONAL } + + + return the X9ECParameters object for the named curve represented by + the passed in object identifier. Null if the curve isn't present. + + @param oid an object identifier representing a named curve, if present. + + + return the object identifier signified by the passed in name. Null + if there is no object identifier associated with name. + + @return the object identifier associated with name, if present. + + + return the named curve name represented by the given object identifier. + + + returns an enumeration containing the name strings for curves + contained in this structure. + + + EllipticCurve OBJECT IDENTIFIER ::= { + iso(1) identified-organization(3) certicom(132) curve(0) + } + + + Handler class for dealing with S/MIME Capabilities + + + general preferences + + + encryption algorithms preferences + + + return an Attr object from the given object. + + @param o the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + returns an ArrayList with 0 or more objects of all the capabilities + matching the passed in capability Oid. If the Oid passed is null the + entire set is returned. + + + Produce an object suitable for an Asn1OutputStream. +
+            SMIMECapabilities ::= Sequence OF SMIMECapability
+            
+
+ + general preferences + + + encryption algorithms preferences + + + Produce an object suitable for an Asn1OutputStream. +
+            SMIMECapability ::= Sequence {
+                capabilityID OBJECT IDENTIFIER,
+                parameters ANY DEFINED BY capabilityID OPTIONAL
+            }
+            
+
+ + Handler for creating a vector S/MIME Capabilities + + + The SmimeEncryptionKeyPreference object. +
+            SmimeEncryptionKeyPreference ::= CHOICE {
+                issuerAndSerialNumber   [0] IssuerAndSerialNumber,
+                receipentKeyId          [1] RecipientKeyIdentifier,
+                subjectAltKeyIdentifier [2] SubjectKeyIdentifier
+            }
+            
+
+ + @param sKeyId the subjectKeyIdentifier value (normally the X.509 one) + + + elliptic curves defined in "ECC Brainpool Standard Curves and Curve Generation" + http://www.ecc-brainpool.org/download/draft_pkix_additional_ecc_dp.txt + + + return the X9ECParameters object for the named curve represented by + the passed in object identifier. Null if the curve isn't present. + + @param oid an object identifier representing a named curve, if present. + + + return the object identifier signified by the passed in name. Null + if there is no object identifier associated with name. + + @return the object identifier associated with name, if present. + + + return the named curve name represented by the given object identifier. + + + returns an enumeration containing the name strings for curves + contained in this structure. + + +
+            Accuracy ::= SEQUENCE {
+                        seconds        INTEGER              OPTIONAL,
+                        millis     [0] INTEGER  (1..999)    OPTIONAL,
+                        micros     [1] INTEGER  (1..999)    OPTIONAL
+                        }
+            
+
+ +
+               MessageImprint ::= SEQUENCE  {
+                  hashAlgorithm                AlgorithmIdentifier,
+                  hashedMessage                OCTET STRING  }
+            
+
+ +
+            TimeStampReq ::= SEQUENCE  {
+             version                      INTEGER  { v1(1) },
+             messageImprint               MessageImprint,
+               --a hash algorithm OID and the hash value of the data to be
+               --time-stamped
+             reqPolicy             TSAPolicyId              OPTIONAL,
+             nonce                 INTEGER                  OPTIONAL,
+             certReq               BOOLEAN                  DEFAULT FALSE,
+             extensions            [0] IMPLICIT Extensions  OPTIONAL
+            }
+            
+
+ +
+            TimeStampResp ::= SEQUENCE  {
+              status                  PkiStatusInfo,
+              timeStampToken          TimeStampToken     OPTIONAL  }
+            
+
+ +
+            
+                 TstInfo ::= SEQUENCE  {
+                    version                      INTEGER  { v1(1) },
+                    policy                       TSAPolicyId,
+                    messageImprint               MessageImprint,
+                      -- MUST have the same value as the similar field in
+                      -- TimeStampReq
+                    serialNumber                 INTEGER,
+                     -- Time-Stamping users MUST be ready to accommodate integers
+                     -- up to 160 bits.
+                    genTime                      GeneralizedTime,
+                    accuracy                     Accuracy                 OPTIONAL,
+                    ordering                     BOOLEAN             DEFAULT FALSE,
+                    nonce                        INTEGER                  OPTIONAL,
+                      -- MUST be present if the similar field was present
+                      -- in TimeStampReq.  In that case it MUST have the same value.
+                    tsa                          [0] GeneralName          OPTIONAL,
+                    extensions                   [1] IMPLICIT Extensions   OPTIONAL  }
+            
+             
+
+ + + Base OID: 1.2.804.2.1.1.1 + + + DSTU4145 Little Endian presentation. OID: 1.2.804.2.1.1.1.1.3.1.1 + + + DSTU4145 Big Endian presentation. OID: 1.2.804.2.1.1.1.1.3.1.1.1 + + + DSTU7564 256-bit digest presentation. + + + DSTU7564 384-bit digest presentation. + + + DSTU7564 512-bit digest presentation. + + + DSTU7564 256-bit mac presentation. + + + DSTU7564 384-bit mac presentation. + + + DSTU7564 512-bit mac presentation. + + + DSTU7624 in ECB mode with 128 bit block/key presentation + + + DSTU7624 in ECB mode with 256 bit block/key presentation + + + DSTU7624 in ECB mode with 512 bit block/key presentation + + + DSTU7624 in CTR mode with 128 bit block/key presentation + + + DSTU7624 in CTR mode with 256 bit block/key presentation + + + DSTU7624 in CTR mode with 512 bit block/key presentation + + + DSTU7624 in CFB mode with 128 bit block/key presentation + + + DSTU7624 in CFB mode with 256 bit block/key presentation + + + DSTU7624 in CFB mode with 512 bit block/key presentation + + + DSTU7624 in MAC mode with 128 bit block/key presentation + + + DSTU7624 in MAC mode with 256 bit block/key presentation + + + DSTU7624 in MAC mode with 512 bit block/key presentation + + + DSTU7624 in CBC mode with 128 bit block/key presentation + + + DSTU7624 in CBC mode with 256 bit block/key presentation + + + DSTU7624 in CBC mode with 512 bit block/key presentation + + + DSTU7624 in OFB mode with 128 bit block/key presentation + + + DSTU7624 in OFB mode with 256 bit block/key presentation + + + DSTU7624 in OFB mode with 512 bit block/key presentation + + + DSTU7624 in GMAC (GCM witout encryption) mode with 128 bit block/key presentation + + + DSTU7624 in GMAC (GCM witout encryption) mode with 256 bit block/key presentation + + + DSTU7624 in GMAC (GCM witout encryption) mode with 512 bit block/key presentation + + + DSTU7624 in CCM mode with 128 bit block/key presentation + + + DSTU7624 in CCM mode with 256 bit block/key presentation + + + DSTU7624 in CCM mode with 512 bit block/key presentation + + + DSTU7624 in XTS mode with 128 bit block/key presentation + + + DSTU7624 in XTS mode with 256 bit block/key presentation + + + DSTU7624 in XTS mode with 512 bit block/key presentation + + + DSTU7624 in key wrap (KW) mode with 128 bit block/key presentation + + + DSTU7624 in key wrap (KW) mode with 256 bit block/key presentation + + + DSTU7624 in key wrap (KW) mode with 512 bit block/key presentation + + + dump a Der object as a formatted string with indentation + + @param obj the Asn1Object to be dumped out. + + + dump out a DER object as a formatted string, in non-verbose mode + + @param obj the Asn1Encodable to be dumped out. + @return the resulting string. + + + Dump out the object as a string + + @param obj the Asn1Encodable to be dumped out. + @param verbose if true, dump out the contents of octet and bit strings. + @return the resulting string. + + + Holding class for the AttributeTypeAndValue structures that make up an RDN. + + +
+            AttributeTypeAndValue ::= SEQUENCE {
+                      type         OBJECT IDENTIFIER,
+                      value        ANY DEFINED BY type }
+            
+ @return a basic ASN.1 object representation. +
+ +
+             DirectoryString ::= CHOICE {
+               teletexString               TeletexString (SIZE (1..MAX)),
+               printableString             PrintableString (SIZE (1..MAX)),
+               universalString             UniversalString (SIZE (1..MAX)),
+               utf8String                  UTF8String (SIZE (1..MAX)),
+               bmpString                   BMPString (SIZE (1..MAX))  }
+            
+
+ + Holding class for a single Relative Distinguished Name (RDN). + + + Create a single valued RDN. + + @param oid RDN type. + @param value RDN value. + + + Create a multi-valued RDN. + + @param aAndVs attribute type/value pairs making up the RDN + + + Return the number of AttributeTypeAndValue objects in this RDN, + + @return size of RDN, greater than 1 if multi-valued. + + + *
+                     * RelativeDistinguishedName ::=
+                     *                     SET OF AttributeTypeAndValue
+            
+                     * AttributeTypeAndValue ::= SEQUENCE {
+                     *        type     AttributeType,
+                     *        value    AttributeValue }
+                     * 
+ * @return this object as its ASN1Primitive type +
+ + The AccessDescription object. +
+            AccessDescription  ::=  SEQUENCE {
+                  accessMethod          OBJECT IDENTIFIER,
+                  accessLocation        GeneralName  }
+            
+
+ + create an AccessDescription with the oid and location provided. + + + + @return the access method. + + + + @return the access location + + + + Return the OID in the Algorithm entry of this identifier. + + + + + Return the parameters structure in the Parameters entry of this identifier. + + + + Produce an object suitable for an Asn1OutputStream. +
+                 AlgorithmIdentifier ::= Sequence {
+                                       algorithm OBJECT IDENTIFIER,
+                                       parameters ANY DEFINED BY algorithm OPTIONAL }
+            
+
+ + + Don't use this one if you are trying to be RFC 3281 compliant. + Use it for v1 attribute certificates only. + + Our GeneralNames structure + + + Produce an object suitable for an Asn1OutputStream. +
+             AttCertIssuer ::= CHOICE {
+                  v1Form   GeneralNames,  -- MUST NOT be used in this
+                                          -- profile
+                  v2Form   [0] V2Form     -- v2 only
+             }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+             AttCertValidityPeriod  ::= Sequence {
+                  notBeforeTime  GeneralizedTime,
+                  notAfterTime   GeneralizedTime
+             }
+            
+
+ + return an Attr object from the given object. + + @param o the object we want converted. + @exception ArgumentException if the object cannot be converted. + + + Produce an object suitable for an Asn1OutputStream. +
+            Attr ::= Sequence {
+                attrType OBJECT IDENTIFIER,
+                attrValues Set OF AttributeValue
+            }
+            
+
+ + @param obj + @return + + + Produce an object suitable for an Asn1OutputStream. +
+             AttributeCertificate ::= Sequence {
+                  acinfo               AttributeCertificateInfo,
+                  signatureAlgorithm   AlgorithmIdentifier,
+                  signatureValue       BIT STRING
+             }
+            
+
+ + Produce an object suitable for an Asn1OutputStream. +
+              AttributeCertificateInfo ::= Sequence {
+                   version              AttCertVersion -- version is v2,
+                   holder               Holder,
+                   issuer               AttCertIssuer,
+                   signature            AlgorithmIdentifier,
+                   serialNumber         CertificateSerialNumber,
+                   attrCertValidityPeriod   AttCertValidityPeriod,
+                   attributes           Sequence OF Attr,
+                   issuerUniqueID       UniqueIdentifier OPTIONAL,
+                   extensions           Extensions OPTIONAL
+              }
+            
+              AttCertVersion ::= Integer { v2(1) }
+             
+
+ + The AuthorityInformationAccess object. +
+             id-pe-authorityInfoAccess OBJECT IDENTIFIER ::= { id-pe 1 }
+            
+             AuthorityInfoAccessSyntax  ::=
+                  Sequence SIZE (1..MAX) OF AccessDescription
+             AccessDescription  ::=  Sequence {
+                   accessMethod          OBJECT IDENTIFIER,
+                   accessLocation        GeneralName  }
+            
+             id-ad OBJECT IDENTIFIER ::= { id-pkix 48 }
+             id-ad-caIssuers OBJECT IDENTIFIER ::= { id-ad 2 }
+             id-ad-ocsp OBJECT IDENTIFIER ::= { id-ad 1 }
+             
+
+ + create an AuthorityInformationAccess with the oid and location provided. + + + The AuthorityKeyIdentifier object. +
+             id-ce-authorityKeyIdentifier OBJECT IDENTIFIER ::=  { id-ce 35 }
+            
+               AuthorityKeyIdentifier ::= Sequence {
+                  keyIdentifier             [0] IMPLICIT KeyIdentifier           OPTIONAL,
+                  authorityCertIssuer       [1] IMPLICIT GeneralNames            OPTIONAL,
+                  authorityCertSerialNumber [2] IMPLICIT CertificateSerialNumber OPTIONAL  }
+            
+               KeyIdentifier ::= OCTET STRING
+             
+ +
+ + * + * Calulates the keyidentifier using a SHA1 hash over the BIT STRING + * from SubjectPublicKeyInfo as defined in RFC2459. + * + * Example of making a AuthorityKeyIdentifier: + *
+            	     *   SubjectPublicKeyInfo apki = new SubjectPublicKeyInfo((ASN1Sequence)new ASN1InputStream(
+            		 *       publicKey.getEncoded()).readObject());
+                     *   AuthorityKeyIdentifier aki = new AuthorityKeyIdentifier(apki);
+                     * 
+ * + * +
+ + create an AuthorityKeyIdentifier with the GeneralNames tag and + the serial number provided as well. + + + create an AuthorityKeyIdentifier with the GeneralNames tag and + the serial number provided. + + + create an AuthorityKeyIdentifier with a precomputed key identifier + + + create an AuthorityKeyIdentifier with a precomupted key identifier + and the GeneralNames tag and the serial number provided as well. + + + Produce an object suitable for an Asn1OutputStream. + + + create a cA=true object for the given path length constraint. + + @param pathLenConstraint + + + Produce an object suitable for an Asn1OutputStream. +
+            BasicConstraints := Sequence {
+               cA                  Boolean DEFAULT FALSE,
+               pathLenConstraint   Integer (0..MAX) OPTIONAL
+            }
+            
+
+ + PKIX RFC-2459 + + The X.509 v2 CRL syntax is as follows. For signature calculation, + the data that is to be signed is ASN.1 Der encoded. + +
+             CertificateList  ::=  Sequence  {
+                  tbsCertList          TbsCertList,
+                  signatureAlgorithm   AlgorithmIdentifier,
+                  signatureValue       BIT STRING  }
+             
+
+ + This class helps to support crossCerfificatePairs in a LDAP directory + according RFC 2587 + +
+                 crossCertificatePairATTRIBUTE::={
+                   WITH SYNTAX   CertificatePair
+                   EQUALITY MATCHING RULE certificatePairExactMatch
+                   ID joint-iso-ccitt(2) ds(5) attributeType(4) crossCertificatePair(40)}
+             
+ +
The forward elements of the crossCertificatePair attribute of a + CA's directory entry shall be used to store all, except self-issued + certificates issued to this CA. Optionally, the reverse elements of the + crossCertificatePair attribute, of a CA's directory entry may contain a + subset of certificates issued by this CA to other CAs. When both the forward + and the reverse elements are present in a single attribute value, issuer name + in one certificate shall match the subject name in the other and vice versa, + and the subject public key in one certificate shall be capable of verifying + the digital signature on the other certificate and vice versa. + + When a reverse element is present, the forward element value and the reverse + element value need not be stored in the same attribute value; in other words, + they can be stored in either a single attribute value or two attribute + values.
+ +
+                   CertificatePair ::= SEQUENCE {
+                     forward		[0]	Certificate OPTIONAL,
+                     reverse		[1]	Certificate OPTIONAL,
+                     -- at least one of the pair shall be present -- }
+             
+
+ + Constructor from Asn1Sequence. +

+ The sequence is of type CertificatePair: +

+

+                   CertificatePair ::= SEQUENCE {
+                     forward		[0]	Certificate OPTIONAL,
+                     reverse		[1]	Certificate OPTIONAL,
+                     -- at least one of the pair shall be present -- }
+             
+ + @param seq The ASN.1 sequence. +
+ + Constructor from a given details. + + @param forward Certificates issued to this CA. + @param reverse Certificates issued by this CA to other CAs. + + + Produce an object suitable for an Asn1OutputStream. +

+ Returns: +

+

+                   CertificatePair ::= SEQUENCE {
+                     forward		[0]	Certificate OPTIONAL,
+                     reverse		[1]	Certificate OPTIONAL,
+                     -- at least one of the pair shall be present -- }
+             
+ + @return a DERObject +
+ + @return Returns the forward. + + + @return Returns the reverse. + + + Construct a CertificatePolicies object containing one PolicyInformation. + + @param name the name to be contained. + + + Produce an object suitable for an ASN1OutputStream. +
+            CertificatePolicies ::= SEQUENCE SIZE {1..MAX} OF PolicyInformation
+            
+
+ + CertPolicyId, used in the CertificatePolicies and PolicyMappings + X509V3 Extensions. + +
+                 CertPolicyId ::= OBJECT IDENTIFIER
+             
+
+ + Return the distribution points making up the sequence. + + @return DistributionPoint[] + + + Produce an object suitable for an Asn1OutputStream. +
+            CrlDistPoint ::= Sequence SIZE {1..MAX} OF DistributionPoint
+            
+
+ + The CRLNumber object. +
+            CRLNumber::= Integer(0..MAX)
+            
+
+ + The CRLReason enumeration. +
+            CRLReason ::= Enumerated {
+             unspecified             (0),
+             keyCompromise           (1),
+             cACompromise            (2),
+             affiliationChanged      (3),
+             superseded              (4),
+             cessationOfOperation    (5),
+             certificateHold         (6),
+             removeFromCRL           (8),
+             privilegeWithdrawn      (9),
+             aACompromise           (10)
+            }
+            
+
+ + The DigestInfo object. +
+            DigestInfo::=Sequence{
+                     digestAlgorithm  AlgorithmIdentifier,
+                     digest OCTET STRING }
+            
+
+ + DisplayText class, used in + CertificatePolicies X509 V3 extensions (in policy qualifiers). + +

It stores a string in a chosen encoding. +

+             DisplayText ::= CHOICE {
+                  ia5String        IA5String      (SIZE (1..200)),
+                  visibleString    VisibleString  (SIZE (1..200)),
+                  bmpString        BMPString      (SIZE (1..200)),
+                  utf8String       UTF8String     (SIZE (1..200)) }
+             

+ @see PolicyQualifierInfo + @see PolicyInformation +
+ + Constant corresponding to ia5String encoding. + + + + Constant corresponding to bmpString encoding. + + + + Constant corresponding to utf8String encoding. + + + + Constant corresponding to visibleString encoding. + + + + Describe constant DisplayTextMaximumSize here. + + + + Creates a new DisplayText instance. + + @param type the desired encoding type for the text. + @param text the text to store. Strings longer than 200 + characters are truncated. + + + Creates a new DisplayText instance. + + @param text the text to encapsulate. Strings longer than 200 + characters are truncated. + + + Creates a new DisplayText instance. +

Useful when reading back a DisplayText class + from it's Asn1Encodable form.

+ + @param contents an Asn1Encodable instance. +
+ + Returns the stored string object. + + @return the stored text as a string. + + + The DistributionPoint object. +
+            DistributionPoint ::= Sequence {
+                 distributionPoint [0] DistributionPointName OPTIONAL,
+                 reasons           [1] ReasonFlags OPTIONAL,
+                 cRLIssuer         [2] GeneralNames OPTIONAL
+            }
+            
+
+ + The DistributionPointName object. +
+            DistributionPointName ::= CHOICE {
+                fullName                 [0] GeneralNames,
+                nameRelativeToCRLIssuer  [1] RDN
+            }
+            
+
+ + The extendedKeyUsage object. +
+                 extendedKeyUsage ::= Sequence SIZE (1..MAX) OF KeyPurposeId
+            
+
+ + Returns all extended key usages. + The returned ArrayList contains DerObjectIdentifier instances. + @return An ArrayList with all key purposes. + + + The GeneralName object. +
+             GeneralName ::= CHOICE {
+                  otherName                       [0]     OtherName,
+                  rfc822Name                      [1]     IA5String,
+                  dNSName                         [2]     IA5String,
+                  x400Address                     [3]     ORAddress,
+                  directoryName                   [4]     Name,
+                  ediPartyName                    [5]     EDIPartyName,
+                  uniformResourceIdentifier       [6]     IA5String,
+                  iPAddress                       [7]     OCTET STRING,
+                  registeredID                    [8]     OBJECT IDENTIFIER}
+            
+             OtherName ::= Sequence {
+                  type-id    OBJECT IDENTIFIER,
+                  value      [0] EXPLICIT ANY DEFINED BY type-id }
+            
+             EDIPartyName ::= Sequence {
+                  nameAssigner            [0]     DirectoryString OPTIONAL,
+                  partyName               [1]     DirectoryString }
+             
+
+ + When the subjectAltName extension contains an Internet mail address, + the address MUST be included as an rfc822Name. The format of an + rfc822Name is an "addr-spec" as defined in RFC 822 [RFC 822]. + + When the subjectAltName extension contains a domain name service + label, the domain name MUST be stored in the dNSName (an IA5String). + The name MUST be in the "preferred name syntax," as specified by RFC + 1034 [RFC 1034]. + + When the subjectAltName extension contains a URI, the name MUST be + stored in the uniformResourceIdentifier (an IA5String). The name MUST + be a non-relative URL, and MUST follow the URL syntax and encoding + rules specified in [RFC 1738]. The name must include both a scheme + (e.g., "http" or "ftp") and a scheme-specific-part. The scheme- + specific-part must include a fully qualified domain name or IP + address as the host. + + When the subjectAltName extension contains a iPAddress, the address + MUST be stored in the octet string in "network byte order," as + specified in RFC 791 [RFC 791]. The least significant bit (LSB) of + each octet is the LSB of the corresponding byte in the network + address. For IP Version 4, as specified in RFC 791, the octet string + MUST contain exactly four octets. For IP Version 6, as specified in + RFC 1883, the octet string MUST contain exactly sixteen octets [RFC + 1883]. + + + Create a GeneralName for the given tag from the passed in string. +

+ This constructor can handle: +

    +
  • rfc822Name
  • +
  • iPAddress
  • +
  • directoryName
  • +
  • dNSName
  • +
  • uniformResourceIdentifier
  • +
  • registeredID
  • +
+ For x400Address, otherName and ediPartyName there is no common string + format defined. +

+ Note: A directory name can be encoded in different ways into a byte + representation. Be aware of this if the byte representation is used for + comparing results. +

+ + @param tag tag number + @param name string representation of name + @throws ArgumentException if the string encoding is not correct or + not supported. +
+ + Construct a GeneralNames object containing one GeneralName. + The name to be contained. + + + Produce an object suitable for an Asn1OutputStream. +
+            GeneralNames ::= Sequence SIZE {1..MAX} OF GeneralName
+            
+
+ + Class for containing a restriction object subtrees in NameConstraints. See + RFC 3280. + +
+            
+                   GeneralSubtree ::= SEQUENCE
+                   {
+                     baseName                    GeneralName,
+                     minimum         [0]     BaseDistance DEFAULT 0,
+                     maximum         [1]     BaseDistance OPTIONAL
+                   }
+             
+ + @see org.bouncycastle.asn1.x509.NameConstraints + +
+ + Constructor from a given details. + + According RFC 3280, the minimum and maximum fields are not used with any + name forms, thus minimum MUST be zero, and maximum MUST be absent. +

+ If minimum is null, zero is assumed, if + maximum is null, maximum is absent.

+ + @param baseName + A restriction. + @param minimum + Minimum + + @param maximum + Maximum +
+ + Produce an object suitable for an Asn1OutputStream. + + Returns: + +
+                   GeneralSubtree ::= SEQUENCE
+                   {
+                     baseName                    GeneralName,
+                     minimum         [0]     BaseDistance DEFAULT 0,
+                     maximum         [1]     BaseDistance OPTIONAL
+                   }
+             
+ + @return a DERObject +
+ + The Holder object. +

+ For an v2 attribute certificate this is: + +

+                       Holder ::= SEQUENCE {
+                             baseCertificateID   [0] IssuerSerial OPTIONAL,
+                                      -- the issuer and serial number of
+                                      -- the holder's Public Key Certificate
+                             entityName          [1] GeneralNames OPTIONAL,
+                                      -- the name of the claimant or role
+                             objectDigestInfo    [2] ObjectDigestInfo OPTIONAL
+                                      -- used to directly authenticate the holder,
+                                      -- for example, an executable
+                       }
+            
+

+

+ For an v1 attribute certificate this is: + +

+                    subject CHOICE {
+                     baseCertificateID [0] IssuerSerial,
+                     -- associated with a Public Key Certificate
+                     subjectName [1] GeneralNames },
+                     -- associated with a name
+            
+

+
+ + Constructor for a holder for an v1 attribute certificate. + + @param tagObj The ASN.1 tagged holder object. + + + Constructor for a holder for an v2 attribute certificate. * + + @param seq The ASN.1 sequence. + + + Constructs a holder from a IssuerSerial. + @param baseCertificateID The IssuerSerial. + @param version The version of the attribute certificate. + + + Returns 1 for v2 attribute certificates or 0 for v1 attribute + certificates. + @return The version of the attribute certificate. + + + Constructs a holder with an entityName for v2 attribute certificates or + with a subjectName for v1 attribute certificates. + + @param entityName The entity or subject name. + + + Constructs a holder with an entityName for v2 attribute certificates or + with a subjectName for v1 attribute certificates. + + @param entityName The entity or subject name. + @param version The version of the attribute certificate. + + + Constructs a holder from an object digest info. + + @param objectDigestInfo The object digest info object. + + + Returns the entityName for an v2 attribute certificate or the subjectName + for an v1 attribute certificate. + + @return The entityname or subjectname. + + + The Holder object. +
+             Holder ::= Sequence {
+                   baseCertificateID   [0] IssuerSerial OPTIONAL,
+                            -- the issuer and serial number of
+                            -- the holder's Public Key Certificate
+                   entityName          [1] GeneralNames OPTIONAL,
+                            -- the name of the claimant or role
+                   objectDigestInfo    [2] ObjectDigestInfo OPTIONAL
+                            -- used to directly authenticate the holder,
+                            -- for example, an executable
+             }
+            
+
+ + Implementation of IetfAttrSyntax as specified by RFC3281. + + + + + + +
+            
+              IetfAttrSyntax ::= Sequence {
+                policyAuthority [0] GeneralNames OPTIONAL,
+                values Sequence OF CHOICE {
+                  octets OCTET STRING,
+                  oid OBJECT IDENTIFIER,
+                  string UTF8String
+                }
+              }
+            
+             
+
+ + Produce an object suitable for an Asn1OutputStream. +
+             IssuerSerial  ::=  Sequence {
+                  issuer         GeneralNames,
+                  serial         CertificateSerialNumber,
+                  issuerUid      UniqueIdentifier OPTIONAL
+             }
+            
+
+ +
+            IssuingDistributionPoint ::= SEQUENCE { 
+              distributionPoint          [0] DistributionPointName OPTIONAL, 
+              onlyContainsUserCerts      [1] BOOLEAN DEFAULT FALSE, 
+              onlyContainsCACerts        [2] BOOLEAN DEFAULT FALSE, 
+              onlySomeReasons            [3] ReasonFlags OPTIONAL, 
+              indirectCRL                [4] BOOLEAN DEFAULT FALSE,
+              onlyContainsAttributeCerts [5] BOOLEAN DEFAULT FALSE }
+            
+
+ + Constructor from given details. + + @param distributionPoint + May contain an URI as pointer to most current CRL. + @param onlyContainsUserCerts Covers revocation information for end certificates. + @param onlyContainsCACerts Covers revocation information for CA certificates. + + @param onlySomeReasons + Which revocation reasons does this point cover. + @param indirectCRL + If true then the CRL contains revocation + information about certificates ssued by other CAs. + @param onlyContainsAttributeCerts Covers revocation information for attribute certificates. + + + Constructor from Asn1Sequence + + + @return Returns the distributionPoint. + + + @return Returns the onlySomeReasons. + + + The KeyPurposeID object. +
+                KeyPurposeID ::= OBJECT IDENTIFIER
+            
+
+ + The KeyUsage object. +
+                id-ce-keyUsage OBJECT IDENTIFIER ::=  { id-ce 15 }
+            
+                KeyUsage ::= BIT STRING {
+                     digitalSignature        (0),
+                     nonRepudiation          (1),
+                     keyEncipherment         (2),
+                     dataEncipherment        (3),
+                     keyAgreement            (4),
+                     keyCertSign             (5),
+                     cRLSign                 (6),
+                     encipherOnly            (7),
+                     decipherOnly            (8) }
+             
+
+ + Basic constructor. + + @param usage - the bitwise OR of the Key Usage flags giving the + allowed uses for the key. + e.g. (KeyUsage.keyEncipherment | KeyUsage.dataEncipherment) + + + Constructor from a given details. + +

permitted and excluded are Vectors of GeneralSubtree objects.

+ + @param permitted Permitted subtrees + @param excluded Excluded subtrees +
+ + NoticeReference class, used in + CertificatePolicies X509 V3 extensions + (in policy qualifiers). + +
+              NoticeReference ::= Sequence {
+                  organization     DisplayText,
+                  noticeNumbers    Sequence OF Integer }
+            
+             
+ + @see PolicyQualifierInfo + @see PolicyInformation +
+ + Creates a new NoticeReference instance. + + @param organization a String value + @param numbers a Vector value + + + Creates a new NoticeReference instance. + + @param organization a String value + @param noticeNumbers an ASN1EncodableVector value + + + Creates a new NoticeReference instance. + + @param organization displayText + @param noticeNumbers an ASN1EncodableVector value + + + Creates a new NoticeReference instance. +

Useful for reconstructing a NoticeReference + instance from its encodable/encoded form.

+ + @param as an Asn1Sequence value obtained from either + calling @{link ToAsn1Object()} for a NoticeReference + instance or from parsing it from a Der-encoded stream. +
+ + Describe ToAsn1Object method here. + + @return a Asn1Object value + + + ObjectDigestInfo ASN.1 structure used in v2 attribute certificates. + +
+             
+               ObjectDigestInfo ::= SEQUENCE {
+                    digestedObjectType  ENUMERATED {
+                            publicKey            (0),
+                            publicKeyCert        (1),
+                            otherObjectTypes     (2) },
+                                    -- otherObjectTypes MUST NOT
+                                    -- be used in this profile
+                    otherObjectTypeID   OBJECT IDENTIFIER OPTIONAL,
+                    digestAlgorithm     AlgorithmIdentifier,
+                    objectDigest        BIT STRING
+               }
+              
+            
+ +
+ + The public key is hashed. + + + The public key certificate is hashed. + + + An other object is hashed. + + + Constructor from given details. +

+ If digestedObjectType is not {@link #publicKeyCert} or + {@link #publicKey} otherObjectTypeID must be given, + otherwise it is ignored.

+ + @param digestedObjectType The digest object type. + @param otherObjectTypeID The object type ID for + otherObjectDigest. + @param digestAlgorithm The algorithm identifier for the hash. + @param objectDigest The hash value. +
+ + Produce an object suitable for an Asn1OutputStream. + +
+             
+               ObjectDigestInfo ::= SEQUENCE {
+                    digestedObjectType  ENUMERATED {
+                            publicKey            (0),
+                            publicKeyCert        (1),
+                            otherObjectTypes     (2) },
+                                    -- otherObjectTypes MUST NOT
+                                    -- be used in this profile
+                    otherObjectTypeID   OBJECT IDENTIFIER OPTIONAL,
+                    digestAlgorithm     AlgorithmIdentifier,
+                    objectDigest        BIT STRING
+               }
+              
+            
+
+ + The OtherName object. +
+            OtherName ::= SEQUENCE {
+                 type-id    OBJECT IDENTIFIER,
+                 value      [0] EXPLICIT ANY DEFINED BY type-id }
+            
+
+ + OtherName factory method. + @param obj the object used to construct an instance of + OtherName. It must be an instance of OtherName + or ASN1Sequence. + @return the instance of OtherName built from the + supplied object. + @throws java.lang.IllegalArgumentException if the object passed + to the factory is not an instance of OtherName or something that + can be converted into an appropriate ASN1Sequence. + + + Base constructor. + @param typeID the type of the other name. + @param value the ANY object that represents the value. + + + PolicyMappings V3 extension, described in RFC3280. +
+                PolicyMappings ::= Sequence SIZE (1..MAX) OF Sequence {
+                  issuerDomainPolicy      CertPolicyId,
+                  subjectDomainPolicy     CertPolicyId }
+             
+ + @see RFC 3280, section 4.2.1.6 +
+ + Creates a new PolicyMappings instance. + + @param seq an Asn1Sequence constructed as specified + in RFC 3280 + + + Creates a new PolicyMappings instance. + + @param mappings a HashMap value that maps + string oids + to other string oids. + + + PolicyQualifierId, used in the CertificatePolicies + X509V3 extension. + +
+                id-qt          OBJECT IDENTIFIER ::=  { id-pkix 2 }
+                id-qt-cps      OBJECT IDENTIFIER ::=  { id-qt 1 }
+                id-qt-unotice  OBJECT IDENTIFIER ::=  { id-qt 2 }
+              PolicyQualifierId ::=
+                   OBJECT IDENTIFIER ( id-qt-cps | id-qt-unotice )
+             
+
+ + Policy qualifiers, used in the X509V3 CertificatePolicies + extension. + +
+               PolicyQualifierInfo ::= Sequence {
+                   policyQualifierId  PolicyQualifierId,
+                   qualifier          ANY DEFINED BY policyQualifierId }
+             
+
+ + Creates a new PolicyQualifierInfo instance. + + @param policyQualifierId a PolicyQualifierId value + @param qualifier the qualifier, defined by the above field. + + + Creates a new PolicyQualifierInfo containing a + cPSuri qualifier. + + @param cps the CPS (certification practice statement) uri as a + string. + + + Creates a new PolicyQualifierInfo instance. + + @param as PolicyQualifierInfo X509 structure + encoded as an Asn1Sequence. + + + Returns a Der-encodable representation of this instance. + + @return a Asn1Object value + + + +
+            PrivateKeyUsagePeriod ::= SEQUENCE
+            {
+            notBefore       [0]     GeneralizedTime OPTIONAL,
+            notAfter        [1]     GeneralizedTime OPTIONAL }
+            
+
+
+ + The BiometricData object. +
+            BiometricData  ::=  SEQUENCE {
+                  typeOfBiometricData  TypeOfBiometricData,
+                  hashAlgorithm        AlgorithmIdentifier,
+                  biometricDataHash    OCTET STRING,
+                  sourceDataUri        IA5String OPTIONAL  }
+            
+
+ + The Iso4217CurrencyCode object. +
+            Iso4217CurrencyCode  ::=  CHOICE {
+                  alphabetic              PrintableString (SIZE 3), --Recommended
+                  numeric              INTEGER (1..999) }
+            -- Alphabetic or numeric currency code as defined in ISO 4217
+            -- It is recommended that the Alphabetic form is used
+            
+
+ + The MonetaryValue object. +
+            MonetaryValue  ::=  SEQUENCE {
+                  currency              Iso4217CurrencyCode,
+                  amount               INTEGER,
+                  exponent             INTEGER }
+            -- value = amount * 10^exponent
+            
+
+ + The QCStatement object. +
+            QCStatement ::= SEQUENCE {
+              statementId        OBJECT IDENTIFIER,
+              statementInfo      ANY DEFINED BY statementId OPTIONAL}
+            
+
+ + The SemanticsInformation object. +
+                   SemanticsInformation ::= SEQUENCE {
+                     semanticsIdentifier        OBJECT IDENTIFIER   OPTIONAL,
+                     nameRegistrationAuthorities NameRegistrationAuthorities
+                                                                     OPTIONAL }
+                     (WITH COMPONENTS {..., semanticsIdentifier PRESENT}|
+                      WITH COMPONENTS {..., nameRegistrationAuthorities PRESENT})
+            
+                 NameRegistrationAuthorities ::=  SEQUENCE SIZE (1..MAX) OF
+                     GeneralName
+             
+
+ + The TypeOfBiometricData object. +
+             TypeOfBiometricData ::= CHOICE {
+               predefinedBiometricType   PredefinedBiometricType,
+               biometricDataOid          OBJECT IDENTIFIER }
+            
+             PredefinedBiometricType ::= INTEGER {
+               picture(0),handwritten-signature(1)}
+               (picture|handwritten-signature)
+             
+
+ + The ReasonFlags object. +
+            ReasonFlags ::= BIT STRING {
+               unused(0),
+               keyCompromise(1),
+               cACompromise(2),
+               affiliationChanged(3),
+               superseded(4),
+               cessationOfOperation(5),
+               certficateHold(6)
+            }
+            
+
+ + @param reasons - the bitwise OR of the Key Reason flags giving the + allowed uses for the key. + + + Implementation of the RoleSyntax object as specified by the RFC3281. + +
+             RoleSyntax ::= SEQUENCE {
+                             roleAuthority  [0] GeneralNames OPTIONAL,
+                             roleName       [1] GeneralName
+                       }
+             
+
+ + RoleSyntax factory method. + @param obj the object used to construct an instance of + RoleSyntax. It must be an instance of RoleSyntax + or Asn1Sequence. + @return the instance of RoleSyntax built from the + supplied object. + @throws java.lang.ArgumentException if the object passed + to the factory is not an instance of RoleSyntax or + Asn1Sequence. + + + Constructor. + @param roleAuthority the role authority of this RoleSyntax. + @param roleName the role name of this RoleSyntax. + + + Constructor. Invoking this constructor is the same as invoking + new RoleSyntax(null, roleName). + @param roleName the role name of this RoleSyntax. + + + Utility constructor. Takes a string argument representing + the role name, builds a GeneralName to hold the role name + and calls the constructor that takes a GeneralName. + @param roleName + + + Constructor that builds an instance of RoleSyntax by + extracting the encoded elements from the Asn1Sequence + object supplied. + @param seq an instance of Asn1Sequence that holds + the encoded elements used to build this RoleSyntax. + + + Gets the role authority of this RoleSyntax. + @return an instance of GeneralNames holding the + role authority of this RoleSyntax. + + + Gets the role name of this RoleSyntax. + @return an instance of GeneralName holding the + role name of this RoleSyntax. + + + Gets the role name as a java.lang.string object. + @return the role name of this RoleSyntax represented as a + string object. + + + Gets the role authority as a string[] object. + @return the role authority of this RoleSyntax represented as a + string[] array. + + + Implementation of the method ToAsn1Object as + required by the superclass ASN1Encodable. + +
+             RoleSyntax ::= SEQUENCE {
+                             roleAuthority  [0] GeneralNames OPTIONAL,
+                             roleName       [1] GeneralName
+                       }
+             
+
+ + This outputs the key in Pkcs1v2 format. +
+                 RSAPublicKey ::= Sequence {
+                                     modulus Integer, -- n
+                                     publicExponent Integer, -- e
+                                 }
+            
+
+ + Structure for a name or pseudonym. + +
+                  NameOrPseudonym ::= CHOICE {
+                	   surAndGivenName SEQUENCE {
+                	     surName DirectoryString,
+                	     givenName SEQUENCE OF DirectoryString 
+                    },
+                	   pseudonym DirectoryString 
+                  }
+            
+ + @see org.bouncycastle.asn1.x509.sigi.PersonalData + +
+ + Constructor from DERString. +

+ The sequence is of type NameOrPseudonym: +

+

+                  NameOrPseudonym ::= CHOICE {
+                	   surAndGivenName SEQUENCE {
+                	     surName DirectoryString,
+                	     givenName SEQUENCE OF DirectoryString
+                    },
+                	   pseudonym DirectoryString
+                  }
+            
+ @param pseudonym pseudonym value to use. +
+ + Constructor from Asn1Sequence. +

+ The sequence is of type NameOrPseudonym: +

+

+                   NameOrPseudonym ::= CHOICE {
+                 	   surAndGivenName SEQUENCE {
+                 	     surName DirectoryString,
+                 	     givenName SEQUENCE OF DirectoryString
+                     },
+                 	   pseudonym DirectoryString
+                   }
+             
+ + @param seq The ASN.1 sequence. +
+ + Constructor from a given details. + + @param pseudonym The pseudonym. + + + Constructor from a given details. + + @param surname The surname. + @param givenName A sequence of directory strings making up the givenName + + + Produce an object suitable for an Asn1OutputStream. +

+ Returns: +

+

+                   NameOrPseudonym ::= CHOICE {
+                 	   surAndGivenName SEQUENCE {
+                 	     surName DirectoryString,
+                 	     givenName SEQUENCE OF DirectoryString
+                     },
+                 	   pseudonym DirectoryString
+                   }
+             
+ + @return an Asn1Object +
+ + Contains personal data for the otherName field in the subjectAltNames + extension. +

+

+                 PersonalData ::= SEQUENCE {
+                   nameOrPseudonym NameOrPseudonym,
+                   nameDistinguisher [0] INTEGER OPTIONAL,
+                   dateOfBirth [1] GeneralizedTime OPTIONAL,
+                   placeOfBirth [2] DirectoryString OPTIONAL,
+                   gender [3] PrintableString OPTIONAL,
+                   postalAddress [4] DirectoryString OPTIONAL
+                   }
+             
+ + @see org.bouncycastle.asn1.x509.sigi.NameOrPseudonym + @see org.bouncycastle.asn1.x509.sigi.SigIObjectIdentifiers +
+ + Constructor from Asn1Sequence. +

+ The sequence is of type NameOrPseudonym: +

+

+                 PersonalData ::= SEQUENCE {
+                   nameOrPseudonym NameOrPseudonym,
+                   nameDistinguisher [0] INTEGER OPTIONAL,
+                   dateOfBirth [1] GeneralizedTime OPTIONAL,
+                   placeOfBirth [2] DirectoryString OPTIONAL,
+                   gender [3] PrintableString OPTIONAL,
+                   postalAddress [4] DirectoryString OPTIONAL
+                   }
+             
+ + @param seq The ASN.1 sequence. +
+ + Constructor from a given details. + + @param nameOrPseudonym Name or pseudonym. + @param nameDistinguisher Name distinguisher. + @param dateOfBirth Date of birth. + @param placeOfBirth Place of birth. + @param gender Gender. + @param postalAddress Postal Address. + + + Produce an object suitable for an Asn1OutputStream. +

+ Returns: +

+

+                 PersonalData ::= SEQUENCE {
+                   nameOrPseudonym NameOrPseudonym,
+                   nameDistinguisher [0] INTEGER OPTIONAL,
+                   dateOfBirth [1] GeneralizedTime OPTIONAL,
+                   placeOfBirth [2] DirectoryString OPTIONAL,
+                   gender [3] PrintableString OPTIONAL,
+                   postalAddress [4] DirectoryString OPTIONAL
+                   }
+             
+ + @return an Asn1Object +
+ + Object Identifiers of SigI specifciation (German Signature Law + Interoperability specification). + + + Key purpose IDs for German SigI (Signature Interoperability + Specification) + + + Certificate policy IDs for German SigI (Signature Interoperability + Specification) + + + Other Name IDs for German SigI (Signature Interoperability Specification) + + + To be used for for the generation of directory service certificates. + + + ID for PersonalData + + + Certificate is conform to german signature law. + + + This extension may contain further X.500 attributes of the subject. See also + RFC 3039. + +
+                 SubjectDirectoryAttributes ::= Attributes
+                 Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+                 Attribute ::= SEQUENCE
+                 {
+                   type AttributeType
+                   values SET OF AttributeValue
+                 }
+            
+                 AttributeType ::= OBJECT IDENTIFIER
+                 AttributeValue ::= ANY DEFINED BY AttributeType
+             
+ + @see org.bouncycastle.asn1.x509.X509Name for AttributeType ObjectIdentifiers. +
+ + Constructor from Asn1Sequence. + + The sequence is of type SubjectDirectoryAttributes: + +
+                  SubjectDirectoryAttributes ::= Attributes
+                  Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+                  Attribute ::= SEQUENCE
+                  {
+                    type AttributeType
+                    values SET OF AttributeValue
+                  }
+            
+                  AttributeType ::= OBJECT IDENTIFIER
+                  AttributeValue ::= ANY DEFINED BY AttributeType
+             
+ + @param seq + The ASN.1 sequence. +
+ + Constructor from an ArrayList of attributes. + + The ArrayList consists of attributes of type {@link Attribute Attribute} + + @param attributes The attributes. + + + + Produce an object suitable for an Asn1OutputStream. + + Returns: + +
+                  SubjectDirectoryAttributes ::= Attributes
+                  Attributes ::= SEQUENCE SIZE (1..MAX) OF Attribute
+                  Attribute ::= SEQUENCE
+                  {
+                    type AttributeType
+                    values SET OF AttributeValue
+                  }
+            
+                  AttributeType ::= OBJECT IDENTIFIER
+                  AttributeValue ::= ANY DEFINED BY AttributeType
+             
+ + @return a DERObject +
+ + @return Returns the attributes. + + + The SubjectKeyIdentifier object. +
+            SubjectKeyIdentifier::= OCTET STRING
+            
+
+ + Calculates the keyIdentifier using a SHA1 hash over the BIT STRING + from SubjectPublicKeyInfo as defined in RFC3280. + + @param spki the subject public key info. + + + Return a RFC 3280 type 1 key identifier. As in: +
+            (1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the
+            value of the BIT STRING subjectPublicKey (excluding the tag,
+            length, and number of unused bits).
+            
+ @param keyInfo the key info object containing the subjectPublicKey field. + @return the key identifier. +
+ + Return a RFC 3280 type 2 key identifier. As in: +
+            (2) The keyIdentifier is composed of a four bit type field with
+            the value 0100 followed by the least significant 60 bits of the
+            SHA-1 hash of the value of the BIT STRING subjectPublicKey.
+            
+ @param keyInfo the key info object containing the subjectPublicKey field. + @return the key identifier. +
+ + The object that contains the public key stored in a certficate. +

+ The GetEncoded() method in the public keys in the JCE produces a DER + encoded one of these.

+
+ + for when the public key is an encoded object - if the bitstring + can't be decoded this routine raises an IOException. + + @exception IOException - if the bit string doesn't represent a Der + encoded object. + + + for when the public key is an encoded object - if the bitstring + can't be decoded this routine raises an IOException. + + @exception IOException - if the bit string doesn't represent a Der + encoded object. + + + for when the public key is raw bits... + + + Produce an object suitable for an Asn1OutputStream. +
+            SubjectPublicKeyInfo ::= Sequence {
+                                     algorithm AlgorithmIdentifier,
+                                     publicKey BIT STRING }
+            
+
+ + Target structure used in target information extension for attribute + certificates from RFC 3281. + +
+                Target  ::= CHOICE {
+                  targetName          [0] GeneralName,
+                  targetGroup         [1] GeneralName,
+                  targetCert          [2] TargetCert
+                }
+            
+ +

+ The targetCert field is currently not supported and must not be used + according to RFC 3281.

+
+ + Creates an instance of a Target from the given object. +

+ obj can be a Target or a {@link Asn1TaggedObject}

+ + @param obj The object. + @return A Target instance. + @throws ArgumentException if the given object cannot be + interpreted as Target. +
+ + Constructor from Asn1TaggedObject. + + @param tagObj The tagged object. + @throws ArgumentException if the encoding is wrong. + + + Constructor from given details. +

+ Exactly one of the parameters must be not null.

+ + @param type the choice type to apply to the name. + @param name the general name. + @throws ArgumentException if type is invalid. +
+ + @return Returns the targetGroup. + + + @return Returns the targetName. + + + Produce an object suitable for an Asn1OutputStream. + + Returns: + +
+                Target  ::= CHOICE {
+                  targetName          [0] GeneralName,
+                  targetGroup         [1] GeneralName,
+                  targetCert          [2] TargetCert
+                }
+            
+ + @return an Asn1Object +
+ + Target information extension for attributes certificates according to RFC + 3281. + +
+                      SEQUENCE OF Targets
+            
+ +
+ + Creates an instance of a TargetInformation from the given object. +

+ obj can be a TargetInformation or a {@link Asn1Sequence}

+ + @param obj The object. + @return A TargetInformation instance. + @throws ArgumentException if the given object cannot be interpreted as TargetInformation. +
+ + Constructor from a Asn1Sequence. + + @param seq The Asn1Sequence. + @throws ArgumentException if the sequence does not contain + correctly encoded Targets elements. + + + Returns the targets in this target information extension. +

+ The ArrayList is cloned before it is returned.

+ + @return Returns the targets. +
+ + Constructs a target information from a single targets element. + According to RFC 3281 only one targets element must be produced. + + @param targets A Targets instance. + + + According to RFC 3281 only one targets element must be produced. If + multiple targets are given they must be merged in + into one targets element. + + @param targets An array with {@link Targets}. + + + Produce an object suitable for an Asn1OutputStream. + + Returns: + +
+                     SEQUENCE OF Targets
+            
+ +

+ According to RFC 3281 only one targets element must be produced. If + multiple targets are given in the constructor they are merged into one + targets element. If this was produced from a + {@link Org.BouncyCastle.Asn1.Asn1Sequence} the encoding is kept.

+ + @return an Asn1Object +
+ + Targets structure used in target information extension for attribute + certificates from RFC 3281. + +
+                       Targets ::= SEQUENCE OF Target
+                      
+                       Target  ::= CHOICE {
+                         targetName          [0] GeneralName,
+                         targetGroup         [1] GeneralName,
+                         targetCert          [2] TargetCert
+                       }
+                      
+                       TargetCert  ::= SEQUENCE {
+                         targetCertificate    IssuerSerial,
+                         targetName           GeneralName OPTIONAL,
+                         certDigestInfo       ObjectDigestInfo OPTIONAL
+                       }
+            
+ + @see org.bouncycastle.asn1.x509.Target + @see org.bouncycastle.asn1.x509.TargetInformation +
+ + Creates an instance of a Targets from the given object. +

+ obj can be a Targets or a {@link Asn1Sequence}

+ + @param obj The object. + @return A Targets instance. + @throws ArgumentException if the given object cannot be interpreted as Target. +
+ + Constructor from Asn1Sequence. + + @param targets The ASN.1 SEQUENCE. + @throws ArgumentException if the contents of the sequence are + invalid. + + + Constructor from given targets. +

+ The ArrayList is copied.

+ + @param targets An ArrayList of {@link Target}s. + @see Target + @throws ArgumentException if the ArrayList contains not only Targets. +
+ + Returns the targets in an ArrayList. +

+ The ArrayList is cloned before it is returned.

+ + @return Returns the targets. +
+ + Produce an object suitable for an Asn1OutputStream. + + Returns: + +
+                       Targets ::= SEQUENCE OF Target
+            
+ + @return an Asn1Object +
+ + The TbsCertificate object. +
+            TbsCertificate ::= Sequence {
+                 version          [ 0 ]  Version DEFAULT v1(0),
+                 serialNumber            CertificateSerialNumber,
+                 signature               AlgorithmIdentifier,
+                 issuer                  Name,
+                 validity                Validity,
+                 subject                 Name,
+                 subjectPublicKeyInfo    SubjectPublicKeyInfo,
+                 issuerUniqueID    [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL,
+                 subjectUniqueID   [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL,
+                 extensions        [ 3 ] Extensions OPTIONAL
+                 }
+            
+

+ Note: issuerUniqueID and subjectUniqueID are both deprecated by the IETF. This class + will parse them, but you really shouldn't be creating new ones.

+
+ + PKIX RFC-2459 - TbsCertList object. +
+            TbsCertList  ::=  Sequence  {
+                 version                 Version OPTIONAL,
+                                              -- if present, shall be v2
+                 signature               AlgorithmIdentifier,
+                 issuer                  Name,
+                 thisUpdate              Time,
+                 nextUpdate              Time OPTIONAL,
+                 revokedCertificates     Sequence OF Sequence  {
+                      userCertificate         CertificateSerialNumber,
+                      revocationDate          Time,
+                      crlEntryExtensions      Extensions OPTIONAL
+                                                    -- if present, shall be v2
+                                           }  OPTIONAL,
+                 crlExtensions           [0]  EXPLICIT Extensions OPTIONAL
+                                                    -- if present, shall be v2
+                                           }
+            
+
+ + creates a time object from a given date - if the date is between 1950 + and 2049 a UTCTime object is Generated, otherwise a GeneralizedTime + is used. + + + + Return our time as DateTime. + + A date time. + + + Produce an object suitable for an Asn1OutputStream. +
+            Time ::= CHOICE {
+                        utcTime        UTCTime,
+                        generalTime    GeneralizedTime }
+            
+
+ + UserNotice class, used in + CertificatePolicies X509 extensions (in policy + qualifiers). +
+             UserNotice ::= Sequence {
+                  noticeRef        NoticeReference OPTIONAL,
+                  explicitText     DisplayText OPTIONAL}
+            
+             
+ + @see PolicyQualifierId + @see PolicyInformation +
+ + Creates a new UserNotice instance. + + @param noticeRef a NoticeReference value + @param explicitText a DisplayText value + + + Creates a new UserNotice instance. + + @param noticeRef a NoticeReference value + @param str the explicitText field as a string. + + + Creates a new UserNotice instance. +

Useful from reconstructing a UserNotice instance + from its encodable/encoded form. + + @param as an ASN1Sequence value obtained from either + calling @{link toASN1Object()} for a UserNotice + instance or from parsing it from a DER-encoded stream.

+
+ + Generator for Version 1 TbsCertificateStructures. +
+             TbsCertificate ::= Sequence {
+                  version          [ 0 ]  Version DEFAULT v1(0),
+                  serialNumber            CertificateSerialNumber,
+                  signature               AlgorithmIdentifier,
+                  issuer                  Name,
+                  validity                Validity,
+                  subject                 Name,
+                  subjectPublicKeyInfo    SubjectPublicKeyInfo,
+                  }
+             
+ +
+ + Generator for Version 2 AttributeCertificateInfo +
+             AttributeCertificateInfo ::= Sequence {
+                   version              AttCertVersion -- version is v2,
+                   holder               Holder,
+                   issuer               AttCertIssuer,
+                   signature            AlgorithmIdentifier,
+                   serialNumber         CertificateSerialNumber,
+                   attrCertValidityPeriod   AttCertValidityPeriod,
+                   attributes           Sequence OF Attr,
+                   issuerUniqueID       UniqueIdentifier OPTIONAL,
+                   extensions           Extensions OPTIONAL
+             }
+             
+ +
+ + @param attribute + + + Produce an object suitable for an Asn1OutputStream. +
+             V2Form ::= Sequence {
+                  issuerName            GeneralNames  OPTIONAL,
+                  baseCertificateID     [0] IssuerSerial  OPTIONAL,
+                  objectDigestInfo      [1] ObjectDigestInfo  OPTIONAL
+                    -- issuerName MUST be present in this profile
+                    -- baseCertificateID and objectDigestInfo MUST NOT
+                    -- be present in this profile
+             }
+            
+
+ + Generator for Version 2 TbsCertList structures. +
+              TbsCertList  ::=  Sequence  {
+                   version                 Version OPTIONAL,
+                                                -- if present, shall be v2
+                   signature               AlgorithmIdentifier,
+                   issuer                  Name,
+                   thisUpdate              Time,
+                   nextUpdate              Time OPTIONAL,
+                   revokedCertificates     Sequence OF Sequence  {
+                        userCertificate         CertificateSerialNumber,
+                        revocationDate          Time,
+                        crlEntryExtensions      Extensions OPTIONAL
+                                                      -- if present, shall be v2
+                                             }  OPTIONAL,
+                   crlExtensions           [0]  EXPLICIT Extensions OPTIONAL
+                                                      -- if present, shall be v2
+                                             }
+             
+ + Note: This class may be subject to change +
+ + Generator for Version 3 TbsCertificateStructures. +
+             TbsCertificate ::= Sequence {
+                  version          [ 0 ]  Version DEFAULT v1(0),
+                  serialNumber            CertificateSerialNumber,
+                  signature               AlgorithmIdentifier,
+                  issuer                  Name,
+                  validity                Validity,
+                  subject                 Name,
+                  subjectPublicKeyInfo    SubjectPublicKeyInfo,
+                  issuerUniqueID    [ 1 ] IMPLICIT UniqueIdentifier OPTIONAL,
+                  subjectUniqueID   [ 2 ] IMPLICIT UniqueIdentifier OPTIONAL,
+                  extensions        [ 3 ] Extensions OPTIONAL
+                  }
+             
+ +
+ + an X509Certificate structure. +
+             Certificate ::= Sequence {
+                 tbsCertificate          TbsCertificate,
+                 signatureAlgorithm      AlgorithmIdentifier,
+                 signature               BIT STRING
+             }
+            
+
+ + The default converter for X509 DN entries when going from their + string value to ASN.1 strings. + + + Apply default conversion for the given value depending on the oid + and the character range of the value. + + @param oid the object identifier for the DN entry + @param value the value associated with it + @return the ASN.1 equivalent for the string value. + + + an object for the elements in the X.509 V3 extension block. + + + Convert the value of the passed in extension to an object. + The extension to parse. + The object the value string contains. + If conversion is not possible. + + + Subject Directory Attributes + + + Subject Key Identifier + + + Key Usage + + + Private Key Usage Period + + + Subject Alternative Name + + + Issuer Alternative Name + + + Basic Constraints + + + CRL Number + + + Reason code + + + Hold Instruction Code + + + Invalidity Date + + + Delta CRL indicator + + + Issuing Distribution Point + + + Certificate Issuer + + + Name Constraints + + + CRL Distribution Points + + + Certificate Policies + + + Policy Mappings + + + Authority Key Identifier + + + Policy Constraints + + + Extended Key Usage + + + Freshest CRL + + + Inhibit Any Policy + + + Authority Info Access + + + Subject Info Access + + + Logo Type + + + BiometricInfo + + + QCStatements + + + Audit identity extension in attribute certificates. + + + NoRevAvail extension in attribute certificates. + + + TargetInformation extension in attribute certificates. + + + Expired Certificates on CRL extension + + + Constructor from Asn1Sequence. + + the extensions are a list of constructed sequences, either with (Oid, OctetString) or (Oid, Boolean, OctetString) + + + constructor from a table of extensions. +

+ it's is assumed the table contains Oid/string pairs.

+
+ + Constructor from a table of extensions with ordering. +

+ It's is assumed the table contains Oid/string pairs.

+
+ + Constructor from two vectors + + @param objectIDs an ArrayList of the object identifiers. + @param values an ArrayList of the extension values. + + + constructor from a table of extensions. +

+ it's is assumed the table contains Oid/string pairs.

+
+ + Constructor from a table of extensions with ordering. +

+ It's is assumed the table contains Oid/string pairs.

+
+ + Constructor from two vectors + + @param objectIDs an ArrayList of the object identifiers. + @param values an ArrayList of the extension values. + + + return an Enumeration of the extension field's object ids. + + + return the extension represented by the object identifier + passed in. + + @return the extension if it's present, null otherwise. + + + return the parsed value of the extension represented by the object identifier + passed in. + + @return the parsed value of the extension if it's present, null otherwise. + + +
+                 Extensions        ::=   SEQUENCE SIZE (1..MAX) OF Extension
+            
+                 Extension         ::=   SEQUENCE {
+                    extnId            EXTENSION.&id ({ExtensionSet}),
+                    critical          BOOLEAN DEFAULT FALSE,
+                    extnValue         OCTET STRING }
+             
+
+ + Generator for X.509 extensions + + + Reset the generator + + + + Add an extension with the given oid and the passed in value to be included + in the OCTET STRING associated with the extension. + + OID for the extension. + True if critical, false otherwise. + The ASN.1 object to be included in the extension. + + + + Add an extension with the given oid and the passed in byte array to be wrapped + in the OCTET STRING associated with the extension. + + OID for the extension. + True if critical, false otherwise. + The byte array to be wrapped. + + + Return true if there are no extension present in this generator. + True if empty, false otherwise + + + Generate an X509Extensions object based on the current state of the generator. + An X509Extensions object + + +
+                 RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
+            
+                 RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue
+            
+                 AttributeTypeAndValue ::= SEQUENCE {
+                                               type  OBJECT IDENTIFIER,
+                                               value ANY }
+             
+
+ + country code - StringType(SIZE(2)) + + + organization - StringType(SIZE(1..64)) + + + organizational unit name - StringType(SIZE(1..64)) + + + Title + + + common name - StringType(SIZE(1..64)) + + + street - StringType(SIZE(1..64)) + + + device serial number name - StringType(SIZE(1..64)) + + + locality name - StringType(SIZE(1..64)) + + + state, or province name - StringType(SIZE(1..64)) + + + Naming attributes of type X520name + + + businessCategory - DirectoryString(SIZE(1..128) + + + postalCode - DirectoryString(SIZE(1..40) + + + dnQualifier - DirectoryString(SIZE(1..64) + + + RFC 3039 Pseudonym - DirectoryString(SIZE(1..64) + + + RFC 3039 DateOfBirth - GeneralizedTime - YYYYMMDD000000Z + + + RFC 3039 PlaceOfBirth - DirectoryString(SIZE(1..128) + + + RFC 3039 DateOfBirth - PrintableString (SIZE(1)) -- "M", "F", "m" or "f" + + + RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166 + codes only + + + RFC 3039 CountryOfCitizenship - PrintableString (SIZE (2)) -- ISO 3166 + codes only + + + ISIS-MTT NameAtBirth - DirectoryString(SIZE(1..64) + + + RFC 3039 PostalAddress - SEQUENCE SIZE (1..6) OF + DirectoryString(SIZE(1..30)) + + + RFC 2256 dmdName + + + id-at-telephoneNumber + + + id-at-organizationIdentifier + + + id-at-name + + + Email address (RSA PKCS#9 extension) - IA5String. +

Note: if you're trying to be ultra orthodox, don't use this! It shouldn't be in here.

+
+ + more from PKCS#9 + + + email address in Verisign certificates + + + LDAP User id. + + + determines whether or not strings should be processed and printed + from back to front. + + + default look up table translating OID values into their common symbols following + the convention in RFC 2253 with a few extras + + + look up table translating OID values into their common symbols following the convention in RFC 2253 + + + look up table translating OID values into their common symbols following the convention in RFC 1779 + + + + look up table translating common symbols into their OIDS. + + + Return a X509Name based on the passed in tagged object. + + @param obj tag object holding name. + @param explicitly true if explicitly tagged false otherwise. + @return the X509Name + + + Constructor from Asn1Sequence + + the principal will be a list of constructed sets, each containing an (OID, string) pair. + + + Constructor from a table of attributes with ordering. +

+ it's is assumed the table contains OID/string pairs, and the contents + of the table are copied into an internal table as part of the + construction process. The ordering ArrayList should contain the OIDs + in the order they are meant to be encoded or printed in ToString.

+
+ + Constructor from a table of attributes with ordering. +

+ it's is assumed the table contains OID/string pairs, and the contents + of the table are copied into an internal table as part of the + construction process. The ordering ArrayList should contain the OIDs + in the order they are meant to be encoded or printed in ToString.

+

+ The passed in converter will be used to convert the strings into their + ASN.1 counterparts.

+
+ + Takes two vectors one of the oids and the other of the values. + + + Takes two vectors one of the oids and the other of the values. +

+ The passed in converter will be used to convert the strings into their + ASN.1 counterparts.

+
+ + Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or + some such, converting it into an ordered set of name attributes. + + + Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or + some such, converting it into an ordered set of name attributes with each + string value being converted to its associated ASN.1 type using the passed + in converter. + + + Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or + some such, converting it into an ordered set of name attributes. If reverse + is true, create the encoded version of the sequence starting from the + last element in the string. + + + Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or + some such, converting it into an ordered set of name attributes with each + string value being converted to its associated ASN.1 type using the passed + in converter. If reverse is true the ASN.1 sequence representing the DN will + be built by starting at the end of the string, rather than the start. + + + Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or + some such, converting it into an ordered set of name attributes. lookUp + should provide a table of lookups, indexed by lowercase only strings and + yielding a DerObjectIdentifier, other than that OID. and numeric oids + will be processed automatically. +
+ If reverse is true, create the encoded version of the sequence + starting from the last element in the string. + @param reverse true if we should start scanning from the end (RFC 2553). + @param lookUp table of names and their oids. + @param dirName the X.500 string to be parsed. +
+ + Takes an X509 dir name as a string of the format "C=AU, ST=Victoria", or + some such, converting it into an ordered set of name attributes. lookUp + should provide a table of lookups, indexed by lowercase only strings and + yielding a DerObjectIdentifier, other than that OID. and numeric oids + will be processed automatically. The passed in converter is used to convert the + string values to the right of each equals sign to their ASN.1 counterparts. +
+ @param reverse true if we should start scanning from the end, false otherwise. + @param lookUp table of names and oids. + @param dirName the string dirName + @param converter the converter to convert string values into their ASN.1 equivalents +
+ + return an IList of the oids in the name, in the order they were found. + + + return an IList of the values found in the name, in the order they + were found. + + + return an IList of the values found in the name, in the order they + were found, with the DN label corresponding to passed in oid. + + + The X509Name object to test equivalency against. + If true, the order of elements must be the same, + as well as the values associated with each element. + + + test for equivalence - note: case is ignored. + + + convert the structure to a string - if reverse is true the + oids and values are listed out starting with the last element + in the sequence (ala RFC 2253), otherwise the string will begin + with the first element of the structure. If no string definition + for the oid is found in oidSymbols the string value of the oid is + added. Two standard symbol tables are provided DefaultSymbols, and + RFC2253Symbols as part of this class. + + @param reverse if true start at the end of the sequence and work back. + @param oidSymbols look up table strings for oids. + + + * It turns out that the number of standard ways the fields in a DN should be + * encoded into their ASN.1 counterparts is rapidly approaching the + * number of machines on the internet. By default the X509Name class + * will produce UTF8Strings in line with the current recommendations (RFC 3280). + *

+ * An example of an encoder look like below: + *

+                 * public class X509DirEntryConverter
+                 *     : X509NameEntryConverter
+                 * {
+                 *     public Asn1Object GetConvertedValue(
+                 *         DerObjectIdentifier  oid,
+                 *         string               value)
+                 *     {
+                 *         if (str.Length() != 0 && str.charAt(0) == '#')
+                 *         {
+                 *             return ConvertHexEncoded(str, 1);
+                 *         }
+                 *         if (oid.Equals(EmailAddress))
+                 *         {
+                 *             return new DerIA5String(str);
+                 *         }
+                 *         else if (CanBePrintable(str))
+                 *         {
+                 *             return new DerPrintableString(str);
+                 *         }
+                 *         else if (CanBeUTF8(str))
+                 *         {
+                 *             return new DerUtf8String(str);
+                 *         }
+                 *         else
+                 *         {
+                 *             return new DerBmpString(str);
+                 *         }
+                 *     }
+                 * }
+            	 * 
+ *

+
+ + Convert an inline encoded hex string rendition of an ASN.1 + object back into its corresponding ASN.1 object. + + @param str the hex encoded object + @param off the index at which the encoding starts + @return the decoded object + + + return true if the passed in string can be represented without + loss as a PrintableString, false otherwise. + + + Convert the passed in string value into the appropriate ASN.1 + encoded object. + + @param oid the oid associated with the value in the DN. + @param value the value of the particular DN component. + @return the ASN.1 equivalent for the value. + + + class for breaking up an X500 Name into it's component tokens, ala + java.util.StringTokenizer. We need this class as some of the + lightweight Java environment don't support classes like + StringTokenizer. + + + A general class that reads all X9.62 style EC curve tables. + + + return a X9ECParameters object representing the passed in named + curve. The routine returns null if the curve is not present. + + @param name the name of the curve requested + @return an X9ECParameters object or null if the curve is not available. + + + return the object identifier signified by the passed in name. Null + if there is no object identifier associated with name. + + @return the object identifier associated with name, if present. + + + return a X9ECParameters object representing the passed in named + curve. + + @param oid the object id of the curve requested + @return an X9ECParameters object or null if the curve is not available. + + + return an enumeration of the names of the available curves. + + @return an enumeration of the names of the available curves. + + + ASN.1 def for Diffie-Hellman key exchange KeySpecificInfo structure. See + RFC 2631, or X9.42, for further details. + + + Produce an object suitable for an Asn1OutputStream. +
+             KeySpecificInfo ::= Sequence {
+                 algorithm OBJECT IDENTIFIER,
+                 counter OCTET STRING SIZE (4..4)
+             }
+            
+
+ + ANS.1 def for Diffie-Hellman key exchange OtherInfo structure. See + RFC 2631, or X9.42, for further details. + + + Produce an object suitable for an Asn1OutputStream. +
+             OtherInfo ::= Sequence {
+                 keyInfo KeySpecificInfo,
+                 partyAInfo [0] OCTET STRING OPTIONAL,
+                 suppPubInfo [2] OCTET STRING
+             }
+            
+
+ + table of the current named curves defined in X.962 EC-DSA. + + + return the X9ECParameters object for the named curve represented by + the passed in object identifier. Null if the curve isn't present. + + @param oid an object identifier representing a named curve, if present. + + + return the object identifier signified by the passed in name. Null + if there is no object identifier associated with name. + + @return the object identifier associated with name, if present. + + + return the named curve name represented by the given object identifier. + + + returns an enumeration containing the name strings for curves + contained in this structure. + + + Produce an object suitable for an Asn1OutputStream. +
+            Parameters ::= CHOICE {
+               ecParameters ECParameters,
+               namedCurve   CURVES.&id({CurveNames}),
+               implicitlyCA Null
+            }
+            
+
+ + ASN.1 def for Elliptic-Curve Curve structure. See + X9.62, for further details. + + + Produce an object suitable for an Asn1OutputStream. +
+             Curve ::= Sequence {
+                 a               FieldElement,
+                 b               FieldElement,
+                 seed            BIT STRING      OPTIONAL
+             }
+            
+
+ + ASN.1 def for Elliptic-Curve ECParameters structure. See + X9.62, for further details. + + + Return the ASN.1 entry representing the Curve. + + @return the X9Curve for the curve in these parameters. + + + Return the ASN.1 entry representing the FieldID. + + @return the X9FieldID for the FieldID in these parameters. + + + Return the ASN.1 entry representing the base point G. + + @return the X9ECPoint for the base point in these parameters. + + + Produce an object suitable for an Asn1OutputStream. +
+             ECParameters ::= Sequence {
+                 version         Integer { ecpVer1(1) } (ecpVer1),
+                 fieldID         FieldID {{FieldTypes}},
+                 curve           X9Curve,
+                 base            X9ECPoint,
+                 order           Integer,
+                 cofactor        Integer OPTIONAL
+             }
+            
+
+ + class for describing an ECPoint as a Der object. + + + Produce an object suitable for an Asn1OutputStream. +
+             ECPoint ::= OCTET STRING
+            
+

+ Octet string produced using ECPoint.GetEncoded().

+
+ + Class for processing an ECFieldElement as a DER object. + + + Produce an object suitable for an Asn1OutputStream. +
+             FieldElement ::= OCTET STRING
+            
+

+

    +
  1. if q is an odd prime then the field element is + processed as an Integer and converted to an octet string + according to x 9.62 4.3.1.
  2. +
  3. if q is 2m then the bit string + contained in the field element is converted into an octet + string with the same ordering padded at the front if necessary. +
  4. +
+

+
+ + ASN.1 def for Elliptic-Curve Field ID structure. See + X9.62, for further details. + + + Constructor for elliptic curves over prime fields + F2. + @param primeP The prime p defining the prime field. + + + Constructor for elliptic curves over binary fields + F2m. + @param m The exponent m of + F2m. + @param k1 The integer k1 where xm + + xk1 + 1 + represents the reduction polynomial f(z). + + + Constructor for elliptic curves over binary fields + F2m. + @param m The exponent m of + F2m. + @param k1 The integer k1 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z). + @param k2 The integer k2 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z). + @param k3 The integer k3 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z).. + + + Produce a Der encoding of the following structure. +
+             FieldID ::= Sequence {
+                 fieldType       FIELD-ID.&id({IOSet}),
+                 parameters      FIELD-ID.&Type({IOSet}{@fieldType})
+             }
+            
+
+ + id-dsa-with-sha1 OBJECT IDENTIFIER ::= { iso(1) member-body(2) + us(840) x9-57 (10040) x9cm(4) 3 } + + + X9.63 + + + X9.42 + + + reader for Base64 armored objects - read the headers and then start returning + bytes when the data is reached. An IOException is thrown if the CRC check + fails. + + + decode the base 64 encoded input data. + + @return the offset the data starts in out. + + + Create a stream for reading a PGP armoured message, parsing up to a header + and then reading the data that follows. + + @param input + + + Create an armoured input stream which will assume the data starts + straight away, or parse for headers first depending on the value of + hasHeaders. + + @param input + @param hasHeaders true if headers are to be looked for, false otherwise. + + + @return true if we are inside the clear text section of a PGP + signed message. + + + @return true if the stream is actually at end of file. + + + Return the armor header line (if there is one) + @return the armor header line, null if none present. + + + Return the armor headers (the lines after the armor header line), + @return an array of armor headers, null if there aren't any. + + + Basic output stream. + + + encode the input data producing a base 64 encoded byte array. + + + Set an additional header entry. Any current value(s) under the same name will be + replaced by the new one. A null value will clear the entry for name. * + @param name the name of the header entry. + @param v the value of the header entry. + + + Set an additional header entry. The current value(s) will continue to exist together + with the new one. Adding a null value has no effect. + + @param name the name of the header entry. + @param value the value of the header entry. + + + Reset the headers to only contain a Version string (if one is present). + + + Start a clear text signed message. + @param hashAlgorithm + + + Note: Close() does not close the underlying stream. So it is possible to write + multiple objects using armoring to a single stream. + + + Basic type for a image attribute packet. + + + Reader for PGP objects. + + + Returns the next packet tag in the stream. + + + + A stream that overlays our input stream, allowing the user to only read a segment of it. + NB: dataLength will be negative if the segment length is in the upper range above 2**31. + + + + Base class for a PGP object. + + + Basic output stream. + + + Create a stream representing a general packet. + Output stream to write to. + + + Create a stream representing an old style partial object. + Output stream to write to. + The packet tag for the object. + + + Create a stream representing a general packet. + Output stream to write to. + Packet tag. + Size of chunks making up the packet. + If true, the header is written out in old format. + + + Create a new style partial input stream buffered into chunks. + Output stream to write to. + Packet tag. + Size of chunks making up the packet. + + + Create a new style partial input stream buffered into chunks. + Output stream to write to. + Packet tag. + Buffer to use for collecting chunks. + + + Flush the underlying stream. + + + Finish writing out the current packet without closing the underlying stream. + + + Generic compressed data object. + + + The algorithm tag value. + + + Basic tags for compression algorithms. + + + Basic type for a PGP packet. + + + Base class for a DSA public key. + + + The stream to read the packet from. + + + The format, as a string, always "PGP". + + + Return the standard PGP encoding of the key. + + + Base class for a DSA secret key. + + + @param in + + + The format, as a string, always "PGP". + + + Return the standard PGP encoding of the key. + + + @return x + + + Base class for an ECDH Public Key. + + + The stream to read the packet from. + + + Base class for an ECDSA Public Key. + + + The stream to read the packet from. + + + Base class for an EC Public Key. + + + The stream to read the packet from. + + + The format, as a string, always "PGP". + + + Return the standard PGP encoding of the key. + + + Base class for an EC Secret Key. + + + The format, as a string, always "PGP". + + + Return the standard PGP encoding of the key. + + + Base class for an ElGamal public key. + + + The format, as a string, always "PGP". + + + Return the standard PGP encoding of the key. + + + Base class for an ElGamal secret key. + + + @param in + + + @param x + + + The format, as a string, always "PGP". + + + Return the standard PGP encoding of the key. + + + Basic packet for an experimental packet. + + + Basic tags for hash algorithms. + + + Base interface for a PGP key. + + + + The base format for this key - in the case of the symmetric keys it will generally + be raw indicating that the key is just a straight byte representation, for an asymmetric + key the format will be PGP, indicating the key is a string of MPIs encoded in PGP format. + + "RAW" or "PGP". + + + Note: you can only read from this once... + + + Generic literal data packet. + + + The format tag value. + + + The modification time of the file in milli-seconds (since Jan 1, 1970 UTC) + + + Basic type for a marker packet. + + + Basic packet for a modification detection code packet. + + + A multiple precision integer + + + Generic signature object + + + The encryption algorithm tag. + + + The hash algorithm tag. + + + Basic PGP packet tag types. + + + Public Key Algorithm tag numbers. + + + Basic packet for a PGP public key. + + + Basic packet for a PGP public key. + + + Construct a version 4 public key packet. + + + Basic packet for a PGP public subkey + + + Construct a version 4 public subkey packet. + + + Base class for an RSA public key. + + + Construct an RSA public key from the passed in stream. + + + The modulus. + The public exponent. + + + The format, as a string, always "PGP". + + + Return the standard PGP encoding of the key. + + + Base class for an RSA secret (or priate) key. + + + The format, as a string, always "PGP". + + + Return the standard PGP encoding of the key. + + + The string to key specifier class. + + + The hash algorithm. + + + The IV for the key generation algorithm. + + + The iteration count + + + The protection mode - only if GnuDummyS2K + + + Basic packet for a PGP secret key. + + + Basic packet for a PGP secret key. + + + Generic signature packet. + + + Generate a version 4 signature packet. + + @param signatureType + @param keyAlgorithm + @param hashAlgorithm + @param hashedData + @param unhashedData + @param fingerprint + @param signature + + + Generate a version 2/3 signature packet. + + @param signatureType + @param keyAlgorithm + @param hashAlgorithm + @param fingerprint + @param signature + + + return the keyId + @return the keyId that created the signature. + + + return the signature trailer that must be included with the data + to reconstruct the signature + + @return byte[] + + + * return the signature as a set of integers - note this is normalised to be the + * ASN.1 encoding of what appears in the signature packet. + + + Return the byte encoding of the signature section. + @return uninterpreted signature bytes. + + + Return the creation time in milliseconds since 1 Jan., 1970 UTC. + + + Basic type for a PGP Signature sub-packet. + + + Return the generic data making up the packet. + + + reader for signature sub-packets + + + Basic PGP signature sub-packet tag types. + + + Packet embedded signature + + + packet giving signature creation time. + + + packet giving signature expiration time. + + + Identifier for the modification detection feature + + + Returns if modification detection is supported. + + + Returns if a particular feature is supported. + + + Sets support for a particular feature. + + + packet giving signature creation time. + + + packet giving time after creation at which the key expires. + + + Return the number of seconds after creation time a key is valid for. + + @return second count for key validity. + + + Packet holding the key flag values. + + + + Return the flag values contained in the first 4 octets (note: at the moment + the standard only uses the first one). + + + + Class provided a NotationData object according to + RFC2440, Chapter 5.2.3.15. Notation Data + + + packet giving signature creation time. + + + packet giving whether or not the signature is signed using the primary user ID for the key. + + + packet giving whether or not is revocable. + + + packet giving signature creation time. + + + packet giving signature expiration time. + + + return time in seconds before signature expires after creation time. + + + packet giving the User ID of the signer. + + + packet giving trust. + + + + Represents revocation key OpenPGP signature sub packet. + + + + + Represents revocation reason OpenPGP signature sub packet. + + + + Basic type for a symmetric key encrypted packet. + + + Basic tags for symmetric key algorithms + + + Basic type for a symmetric encrypted session key packet + + + @return int + + + @return S2k + + + @return byte[] + + + @return int + + + Basic type for a trust packet. + + + Basic type for a user attribute packet. + + + Basic type for a user attribute sub-packet. + + + return the generic data making up the packet. + + + reader for user attribute sub-packets + + + Basic PGP user attribute sub-packet tag types. + + + Basic type for a user ID packet. + + + Compressed data objects + + + The algorithm used for compression + + + Get the raw input stream contained in the object. + + + Return an uncompressed input stream which allows reading of the compressed data. + + + Class for producing compressed data packets. + + + +

+ Return an output stream which will save the data being written to + the compressed object. +

+

+ The stream created can be closed off by either calling Close() + on the stream or Close() on the generator. Closing the returned + stream does not close off the Stream parameter outStr. +

+
+ Stream to be used for output. + A Stream for output of the compressed data. + + + +
+ + +

+ Return an output stream which will compress the data as it is written to it. + The stream will be written out in chunks according to the size of the passed in buffer. +

+

+ The stream created can be closed off by either calling Close() + on the stream or Close() on the generator. Closing the returned + stream does not close off the Stream parameter outStr. +

+

+ Note: if the buffer is not a power of 2 in length only the largest power of 2 + bytes worth of the buffer will be used. +

+

+ Note: using this may break compatibility with RFC 1991 compliant tools. + Only recent OpenPGP implementations are capable of accepting these streams. +

+
+ Stream to be used for output. + The buffer to use. + A Stream for output of the compressed data. + + + + +
+ + Close the compressed object.summary> + + + + Thrown if the IV at the start of a data stream indicates the wrong key is being used. + + + + Return the raw input stream for the data stream. + + + Return true if the message is integrity protected. + True, if there is a modification detection code namespace associated + with this stream. + + + Note: This can only be called after the message has been read. + True, if the message verifies, false otherwise + + + Generator for encrypted objects. + + + Existing SecureRandom constructor. + The symmetric algorithm to use. + Source of randomness. + + + Creates a cipher stream which will have an integrity packet associated with it. + + + Base constructor. + The symmetric algorithm to use. + Source of randomness. + PGP 2.6.x compatibility required. + + + + Add a PBE encryption method to the encrypted object using the default algorithm (S2K_SHA1). + + + Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is + the historical behaviour of the library (1.7 and earlier). + + + + Add a PBE encryption method to the encrypted object. + + Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is + the historical behaviour of the library (1.7 and earlier). + + + + Add a PBE encryption method to the encrypted object. + + The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes). + + + + Add a PBE encryption method to the encrypted object. + + Allows the caller to handle the encoding of the passphrase to bytes. + + + + Add a public key encrypted session key to the encrypted object. + + + +

+ If buffer is non null stream assumed to be partial, otherwise the length will be used + to output a fixed length packet. +

+

+ The stream created can be closed off by either calling Close() + on the stream or Close() on the generator. Closing the returned + stream does not close off the Stream parameter outStr. +

+
+
+ + +

+ Return an output stream which will encrypt the data as it is written to it. +

+

+ The stream created can be closed off by either calling Close() + on the stream or Close() on the generator. Closing the returned + stream does not close off the Stream parameter outStr. +

+
+
+ + +

+ Return an output stream which will encrypt the data as it is written to it. + The stream will be written out in chunks according to the size of the passed in buffer. +

+

+ The stream created can be closed off by either calling Close() + on the stream or Close() on the generator. Closing the returned + stream does not close off the Stream parameter outStr. +

+

+ Note: if the buffer is not a power of 2 in length only the largest power of 2 + bytes worth of the buffer will be used. +

+
+
+ + +

+ Close off the encrypted object - this is equivalent to calling Close() on the stream + returned by the Open() method. +

+

+ Note: This does not close the underlying output stream, only the stream on top of + it created by the Open() method. +

+
+
+ + A holder for a list of PGP encryption method packets. + + + Generic exception class for PGP encoding/decoding problems. + + + Key flag values for the KeyFlags subpacket. + + + + General class to handle JCA key pairs and convert them into OpenPGP ones. +

+ A word for the unwary, the KeyId for an OpenPGP public key is calculated from + a hash that includes the time of creation, if you pass a different date to the + constructor below with the same public private key pair the KeyIs will not be the + same as for previous generations of the key, so ideally you only want to do + this once. +

+
+
+ + Create a key pair from a PgpPrivateKey and a PgpPublicKey. + The public key. + The private key. + + + The keyId associated with this key pair. + + + + Generator for a PGP master and subkey ring. + This class will generate both the secret and public key rings + + + + + Create a new key ring generator using old style checksumming. It is recommended to use + SHA1 checksumming where possible. + + + Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is + the historical behaviour of the library (1.7 and earlier). + + The certification level for keys on this ring. + The master key pair. + The id to be associated with the ring. + The algorithm to be used to protect secret keys. + The passPhrase to be used to protect secret keys. + Packets to be included in the certification hash. + Packets to be attached unhashed to the certification. + input secured random. + + + + Create a new key ring generator. + + + Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is + the historical behaviour of the library (1.7 and earlier). + + The certification level for keys on this ring. + The master key pair. + The id to be associated with the ring. + The algorithm to be used to protect secret keys. + The passPhrase to be used to protect secret keys. + Checksum the secret keys with SHA1 rather than the older 16 bit checksum. + Packets to be included in the certification hash. + Packets to be attached unhashed to the certification. + input secured random. + + + + Create a new key ring generator. + + The certification level for keys on this ring. + The master key pair. + The id to be associated with the ring. + The algorithm to be used to protect secret keys. + + If true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion + is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier). + + The passPhrase to be used to protect secret keys. + Checksum the secret keys with SHA1 rather than the older 16 bit checksum. + Packets to be included in the certification hash. + Packets to be attached unhashed to the certification. + input secured random. + + + + Create a new key ring generator. + + The certification level for keys on this ring. + The master key pair. + The id to be associated with the ring. + The algorithm to be used to protect secret keys. + The passPhrase to be used to protect secret keys. + Checksum the secret keys with SHA1 rather than the older 16 bit checksum. + Packets to be included in the certification hash. + Packets to be attached unhashed to the certification. + input secured random. + + + + Create a new key ring generator. + + + Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is + the historical behaviour of the library (1.7 and earlier). + + The certification level for keys on this ring. + The master key pair. + The id to be associated with the ring. + The algorithm to be used to protect secret keys. + The hash algorithm. + The passPhrase to be used to protect secret keys. + Checksum the secret keys with SHA1 rather than the older 16 bit checksum. + Packets to be included in the certification hash. + Packets to be attached unhashed to the certification. + input secured random. + + + + Create a new key ring generator. + + The certification level for keys on this ring. + The master key pair. + The id to be associated with the ring. + The algorithm to be used to protect secret keys. + The hash algorithm. + + If true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion + is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier). + + The passPhrase to be used to protect secret keys. + Checksum the secret keys with SHA1 rather than the older 16 bit checksum. + Packets to be included in the certification hash. + Packets to be attached unhashed to the certification. + input secured random. + + + + Create a new key ring generator. + + + Allows the caller to handle the encoding of the passphrase to bytes. + + The certification level for keys on this ring. + The master key pair. + The id to be associated with the ring. + The algorithm to be used to protect secret keys. + The hash algorithm. + The passPhrase to be used to protect secret keys. + Checksum the secret keys with SHA1 rather than the older 16 bit checksum. + Packets to be included in the certification hash. + Packets to be attached unhashed to the certification. + input secured random. + + + Add a subkey to the key ring to be generated with default certification. + + + + Add a subkey to the key ring to be generated with default certification. + + The key pair. + The hash algorithm. + + + + Add a subkey with specific hashed and unhashed packets associated with it and + default certification. + + Public/private key pair. + Hashed packet values to be included in certification. + Unhashed packets values to be included in certification. + + + + + Add a subkey with specific hashed and unhashed packets associated with it and + default certification. + + Public/private key pair. + Hashed packet values to be included in certification. + Unhashed packets values to be included in certification. + The hash algorithm. + exception adding subkey: + + + + Return the secret key ring. + + + Return the public key ring that corresponds to the secret key ring. + + + + Thrown if the key checksum is invalid. + + + + Class for processing literal data objects. + + + The special name indicating a "for your eyes only" packet. + + + The format of the data stream - Binary or Text + + + The file name that's associated with the data stream. + + + Return the file name as an unintrepreted byte array. + + + The modification time for the file. + + + The raw input stream for the data stream. + + + The input stream representing the data stream. + + + Class for producing literal data packets. + + + The special name indicating a "for your eyes only" packet. + + + + Generates literal data objects in the old format. + This is important if you need compatibility with PGP 2.6.x. + + If true, uses old format. + + + +

+ Open a literal data packet, returning a stream to store the data inside the packet. +

+

+ The stream created can be closed off by either calling Close() + on the stream or Close() on the generator. Closing the returned + stream does not close off the Stream parameter outStr. +

+
+ The stream we want the packet in. + The format we are using. + The name of the 'file'. + The length of the data we will write. + The time of last modification we want stored. +
+ + +

+ Open a literal data packet, returning a stream to store the data inside the packet, + as an indefinite length stream. The stream is written out as a series of partial + packets with a chunk size determined by the size of the passed in buffer. +

+

+ The stream created can be closed off by either calling Close() + on the stream or Close() on the generator. Closing the returned + stream does not close off the Stream parameter outStr. +

+

+ Note: if the buffer is not a power of 2 in length only the largest power of 2 + bytes worth of the buffer will be used.

+
+ The stream we want the packet in. + The format we are using. + The name of the 'file'. + The time of last modification we want stored. + The buffer to use for collecting data to put into chunks. +
+ + +

+ Open a literal data packet for the passed in FileInfo object, returning + an output stream for saving the file contents. +

+

+ The stream created can be closed off by either calling Close() + on the stream or Close() on the generator. Closing the returned + stream does not close off the Stream parameter outStr. +

+
+ The stream we want the packet in. + The format we are using. + The FileInfo object containg the packet details. +
+ + + Close the literal data packet - this is equivalent to calling Close() + on the stream returned by the Open() method. + + + + + A PGP marker packet - in general these should be ignored other than where + the idea is to preserve the original input stream. + + + + + General class for reading a PGP object stream. +

+ Note: if this class finds a PgpPublicKey or a PgpSecretKey it + will create a PgpPublicKeyRing, or a PgpSecretKeyRing for each + key found. If all you are trying to do is read a key ring file use + either PgpPublicKeyRingBundle or PgpSecretKeyRingBundle.

+
+
+ + Return the next object in the stream, or null if the end is reached. + On a parse error + + + + Return all available objects in a list. + + An IList containing all objects from this factory, in order. + + + + Read all available objects, returning only those that are assignable to the specified type. + + The type of objects to return. All other objects are ignored. + An IList containing the filtered objects from this factory, in order. + + + A one pass signature object. + + + Initialise the signature object for verification. + + + Verify the calculated signature against the passed in PgpSignature. + + + Holder for a list of PgpOnePassSignature objects. + + + Padding functions. + + + A password based encryption object. + + + Return the raw input stream for the data stream. + + + Return the decrypted input stream, using the passed in passphrase. + + Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is + the historical behaviour of the library (1.7 and earlier). + + + + Return the decrypted input stream, using the passed in passphrase. + + The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes). + + + + Return the decrypted input stream, using the passed in passphrase. + + Allows the caller to handle the encoding of the passphrase to bytes. + + + + General class to contain a private key for use with other OpenPGP objects. + + + + Create a PgpPrivateKey from a keyID, the associated public data packet, and a regular private key. + + ID of the corresponding public key. + the public key data packet to be associated with this private key. + the private key data packet to be associated with this private key. + + + The keyId associated with the contained private key. + + + The public key packet associated with this private key, if available. + + + The contained private key. + + + General class to handle a PGP public key object. + + + + Create a PgpPublicKey from the passed in lightweight one. + + + Note: the time passed in affects the value of the key's keyId, so you probably only want + to do this once for a lightweight key, or make sure you keep track of the time you used. + + Asymmetric algorithm type representing the public key. + Actual public key to associate. + Date of creation. + If pubKey is not public. + On key creation problem. + + + Constructor for a sub-key. + + + Copy constructor. + The public key to copy. + + + The version of this key. + + + The creation time of this key. + + + The number of valid days from creation time - zero means no expiry. + WARNING: This method will return 1 for keys with version > 3 that expire in less than 1 day + + + Return the trust data associated with the public key, if present. + A byte array with trust data, null otherwise. + + + The number of valid seconds from creation time - zero means no expiry. + + + The keyId associated with the public key. + + + The fingerprint of the key + + + + Check if this key has an algorithm type that makes it suitable to use for encryption. + + + Note: with version 4 keys KeyFlags subpackets should also be considered when present for + determining the preferred use of the key. + + + true if this key algorithm is suitable for encryption. + + + + True, if this could be a master key. + + + The algorithm code associated with the public key. + + + The strength of the key in bits. + + + The public key contained in the object. + A lightweight public key. + If the key algorithm is not recognised. + + + Allows enumeration of any user IDs associated with the key. + An IEnumerable of string objects. + + + Allows enumeration of any user attribute vectors associated with the key. + An IEnumerable of PgpUserAttributeSubpacketVector objects. + + + Allows enumeration of any signatures associated with the passed in id. + The ID to be matched. + An IEnumerable of PgpSignature objects. + + + Allows enumeration of signatures associated with the passed in user attributes. + The vector of user attributes to be matched. + An IEnumerable of PgpSignature objects. + + + Allows enumeration of signatures of the passed in type that are on this key. + The type of the signature to be returned. + An IEnumerable of PgpSignature objects. + + + Allows enumeration of all signatures/certifications associated with this key. + An IEnumerable with all signatures/certifications. + + + Return all signatures/certifications directly associated with this key (ie, not to a user id). + + @return an iterator (possibly empty) with all signatures/certifications. + + + Check whether this (sub)key has a revocation signature on it. + True, if this (sub)key has been revoked. + + + Add a certification for an id to the given public key. + The key the certification is to be added to. + The ID the certification is associated with. + The new certification. + The re-certified key. + + + Add a certification for the given UserAttributeSubpackets to the given public key. + The key the certification is to be added to. + The attributes the certification is associated with. + The new certification. + The re-certified key. + + + + Remove any certifications associated with a user attribute subpacket on a key. + + The key the certifications are to be removed from. + The attributes to be removed. + + The re-certified key, or null if the user attribute subpacket was not found on the key. + + + + Remove any certifications associated with a given ID on a key. + The key the certifications are to be removed from. + The ID that is to be removed. + The re-certified key, or null if the ID was not found on the key. + + + Remove a certification associated with a given ID on a key. + The key the certifications are to be removed from. + The ID that the certfication is to be removed from. + The certfication to be removed. + The re-certified key, or null if the certification was not found. + + + Remove a certification associated with a given user attributes on a key. + The key the certifications are to be removed from. + The user attributes that the certfication is to be removed from. + The certification to be removed. + The re-certified key, or null if the certification was not found. + + + Add a revocation or some other key certification to a key. + The key the revocation is to be added to. + The key signature to be added. + The new changed public key object. + + + Remove a certification from the key. + The key the certifications are to be removed from. + The certfication to be removed. + The modified key, null if the certification was not found. + + + A public key encrypted data object. + + + The key ID for the key used to encrypt the data. + + + + Return the algorithm code for the symmetric algorithm used to encrypt the data. + + + + Return the decrypted data stream for the packet. + + + + Class to hold a single master public key and its subkeys. +

+ Often PGP keyring files consist of multiple master keys, if you are trying to process + or construct one of these you should use the PgpPublicKeyRingBundle class. +

+
+
+ + Return the first public key in the ring. + + + Return the public key referred to by the passed in key ID if it is present. + + + Allows enumeration of all the public keys. + An IEnumerable of PgpPublicKey objects. + + + + Returns a new key ring with the public key passed in either added or + replacing an existing one. + + The public key ring to be modified. + The public key to be inserted. + A new PgpPublicKeyRing + + + Returns a new key ring with the public key passed in removed from the key ring. + The public key ring to be modified. + The public key to be removed. + A new PgpPublicKeyRing, or null if pubKey is not found. + + + + Often a PGP key ring file is made up of a succession of master/sub-key key rings. + If you want to read an entire public key file in one hit this is the class for you. + + + + Build a PgpPublicKeyRingBundle from the passed in input stream. + Input stream containing data. + If a problem parsing the stream occurs. + If an object is encountered which isn't a PgpPublicKeyRing. + + + Return the number of key rings in this collection. + + + Allow enumeration of the public key rings making up this collection. + + + Allow enumeration of the key rings associated with the passed in userId. + The user ID to be matched. + An IEnumerable of key rings which matched (possibly none). + + + Allow enumeration of the key rings associated with the passed in userId. + The user ID to be matched. + If true, userId need only be a substring of an actual ID string to match. + An IEnumerable of key rings which matched (possibly none). + + + Allow enumeration of the key rings associated with the passed in userId. + The user ID to be matched. + If true, userId need only be a substring of an actual ID string to match. + If true, case is ignored in user ID comparisons. + An IEnumerable of key rings which matched (possibly none). + + + Return the PGP public key associated with the given key id. + The ID of the public key to return. + + + Return the public key ring which contains the key referred to by keyId + key ID to match against + + + + Return true if a key matching the passed in key ID is present, false otherwise. + + key ID to look for. + + + + Return a new bundle containing the contents of the passed in bundle and + the passed in public key ring. + + The PgpPublicKeyRingBundle the key ring is to be added to. + The key ring to be added. + A new PgpPublicKeyRingBundle merging the current one with the passed in key ring. + If the keyId for the passed in key ring is already present. + + + + Return a new bundle containing the contents of the passed in bundle with + the passed in public key ring removed. + + The PgpPublicKeyRingBundle the key ring is to be removed from. + The key ring to be removed. + A new PgpPublicKeyRingBundle not containing the passed in key ring. + If the keyId for the passed in key ring is not present. + + + General class to handle a PGP secret key object. + + + + Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is + the historical behaviour of the library (1.7 and earlier). + + + + + Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is + the historical behaviour of the library (1.7 and earlier). + + + + + If utf8PassPhrase is true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion + is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier). + + + + + Allows the caller to handle the encoding of the passphrase to bytes. + + + + + Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is + the historical behaviour of the library (1.7 and earlier). + + + + + If utf8PassPhrase is true, conversion of the passphrase to bytes uses Encoding.UTF8.GetBytes(), otherwise the conversion + is performed using Convert.ToByte(), which is the historical behaviour of the library (1.7 and earlier). + + + + + Allows the caller to handle the encoding of the passphrase to bytes. + + + + + Check if this key has an algorithm type that makes it suitable to use for signing. + + + Note: with version 4 keys KeyFlags subpackets should also be considered when present for + determining the preferred use of the key. + + + true if this key algorithm is suitable for use with signing. + + + + True, if this is a master key. + + + Detect if the Secret Key's Private Key is empty or not + + + The algorithm the key is encrypted with. + + + The key ID of the public key associated with this key. + + + Return the S2K usage associated with this key. + + + Return the S2K used to process this key. + + + The public key associated with this key. + + + Allows enumeration of any user IDs associated with the key. + An IEnumerable of string objects. + + + Allows enumeration of any user attribute vectors associated with the key. + An IEnumerable of string objects. + + + Extract a PgpPrivateKey from this secret key's encrypted contents. + + Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is + the historical behaviour of the library (1.7 and earlier). + + + + Extract a PgpPrivateKey from this secret key's encrypted contents. + + The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes). + + + + Extract a PgpPrivateKey from this secret key's encrypted contents. + + Allows the caller to handle the encoding of the passphrase to bytes. + + + + + Return a copy of the passed in secret key, encrypted using a new password + and the passed in algorithm. + + + Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is + the historical behaviour of the library (1.7 and earlier). + + The PgpSecretKey to be copied. + The current password for the key. + The new password for the key. + The algorithm to be used for the encryption. + Source of randomness. + + + + Return a copy of the passed in secret key, encrypted using a new password + and the passed in algorithm. + + + The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes). + + The PgpSecretKey to be copied. + The current password for the key. + The new password for the key. + The algorithm to be used for the encryption. + Source of randomness. + + + + Return a copy of the passed in secret key, encrypted using a new password + and the passed in algorithm. + + + Allows the caller to handle the encoding of the passphrase to bytes. + + The PgpSecretKey to be copied. + The current password for the key. + The new password for the key. + The algorithm to be used for the encryption. + Source of randomness. + + + Replace the passed the public key on the passed in secret key. + Secret key to change. + New public key. + A new secret key. + If KeyId's do not match. + + + + Parse a secret key from one of the GPG S expression keys associating it with the passed in public key. + + + Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is + the historical behaviour of the library (1.7 and earlier). + + + + + Parse a secret key from one of the GPG S expression keys associating it with the passed in public key. + + + The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes). + + + + + Parse a secret key from one of the GPG S expression keys associating it with the passed in public key. + + + Allows the caller to handle the encoding of the passphrase to bytes. + + + + + Parse a secret key from one of the GPG S expression keys. + + + Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is + the historical behaviour of the library (1.7 and earlier). + + + + + Parse a secret key from one of the GPG S expression keys. + + + The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes). + + + + + Parse a secret key from one of the GPG S expression keys. + + + Allows the caller to handle the encoding of the passphrase to bytes. + + + + + Parse a secret key from one of the GPG S expression keys. + + + + + Class to hold a single master secret key and its subkeys. +

+ Often PGP keyring files consist of multiple master keys, if you are trying to process + or construct one of these you should use the PgpSecretKeyRingBundle class. +

+
+
+ + Return the public key for the master key. + + + Return the master private key. + + + Allows enumeration of the secret keys. + An IEnumerable of PgpSecretKey objects. + + + + Return an iterator of the public keys in the secret key ring that + have no matching private key. At the moment only personal certificate data + appears in this fashion. + + An IEnumerable of unattached, or extra, public keys. + + + + Replace the public key set on the secret ring with the corresponding key off the public ring. + + Secret ring to be changed. + Public ring containing the new public key set. + + + + Return a copy of the passed in secret key ring, with the master key and sub keys encrypted + using a new password and the passed in algorithm. + + The PgpSecretKeyRing to be copied. + The current password for key. + The new password for the key. + The algorithm to be used for the encryption. + Source of randomness. + + + + Returns a new key ring with the secret key passed in either added or + replacing an existing one with the same key ID. + + The secret key ring to be modified. + The secret key to be inserted. + A new PgpSecretKeyRing + + + Returns a new key ring with the secret key passed in removed from the key ring. + The secret key ring to be modified. + The secret key to be removed. + A new PgpSecretKeyRing, or null if secKey is not found. + + + + Often a PGP key ring file is made up of a succession of master/sub-key key rings. + If you want to read an entire secret key file in one hit this is the class for you. + + + + Build a PgpSecretKeyRingBundle from the passed in input stream. + Input stream containing data. + If a problem parsing the stream occurs. + If an object is encountered which isn't a PgpSecretKeyRing. + + + Return the number of rings in this collection. + + + Allow enumeration of the secret key rings making up this collection. + + + Allow enumeration of the key rings associated with the passed in userId. + The user ID to be matched. + An IEnumerable of key rings which matched (possibly none). + + + Allow enumeration of the key rings associated with the passed in userId. + The user ID to be matched. + If true, userId need only be a substring of an actual ID string to match. + An IEnumerable of key rings which matched (possibly none). + + + Allow enumeration of the key rings associated with the passed in userId. + The user ID to be matched. + If true, userId need only be a substring of an actual ID string to match. + If true, case is ignored in user ID comparisons. + An IEnumerable of key rings which matched (possibly none). + + + Return the PGP secret key associated with the given key id. + The ID of the secret key to return. + + + Return the secret key ring which contains the key referred to by keyId + The ID of the secret key + + + + Return true if a key matching the passed in key ID is present, false otherwise. + + key ID to look for. + + + + Return a new bundle containing the contents of the passed in bundle and + the passed in secret key ring. + + The PgpSecretKeyRingBundle the key ring is to be added to. + The key ring to be added. + A new PgpSecretKeyRingBundle merging the current one with the passed in key ring. + If the keyId for the passed in key ring is already present. + + + + Return a new bundle containing the contents of the passed in bundle with + the passed in secret key ring removed. + + The PgpSecretKeyRingBundle the key ring is to be removed from. + The key ring to be removed. + A new PgpSecretKeyRingBundle not containing the passed in key ring. + If the keyId for the passed in key ring is not present. + + + A PGP signature object. + + + The OpenPGP version number for this signature. + + + The key algorithm associated with this signature. + + + The hash algorithm associated with this signature. + + + Return true if this signature represents a certification. + + + + Verify the signature as certifying the passed in public key as associated + with the passed in user attributes. + + User attributes the key was stored under. + The key to be verified. + True, if the signature matches, false otherwise. + + + + Verify the signature as certifying the passed in public key as associated + with the passed in ID. + + ID the key was stored under. + The key to be verified. + True, if the signature matches, false otherwise. + + + Verify a certification for the passed in key against the passed in master key. + The key we are verifying against. + The key we are verifying. + True, if the certification is valid, false otherwise. + + + Verify a key certification, such as revocation, for the passed in key. + The key we are checking. + True, if the certification is valid, false otherwise. + + + The ID of the key that created the signature. + + + The creation time of this signature. + + + + Return true if the signature has either hashed or unhashed subpackets. + + + + + Return true if the passed in signature type represents a certification, false if the signature type is not. + + + true if signatureType is a certification, false otherwise. + + + Generator for PGP signatures. + + + Create a generator for the passed in keyAlgorithm and hashAlgorithm codes. + + + Initialise the generator for signing. + + + Initialise the generator for signing. + + + Return the one pass header associated with the current signature. + + + Return a signature object containing the current signature state. + + + Generate a certification for the passed in ID and key. + The ID we are certifying against the public key. + The key we are certifying against the ID. + The certification. + + + Generate a certification for the passed in userAttributes. + The ID we are certifying against the public key. + The key we are certifying against the ID. + The certification. + + + Generate a certification for the passed in key against the passed in master key. + The key we are certifying against. + The key we are certifying. + The certification. + + + Generate a certification, such as a revocation, for the passed in key. + The key we are certifying. + The certification. + + + A list of PGP signatures - normally in the signature block after literal data. + + + Generator for signature subpackets. + + + + Add a TrustSignature packet to the signature. The values for depth and trust are largely + installation dependent but there are some guidelines in RFC 4880 - 5.2.3.13. + + true if the packet is critical. + depth level. + trust amount. + + + + Set the number of seconds a key is valid for after the time of its creation. + A value of zero means the key never expires. + + True, if should be treated as critical, false otherwise. + The number of seconds the key is valid, or zero if no expiry. + + + + Set the number of seconds a signature is valid for after the time of its creation. + A value of zero means the signature never expires. + + True, if should be treated as critical, false otherwise. + The number of seconds the signature is valid, or zero if no expiry. + + + + Set the creation time for the signature. +

+ Note: this overrides the generation of a creation time when the signature + is generated.

+
+
+ + + Sets revocation reason sub packet + + + + + Sets revocation key sub packet + + + + + Sets issuer key sub packet + + + + Container for a list of signature subpackets. + + + Return true if a particular subpacket type exists. + + @param type type to look for. + @return true if present, false otherwise. + + + Return all signature subpackets of the passed in type. + @param type subpacket type code + @return an array of zero or more matching subpackets. + + + + Return the number of seconds a signature is valid for after its creation date. + A value of zero means the signature never expires. + + Seconds a signature is valid for. + + + + Return the number of seconds a key is valid for after its creation date. + A value of zero means the key never expires. + + Seconds a signature is valid for. + + + Return the number of packets this vector contains. + + + Container for a list of user attribute subpackets. + + + Basic utility class. + + + + Conversion of the passphrase characters to bytes is performed using Convert.ToByte(), which is + the historical behaviour of the library (1.7 and earlier). + + + + + The passphrase is encoded to bytes using UTF8 (Encoding.UTF8.GetBytes). + + + + + Allows the caller to handle the encoding of the passphrase to bytes. + + + + Write out the passed in file as a literal data packet. + + + Write out the passed in file as a literal data packet in partial packet format. + + + + Return either an ArmoredInputStream or a BcpgInputStream based on whether + the initial characters of the stream are binary PGP encodings or not. + + + + Generator for old style PGP V3 Signatures. + + + Create a generator for the passed in keyAlgorithm and hashAlgorithm codes. + + + Initialise the generator for signing. + + + Initialise the generator for signing. + + + Return the one pass header associated with the current signature. + + + Return a V3 signature object containing the current signature state. + + + Utility functions for looking a S-expression keys. This class will move when it finds a better home! +

+ Format documented here: + http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=agent/keyformat.txt;h=42c4b1f06faf1bbe71ffadc2fee0fad6bec91a97;hb=refs/heads/master +

+
+ + + Wrap a PKIMessage ASN.1 structure. + + PKI message. + + + + Create a PKIMessage from the passed in bytes. + + BER/DER encoding of the PKIMessage + + + + Return true if this message has protection bits on it. A return value of true + indicates the message can be used to construct a ProtectedPKIMessage. + + + + + Wrapper for a PKIMessage with protection attached to it. + + + + + Wrap a general message. + + If the general message does not have protection. + The General message + + + + Wrap a PKI message. + + If the PKI message does not have protection. + The PKI message + + + + Message header + + + + + Message Body + + + + + Return the underlying ASN.1 structure contained in this object. + + PKI Message structure + + + + Determine whether the message is protected by a password based MAC. Use verify(PKMACBuilder, char[]) + to verify the message if this method returns true. + + true if protection MAC PBE based, false otherwise. + + + + Return the extra certificates associated with this message. + + an array of extra certificates, zero length if none present. + + + + Verify a message with a public key based signature attached. + + a factory of signature verifiers. + true if the provider is able to create a verifier that validates the signature, false otherwise. + + + + Verify a message with password based MAC protection. + + MAC builder that can be used to construct the appropriate MacCalculator + the MAC password + true if the passed in password and MAC builder verify the message, false otherwise. + if algorithm not MAC based, or an exception is thrown verifying the MAC. + + + + The 'Signature' parameter is only available when generating unsigned attributes. + + + + containing class for an CMS Authenticated Data object + + + return the object identifier for the content MAC algorithm. + + + return a store of the intended recipients for this message + + + return the ContentInfo + + + return a table of the digested attributes indexed by + the OID of the attribute. + + + return a table of the undigested attributes indexed by + the OID of the attribute. + + + return the ASN.1 encoded representation of this object. + + + General class for generating a CMS authenticated-data message. + + A simple example of usage. + +
+                  CMSAuthenticatedDataGenerator  fact = new CMSAuthenticatedDataGenerator();
+            
+                  fact.addKeyTransRecipient(cert);
+            
+                  CMSAuthenticatedData         data = fact.generate(content, algorithm, "BC");
+             
+
+ + base constructor + + + constructor allowing specific source of randomness + @param rand instance of SecureRandom to use + + + generate an enveloped object that contains an CMS Enveloped Data + object using the given provider and the passed in key generator. + + + generate an authenticated object that contains an CMS Authenticated Data object + + + Parsing class for an CMS Authenticated Data object from an input stream. +

+ Note: that because we are in a streaming mode only one recipient can be tried and it is important + that the methods on the parser are called in the appropriate order. +

+

+ Example of use - assuming the first recipient matches the private key we have. +

+                  CMSAuthenticatedDataParser     ad = new CMSAuthenticatedDataParser(inputStream);
+            
+                  RecipientInformationStore  recipients = ad.getRecipientInfos();
+            
+                  Collection  c = recipients.getRecipients();
+                  Iterator    it = c.iterator();
+            
+                  if (it.hasNext())
+                  {
+                      RecipientInformation   recipient = (RecipientInformation)it.next();
+            
+                      CMSTypedStream recData = recipient.getContentStream(privateKey, "BC");
+            
+                      processDataStream(recData.getContentStream());
+            
+                      if (!Arrays.equals(ad.getMac(), recipient.getMac())
+                      {
+                          System.err.println("Data corrupted!!!!");
+                      }
+                  }
+              
+ Note: this class does not introduce buffering - if you are processing large files you should create + the parser with: +
+                      CMSAuthenticatedDataParser     ep = new CMSAuthenticatedDataParser(new BufferedInputStream(inputStream, bufSize));
+              
+ where bufSize is a suitably large buffer size. +

+
+ + return the object identifier for the mac algorithm. + + + return the ASN.1 encoded encryption algorithm parameters, or null if + there aren't any. + + + return a store of the intended recipients for this message + + + return a table of the unauthenticated attributes indexed by + the OID of the attribute. + @exception java.io.IOException + + + return a table of the unauthenticated attributes indexed by + the OID of the attribute. + @exception java.io.IOException + + + General class for generating a CMS authenticated-data message stream. +

+ A simple example of usage. +

+                  CMSAuthenticatedDataStreamGenerator edGen = new CMSAuthenticatedDataStreamGenerator();
+            
+                  edGen.addKeyTransRecipient(cert);
+            
+                  ByteArrayOutputStream  bOut = new ByteArrayOutputStream();
+            
+                  OutputStream out = edGen.open(
+                                          bOut, CMSAuthenticatedDataGenerator.AES128_CBC, "BC");*
+                  out.write(data);
+            
+                  out.close();
+             
+

+
+ + base constructor + + + constructor allowing specific source of randomness + @param rand instance of SecureRandom to use + + + Set the underlying string size for encapsulated data + + @param bufferSize length of octet strings to buffer the data. + + + Use a BER Set to store the recipient information + + + generate an enveloped object that contains an CMS Enveloped Data + object using the given provider and the passed in key generator. + @throws java.io.IOException + + + generate an enveloped object that contains an CMS Enveloped Data object + + + generate an enveloped object that contains an CMS Enveloped Data object + + + base constructor + + + constructor allowing specific source of randomness + + @param rand instance of SecureRandom to use + + + containing class for an CMS AuthEnveloped Data object + + + containing class for an CMS Compressed Data object + + + Return the uncompressed content. + + @return the uncompressed content + @throws CmsException if there is an exception uncompressing the data. + + + Return the uncompressed content, throwing an exception if the data size + is greater than the passed in limit. If the content is exceeded getCause() + on the CMSException will contain a StreamOverflowException + + @param limit maximum number of bytes to read + @return the content read + @throws CMSException if there is an exception uncompressing the data. + + + return the ContentInfo + + + return the ASN.1 encoded representation of this object. + + + * General class for generating a compressed CMS message. + *

+ * A simple example of usage.

+ *

+ *

+                *      CMSCompressedDataGenerator fact = new CMSCompressedDataGenerator();
+                *      CMSCompressedData data = fact.Generate(content, algorithm);
+                * 
+ *

+
+ + Generate an object that contains an CMS Compressed Data + + + Class for reading a CMS Compressed Data stream. +
+                 CMSCompressedDataParser cp = new CMSCompressedDataParser(inputStream);
+            
+                 process(cp.GetContent().GetContentStream());
+             
+ Note: this class does not introduce buffering - if you are processing large files you should create + the parser with: +
+                  CMSCompressedDataParser     ep = new CMSCompressedDataParser(new BufferedInputStream(inputStream, bufSize));
+              
+ where bufSize is a suitably large buffer size. +
+ + General class for generating a compressed CMS message stream. +

+ A simple example of usage. +

+
+                  CMSCompressedDataStreamGenerator gen = new CMSCompressedDataStreamGenerator();
+            
+                  Stream cOut = gen.Open(outputStream, CMSCompressedDataStreamGenerator.ZLIB);
+            
+                  cOut.Write(data);
+            
+                  cOut.Close();
+             
+
+ + base constructor + + + Set the underlying string size for encapsulated data + + @param bufferSize length of octet strings to buffer the data. + + + Close the underlying data stream. + @throws IOException if the close fails. + + + containing class for an CMS Enveloped Data object + + + return the object identifier for the content encryption algorithm. + + + return a store of the intended recipients for this message + + + return the ContentInfo + + + return a table of the unprotected attributes indexed by + the OID of the attribute. + + + return the ASN.1 encoded representation of this object. + + + + General class for generating a CMS enveloped-data message. + + A simple example of usage. + +
+                  CmsEnvelopedDataGenerator  fact = new CmsEnvelopedDataGenerator();
+            
+                  fact.AddKeyTransRecipient(cert);
+            
+                  CmsEnvelopedData         data = fact.Generate(content, algorithm);
+             
+
+
+ + Constructor allowing specific source of randomness + Instance of SecureRandom to use. + + + + Generate an enveloped object that contains a CMS Enveloped Data + object using the passed in key generator. + + + + Generate an enveloped object that contains an CMS Enveloped Data object. + + + Generate an enveloped object that contains an CMS Enveloped Data object. + + + Parsing class for an CMS Enveloped Data object from an input stream. +

+ Note: that because we are in a streaming mode only one recipient can be tried and it is important + that the methods on the parser are called in the appropriate order. +

+

+ Example of use - assuming the first recipient matches the private key we have. +

+                  CmsEnvelopedDataParser     ep = new CmsEnvelopedDataParser(inputStream);
+            
+                  RecipientInformationStore  recipients = ep.GetRecipientInfos();
+            
+                  Collection  c = recipients.getRecipients();
+                  Iterator    it = c.iterator();
+            
+                  if (it.hasNext())
+                  {
+                      RecipientInformation   recipient = (RecipientInformation)it.next();
+            
+                      CMSTypedStream recData = recipient.getContentStream(privateKey);
+            
+                      processDataStream(recData.getContentStream());
+                  }
+              
+ Note: this class does not introduce buffering - if you are processing large files you should create + the parser with: +
+                      CmsEnvelopedDataParser     ep = new CmsEnvelopedDataParser(new BufferedInputStream(inputStream, bufSize));
+              
+ where bufSize is a suitably large buffer size. +

+
+ + return the object identifier for the content encryption algorithm. + + + return the ASN.1 encoded encryption algorithm parameters, or null if + there aren't any. + + + return a store of the intended recipients for this message + + + return a table of the unprotected attributes indexed by + the OID of the attribute. + @throws IOException + + + General class for generating a CMS enveloped-data message stream. +

+ A simple example of usage. +

+                  CmsEnvelopedDataStreamGenerator edGen = new CmsEnvelopedDataStreamGenerator();
+            
+                  edGen.AddKeyTransRecipient(cert);
+            
+                  MemoryStream  bOut = new MemoryStream();
+            
+                  Stream out = edGen.Open(
+                                          bOut, CMSEnvelopedDataGenerator.AES128_CBC);*
+                  out.Write(data);
+            
+                  out.Close();
+             
+

+
+ + Constructor allowing specific source of randomness + Instance of SecureRandom to use. + + + Set the underlying string size for encapsulated data. + Length of octet strings to buffer the data. + + + Use a BER Set to store the recipient information. + + + + Generate an enveloped object that contains an CMS Enveloped Data + object using the passed in key generator. + + + + generate an enveloped object that contains an CMS Enveloped Data object + @throws IOException + + + generate an enveloped object that contains an CMS Enveloped Data object + @throws IOException + + + General class for generating a CMS enveloped-data message. + + A simple example of usage. + +
+                  CMSEnvelopedDataGenerator  fact = new CMSEnvelopedDataGenerator();
+            
+                  fact.addKeyTransRecipient(cert);
+            
+                  CMSEnvelopedData         data = fact.generate(content, algorithm, "BC");
+             
+
+ + Constructor allowing specific source of randomness + Instance of SecureRandom to use. + + + add a recipient. + + @param cert recipient's public key certificate + @exception ArgumentException if there is a problem with the certificate + + + add a recipient + + @param key the public key used by the recipient + @param subKeyId the identifier for the recipient's public key + @exception ArgumentException if there is a problem with the key + + + add a KEK recipient. + @param key the secret key to use for wrapping + @param keyIdentifier the byte string that identifies the key + + + add a KEK recipient. + @param key the secret key to use for wrapping + @param keyIdentifier the byte string that identifies the key + + + Add a key agreement based recipient. + + @param agreementAlgorithm key agreement algorithm to use. + @param senderPrivateKey private key to initialise sender side of agreement with. + @param senderPublicKey sender public key to include with message. + @param recipientCert recipient's public key certificate. + @param cekWrapAlgorithm OID for key wrapping algorithm to use. + @exception SecurityUtilityException if the algorithm requested cannot be found + @exception InvalidKeyException if the keys are inappropriate for the algorithm specified + + + Add multiple key agreement based recipients (sharing a single KeyAgreeRecipientInfo structure). + + @param agreementAlgorithm key agreement algorithm to use. + @param senderPrivateKey private key to initialise sender side of agreement with. + @param senderPublicKey sender public key to include with message. + @param recipientCerts recipients' public key certificates. + @param cekWrapAlgorithm OID for key wrapping algorithm to use. + @exception SecurityUtilityException if the algorithm requested cannot be found + @exception InvalidKeyException if the keys are inappropriate for the algorithm specified + + + + Add a generator to produce the recipient info required. + + a generator of a recipient info object. + + + + Generic routine to copy out the data we want processed. + + + This routine may be called multiple times. + + + + a holding class for a byte array of data to be processed. + + + A clone of the byte array + + + a holding class for a file of data to be processed. + + + The file handle + + + general class for handling a pkcs7-signature message. + + A simple example of usage - note, in the example below the validity of + the certificate isn't verified, just the fact that one of the certs + matches the given signer... + +
+              IX509Store              certs = s.GetCertificates();
+              SignerInformationStore  signers = s.GetSignerInfos();
+            
+              foreach (SignerInformation signer in signers.GetSigners())
+              {
+                  ArrayList       certList = new ArrayList(certs.GetMatches(signer.SignerID));
+                  X509Certificate cert = (X509Certificate) certList[0];
+            
+                  if (signer.Verify(cert.GetPublicKey()))
+                  {
+                      verified++;
+                  }
+              }
+             
+
+ + Content with detached signature, digests precomputed + + @param hashes a map of precomputed digests for content indexed by name of hash. + @param sigBlock the signature object. + + + base constructor - content with detached signature. + + @param signedContent the content that was signed. + @param sigData the signature object. + + + base constructor - with encapsulated content + + + Return the version number for this object. + + + return the collection of signers that are associated with the + signatures for the message. + + + return a X509Store containing the attribute certificates, if any, contained + in this message. + + @param type type of store to create + @return a store of attribute certificates + @exception NoSuchStoreException if the store type isn't available. + @exception CmsException if a general exception prevents creation of the X509Store + + + return a X509Store containing the public key certificates, if any, contained + in this message. + + @param type type of store to create + @return a store of public key certificates + @exception NoSuchStoreException if the store type isn't available. + @exception CmsException if a general exception prevents creation of the X509Store + + + return a X509Store containing CRLs, if any, contained + in this message. + + @param type type of store to create + @return a store of CRLs + @exception NoSuchStoreException if the store type isn't available. + @exception CmsException if a general exception prevents creation of the X509Store + + + + Return the DerObjectIdentifier associated with the encapsulated + content info structure carried in the signed data. + + + + return the ContentInfo + + + return the ASN.1 encoded representation of this object. + + + return the ASN.1 encoded representation of this object using the specified encoding. + + @param encoding the ASN.1 encoding format to use ("BER" or "DER"). + + + Replace the signerinformation store associated with this + CmsSignedData object with the new one passed in. You would + probably only want to do this if you wanted to change the unsigned + attributes associated with a signer, or perhaps delete one. + + @param signedData the signed data object to be used as a base. + @param signerInformationStore the new signer information store to use. + @return a new signed data object. + + + Replace the certificate and CRL information associated with this + CmsSignedData object with the new one passed in. + + @param signedData the signed data object to be used as a base. + @param x509Certs the new certificates to be used. + @param x509Crls the new CRLs to be used. + @return a new signed data object. + @exception CmsException if there is an error processing the stores + + + * general class for generating a pkcs7-signature message. + *

+ * A simple example of usage. + * + *

+                 *      IX509Store certs...
+                 *      IX509Store crls...
+                 *      CmsSignedDataGenerator gen = new CmsSignedDataGenerator();
+                 *
+                 *      gen.AddSigner(privKey, cert, CmsSignedGenerator.DigestSha1);
+                 *      gen.AddCertificates(certs);
+                 *      gen.AddCrls(crls);
+                 *
+                 *      CmsSignedData data = gen.Generate(content);
+                 * 
+ *

+
+ + Constructor allowing specific source of randomness + Instance of SecureRandom to use. + + + * add a signer - no attributes other than the default ones will be + * provided here. + * + * @param key signing key to use + * @param cert certificate containing corresponding public key + * @param digestOID digest algorithm OID + + + add a signer, specifying the digest encryption algorithm to use - no attributes other than the default ones will be + provided here. + + @param key signing key to use + @param cert certificate containing corresponding public key + @param encryptionOID digest encryption algorithm OID + @param digestOID digest algorithm OID + + + add a signer - no attributes other than the default ones will be + provided here. + + + add a signer, specifying the digest encryption algorithm to use - no attributes other than the default ones will be + provided here. + + + * add a signer with extra signed/unsigned attributes. + * + * @param key signing key to use + * @param cert certificate containing corresponding public key + * @param digestOID digest algorithm OID + * @param signedAttr table of attributes to be included in signature + * @param unsignedAttr table of attributes to be included as unsigned + + + add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes. + + @param key signing key to use + @param cert certificate containing corresponding public key + @param encryptionOID digest encryption algorithm OID + @param digestOID digest algorithm OID + @param signedAttr table of attributes to be included in signature + @param unsignedAttr table of attributes to be included as unsigned + + + * add a signer with extra signed/unsigned attributes. + * + * @param key signing key to use + * @param subjectKeyID subjectKeyID of corresponding public key + * @param digestOID digest algorithm OID + * @param signedAttr table of attributes to be included in signature + * @param unsignedAttr table of attributes to be included as unsigned + + + add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes. + + @param key signing key to use + @param subjectKeyID subjectKeyID of corresponding public key + @param encryptionOID digest encryption algorithm OID + @param digestOID digest algorithm OID + @param signedAttr table of attributes to be included in signature + @param unsignedAttr table of attributes to be included as unsigned + + + add a signer with extra signed/unsigned attributes based on generators. + + + add a signer, specifying the digest encryption algorithm, with extra signed/unsigned attributes based on generators. + + + add a signer with extra signed/unsigned attributes based on generators. + + + add a signer, including digest encryption algorithm, with extra signed/unsigned attributes based on generators. + + + generate a signed object that for a CMS Signed Data object + + + generate a signed object that for a CMS Signed Data + object - if encapsulate is true a copy + of the message will be included in the signature. The content type + is set according to the OID represented by the string signedContentType. + + + generate a signed object that for a CMS Signed Data + object - if encapsulate is true a copy + of the message will be included in the signature with the + default content type "data". + + + generate a set of one or more SignerInformation objects representing counter signatures on + the passed in SignerInformation object. + + @param signer the signer to be countersigned + @param sigProvider the provider to be used for counter signing. + @return a store containing the signers. + + + Parsing class for an CMS Signed Data object from an input stream. +

+ Note: that because we are in a streaming mode only one signer can be tried and it is important + that the methods on the parser are called in the appropriate order. +

+

+ A simple example of usage for an encapsulated signature. +

+

+ Two notes: first, in the example below the validity of + the certificate isn't verified, just the fact that one of the certs + matches the given signer, and, second, because we are in a streaming + mode the order of the operations is important. +

+
+                  CmsSignedDataParser     sp = new CmsSignedDataParser(encapSigData);
+            
+                  sp.GetSignedContent().Drain();
+            
+                  IX509Store              certs = sp.GetCertificates();
+                  SignerInformationStore  signers = sp.GetSignerInfos();
+            
+                  foreach (SignerInformation signer in signers.GetSigners())
+                  {
+                      ArrayList       certList = new ArrayList(certs.GetMatches(signer.SignerID));
+                      X509Certificate cert = (X509Certificate) certList[0];
+            
+                      Console.WriteLine("verify returns: " + signer.Verify(cert));
+                  }
+             
+ Note also: this class does not introduce buffering - if you are processing large files you should create + the parser with: +
+                      CmsSignedDataParser     ep = new CmsSignedDataParser(new BufferedInputStream(encapSigData, bufSize));
+              
+ where bufSize is a suitably large buffer size. +
+ + base constructor - with encapsulated content + + + base constructor + + @param signedContent the content that was signed. + @param sigData the signature object. + + + Return the version number for the SignedData object + + @return the version number + + + return the collection of signers that are associated with the + signatures for the message. + @throws CmsException + + + return a X509Store containing the attribute certificates, if any, contained + in this message. + + @param type type of store to create + @return a store of attribute certificates + @exception org.bouncycastle.x509.NoSuchStoreException if the store type isn't available. + @exception CmsException if a general exception prevents creation of the X509Store + + + return a X509Store containing the public key certificates, if any, contained + in this message. + + @param type type of store to create + @return a store of public key certificates + @exception NoSuchStoreException if the store type isn't available. + @exception CmsException if a general exception prevents creation of the X509Store + + + return a X509Store containing CRLs, if any, contained + in this message. + + @param type type of store to create + @return a store of CRLs + @exception NoSuchStoreException if the store type isn't available. + @exception CmsException if a general exception prevents creation of the X509Store + + + + Return the DerObjectIdentifier associated with the encapsulated + content info structure carried in the signed data. + + + + Replace the signerinformation store associated with the passed + in message contained in the stream original with the new one passed in. + You would probably only want to do this if you wanted to change the unsigned + attributes associated with a signer, or perhaps delete one. +

+ The output stream is returned unclosed. +

+ @param original the signed data stream to be used as a base. + @param signerInformationStore the new signer information store to use. + @param out the stream to Write the new signed data object to. + @return out. +
+ + Replace the certificate and CRL information associated with this + CMSSignedData object with the new one passed in. +

+ The output stream is returned unclosed. +

+ @param original the signed data stream to be used as a base. + @param certsAndCrls the new certificates and CRLs to be used. + @param out the stream to Write the new signed data object to. + @return out. + @exception CmsException if there is an error processing the CertStore +
+ + General class for generating a pkcs7-signature message stream. +

+ A simple example of usage. +

+
+                  IX509Store                   certs...
+                  CmsSignedDataStreamGenerator gen = new CmsSignedDataStreamGenerator();
+            
+                  gen.AddSigner(privateKey, cert, CmsSignedDataStreamGenerator.DIGEST_SHA1);
+            
+                  gen.AddCertificates(certs);
+            
+                  Stream sigOut = gen.Open(bOut);
+            
+                  sigOut.Write(Encoding.UTF8.GetBytes("Hello World!"));
+            
+                  sigOut.Close();
+             
+
+ + Constructor allowing specific source of randomness + Instance of SecureRandom to use. + + + Set the underlying string size for encapsulated data + + @param bufferSize length of octet strings to buffer the data. + + + add a signer - no attributes other than the default ones will be + provided here. + @throws NoSuchAlgorithmException + @throws InvalidKeyException + + + add a signer, specifying the digest encryption algorithm - no attributes other than the default ones will be + provided here. + @throws NoSuchProviderException + @throws NoSuchAlgorithmException + @throws InvalidKeyException + + + add a signer with extra signed/unsigned attributes. + @throws NoSuchAlgorithmException + @throws InvalidKeyException + + + add a signer with extra signed/unsigned attributes - specifying digest + encryption algorithm. + @throws NoSuchProviderException + @throws NoSuchAlgorithmException + @throws InvalidKeyException + + + add a signer - no attributes other than the default ones will be + provided here. + @throws NoSuchAlgorithmException + @throws InvalidKeyException + + + add a signer - no attributes other than the default ones will be + provided here. + @throws NoSuchProviderException + @throws NoSuchAlgorithmException + @throws InvalidKeyException + + + add a signer with extra signed/unsigned attributes. + @throws NoSuchAlgorithmException + @throws InvalidKeyException + + + generate a signed object that for a CMS Signed Data object + + + generate a signed object that for a CMS Signed Data + object - if encapsulate is true a copy + of the message will be included in the signature with the + default content type "data". + + + generate a signed object that for a CMS Signed Data + object using the given provider - if encapsulate is true a copy + of the message will be included in the signature with the + default content type "data". If dataOutputStream is non null the data + being signed will be written to the stream as it is processed. + @param out stream the CMS object is to be written to. + @param encapsulate true if data should be encapsulated. + @param dataOutputStream output stream to copy the data being signed to. + + + generate a signed object that for a CMS Signed Data + object - if encapsulate is true a copy + of the message will be included in the signature. The content type + is set according to the OID represented by the string signedContentType. + + + generate a signed object that for a CMS Signed Data + object using the given provider - if encapsulate is true a copy + of the message will be included in the signature. The content type + is set according to the OID represented by the string signedContentType. + @param out stream the CMS object is to be written to. + @param signedContentType OID for data to be signed. + @param encapsulate true if data should be encapsulated. + @param dataOutputStream output stream to copy the data being signed to. + + + Default type for the signed data. + + + Constructor allowing specific source of randomness + Instance of SecureRandom to use. + + + Add the attribute certificates contained in the passed in store to the + generator. + + @param store a store of Version 2 attribute certificates + @throws CmsException if an error occurse processing the store. + + + Add a store of precalculated signers to the generator. + + @param signerStore store of signers + + + Return a map of oids and byte arrays representing the digests calculated on the content during + the last generate. + + @return a map of oids (as string objects) and byte[] representing digests. + + + Return the digest algorithm using one of the standard JCA string + representations rather than the algorithm identifier (if possible). + + + Return the digest encryption algorithm using one of the standard + JCA string representations rather than the algorithm identifier (if + possible). + + + Default authenticated attributes generator. + + + Initialise to use all defaults + + + Initialise with some extra attributes or overrides. + + @param attributeTable initial attribute table to use. + + + Create a standard attribute table from the passed in parameters - this will + normally include contentType and messageDigest. If the constructor + using an AttributeTable was used, entries in it for contentType and + messageDigest will override the generated ones. + + @param parameters source parameters for table generation. + + @return a filled in IDictionary of attributes. + + + @param parameters source parameters + @return the populated attribute table + + + Default signed attributes generator. + + + Initialise to use all defaults + + + Initialise with some extra attributes or overrides. + + @param attributeTable initial attribute table to use. + + + Create a standard attribute table from the passed in parameters - this will + normally include contentType, signingTime, and messageDigest. If the constructor + using an AttributeTable was used, entries in it for contentType, signingTime, and + messageDigest will override the generated ones. + + @param parameters source parameters for table generation. + + @return a filled in Hashtable of attributes. + + + @param parameters source parameters + @return the populated attribute table + + + the RecipientInfo class for a recipient who has been sent a message + encrypted using a secret key known to the other side. + + + decrypt the content and return an input stream. + + + the RecipientInfo class for a recipient who has been sent a message + encrypted using key agreement. + + + decrypt the content and return an input stream. + + + the KeyTransRecipientInformation class for a recipient who has been sent a secret + key encrypted using their public key that needs to be used to + extract the message. + + + decrypt the content and return it as a byte array. + + + a basic index for an originator. + + + Return the certificates stored in the underlying OriginatorInfo object. + + @return a Store of X509CertificateHolder objects. + + + Return the CRLs stored in the underlying OriginatorInfo object. + + @return a Store of X509CRLHolder objects. + + + Return the underlying ASN.1 object defining this SignerInformation object. + + @return a OriginatorInfo. + + + the RecipientInfo class for a recipient who has been sent a message + encrypted using a password. + + + return the object identifier for the key derivation algorithm, or null + if there is none present. + + @return OID for key derivation algorithm, if present. + + + decrypt the content and return an input stream. + + + + PKCS5 scheme-2 - password converted to bytes assuming ASCII. + + + + PKCS5 scheme-2 - password converted to bytes using UTF-8. + + + + Generate a RecipientInfo object for the given key. + + + A + + + A + + + A + + + + + * return the object identifier for the key encryption algorithm. + * + * @return OID for key encryption algorithm. + + + * return the ASN.1 encoded key encryption algorithm parameters, or null if + * there aren't any. + * + * @return ASN.1 encoding of key encryption algorithm parameters. + + + Return the MAC calculated for the content stream. Note: this call is only meaningful once all + the content has been read. + + @return byte array containing the mac. + + + Return the first RecipientInformation object that matches the + passed in selector. Null if there are no matches. + + @param selector to identify a recipient + @return a single RecipientInformation object. Null if none matches. + + + Return the number of recipients in the collection. + + @return number of recipients identified. + + + Return all recipients in the collection + + @return a collection of recipients. + + + Return possible empty collection with recipients matching the passed in RecipientID + + @param selector a recipient id to select against. + @return a collection of RecipientInformation objects. + + + a basic index for a signer. + + + If the passed in flag is true, the signer signature will be based on the data, not + a collection of signed attributes, and no signed attributes will be included. + + @return the builder object + + + Provide a custom signed attribute generator. + + @param signedGen a generator of signed attributes. + @return the builder object + + + Provide a generator of unsigned attributes. + + @param unsignedGen a generator for signed attributes. + @return the builder object + + + Build a generator with the passed in X.509 certificate issuer and serial number as the signerIdentifier. + + @param contentSigner operator for generating the final signature in the SignerInfo with. + @param certificate X.509 certificate related to the contentSigner. + @return a SignerInfoGenerator + @throws OperatorCreationException if the generator cannot be built. + + + Build a generator with the passed in subjectKeyIdentifier as the signerIdentifier. If used you should + try to follow the calculation described in RFC 5280 section 4.2.1.2. + + @param signerFactory operator factory for generating the final signature in the SignerInfo with. + @param subjectKeyIdentifier key identifier to identify the public key for verifying the signature. + @return a SignerInfoGenerator + + + an expanded SignerInfo block from a CMS Signed message + + + Protected constructor. In some cases clients have their own idea about how to encode + the signed attributes and calculate the signature. This constructor is to allow developers + to deal with that by extending off the class and overriding e.g. SignedAttributes property. + + @param baseInfo the SignerInformation to base this one on. + + + return the version number for this objects underlying SignerInfo structure. + + + return the object identifier for the signature. + + + return the signature parameters, or null if there aren't any. + + + return the content digest that was calculated during verification. + + + return the object identifier for the signature. + + + return the signature/encryption algorithm parameters, or null if + there aren't any. + + + return a table of the signed attributes - indexed by + the OID of the attribute. + + + return a table of the unsigned attributes indexed by + the OID of the attribute. + + + return the encoded signature + + + Return a SignerInformationStore containing the counter signatures attached to this + signer. If no counter signatures are present an empty store is returned. + + + return the DER encoding of the signed attributes. + @throws IOException if an encoding error occurs. + + + verify that the given public key successfully handles and confirms the + signature associated with this signer. + + + verify that the given certificate successfully handles and confirms + the signature associated with this signer and, if a signingTime + attribute is available, that the certificate was valid at the time the + signature was generated. + + + Return the base ASN.1 CMS structure that this object contains. + + @return an object containing a CMS SignerInfo structure. + + + Return a signer information object with the passed in unsigned + attributes replacing the ones that are current associated with + the object passed in. + + @param signerInformation the signerInfo to be used as the basis. + @param unsignedAttributes the unsigned attributes to add. + @return a copy of the original SignerInformationObject with the changed attributes. + + + Return a signer information object with passed in SignerInformationStore representing counter + signatures attached as an unsigned attribute. + + @param signerInformation the signerInfo to be used as the basis. + @param counterSigners signer info objects carrying counter signature. + @return a copy of the original SignerInformationObject with the changed attributes. + + + Create a store containing a single SignerInformation object. + + @param signerInfo the signer information to contain. + + + Create a store containing a collection of SignerInformation objects. + + @param signerInfos a collection signer information objects to contain. + + + Return the first SignerInformation object that matches the + passed in selector. Null if there are no matches. + + @param selector to identify a signer + @return a single SignerInformation object. Null if none matches. + + + The number of signers in the collection. + + + An ICollection of all signers in the collection + + + Return possible empty collection with signers matching the passed in SignerID + + @param selector a signer id to select against. + @return a collection of SignerInformation objects. + + + Basic generator that just returns a preconstructed attribute table + + + + Carrier for an authenticator control. + + + + + Basic constructor - build from a UTF-8 string representing the token. + + UTF-8 string representing the token. + + + + Basic constructor - build from a string representing the token. + + string representing the token. + + + + Return the type of this control. + + + + + Return the token associated with this control (a UTF8String). + + + + + Create a CertificateRequestMessage from the passed in bytes. + + BER/DER encoding of the CertReqMsg structure. + + + + Return the underlying ASN.1 object defining this CertificateRequestMessage object. + + A CertReqMsg + + + + Return the certificate template contained in this message. + + a CertTemplate structure. + + + + Return whether or not this request has control values associated with it. + + true if there are control values present, false otherwise. + + + + Return whether or not this request has a specific type of control value. + + the type OID for the control value we are checking for. + true if a control value of type is present, false otherwise. + + + + Return a control value of the specified type. + + the type OID for the control value we are checking for. + the control value if present, null otherwise. + + + + Return whether or not this request message has a proof-of-possession field in it. + + true if proof-of-possession is present, false otherwise. + + + + Return the type of the proof-of-possession this request message provides. + + one of: popRaVerified, popSigningKey, popKeyEncipherment, popKeyAgreement + + + + Return whether or not the proof-of-possession (POP) is of the type popSigningKey and + it has a public key MAC associated with it. + + true if POP is popSigningKey and a PKMAC is present, false otherwise. + + + + Return whether or not a signing key proof-of-possession (POP) is valid. + + a provider that can produce content verifiers for the signature contained in this POP. + true if the POP is valid, false otherwise. + if there is a problem in verification or content verifier creation. + if POP not appropriate. + + + + Return the ASN.1 encoding of the certReqMsg we wrap. + + a byte array containing the binary encoding of the certReqMsg. + + + + Create a builder that makes EncryptedValue structures. + + wrapper a wrapper for key used to encrypt the actual data contained in the EncryptedValue. + encryptor an output encryptor to encrypt the actual data contained in the EncryptedValue. + + + + + Create a builder that makes EncryptedValue structures with fixed length blocks padded using the passed in padder. + + a wrapper for key used to encrypt the actual data contained in the EncryptedValue. + encryptor an output encryptor to encrypt the actual data contained in the EncryptedValue. + padder a padder to ensure that the EncryptedValue created will always be a constant length. + + + + + Build an EncryptedValue structure containing the passed in pass phrase. + + a revocation pass phrase. + an EncryptedValue containing the encrypted pass phrase. + + + + + Build an EncryptedValue structure containing the certificate contained in + the passed in holder. + + a holder containing a certificate. + an EncryptedValue containing the encrypted certificate. + on a failure to encrypt the data, or wrap the symmetric key for this value. + + + + + Build an EncryptedValue structure containing the private key contained in + the passed info structure. + + a PKCS#8 private key info structure. + an EncryptedValue containing an EncryptedPrivateKeyInfo structure. + on a failure to encrypt the data, or wrap the symmetric key for this value. + + + + + Generic interface for a CertificateRequestMessage control value. + + + + + Return the type of this control. + + + + + Return the value contained in this control object. + + + + + An encrypted value padder is used to make sure that prior to a value been + encrypted the data is padded to a standard length. + + + + + Return a byte array of padded data. + + the data to be padded. + a padded byte array containing data. + + + + + Return a byte array of with padding removed. + + the data to be padded. + an array containing the original unpadded data. + + + + + Basic constructor - build from an PKIArchiveOptions structure. + + the ASN.1 structure that will underlie this control. + + + + Return the type of this control. + + CRMFObjectIdentifiers.id_regCtrl_pkiArchiveOptions + + + + Return the underlying ASN.1 object. + + a PKIArchiveOptions structure. + + + + Return the archive control type, one of: encryptedPrivKey,keyGenParameters,or archiveRemGenPrivKey. + + the archive control type. + + + + Return whether this control contains enveloped data. + + true if the control contains enveloped data, false otherwise. + + + + Return the enveloped data structure contained in this control. + + a CMSEnvelopedData object. + + + + Basic constructor - specify the contents of the PKIArchiveControl structure. + + the private key to be archived. + the general name to be associated with the private key. + + + + Add a recipient generator to this control. + recipient generator created for a specific recipient. + this builder object. + + + Build the PKIArchiveControl using the passed in encryptor to encrypt its contents. + a suitable content encryptor. + a PKIArchiveControl object. + + + + Default, IterationCount = 1000, OIW=IdSha1, Mac=HmacSHA1 + + + + + Defaults with IPKMacPrimitivesProvider + + + + + + Create. + + The Mac provider + Digest Algorithm Id + Mac Algorithm Id + + + + Create a PKMAC builder enforcing a ceiling on the maximum iteration count. + + supporting calculator + max allowable value for iteration count. + + + Set the salt length in octets. + + @param saltLength length in octets of the salt to be generated. + @return the generator + + + + Set the iteration count. + + the iteration count. + this + if iteration count is less than 100 + + + + Set PbmParameters + + The parameters. + this + + + + The Secure random + + The random. + this + + + + Build an IMacFactory. + + The password. + IMacFactory + + + + Basic constructor - build from a UTF-8 string representing the token. + + UTF-8 string representing the token. + + + + Basic constructor - build from a string representing the token. + + string representing the token. + + + + Return the type of this control. + + CRMFObjectIdentifiers.id_regCtrl_regToken + + + + Return the token associated with this control (a UTF8String). + + a UTF8String. + + + a Diffie-Hellman key exchange engine. +

+ note: This uses MTI/A0 key agreement in order to make the key agreement + secure against passive attacks. If you're doing Diffie-Hellman and both + parties have long term public keys you should look at using this. For + further information have a look at RFC 2631.

+

+ It's possible to extend this to more than two parties as well, for the moment + that is left as an exercise for the reader.

+
+ + calculate our initial message. + + + given a message from a given party and the corresponding public key + calculate the next message in the agreement sequence. In this case + this will represent the shared secret. + + + a Diffie-Hellman key agreement class. +

+ note: This is only the basic algorithm, it doesn't take advantage of + long term public keys if they are available. See the DHAgreement class + for a "better" implementation.

+
+ + given a short term public key from a given party calculate the next + message in the agreement sequence. + + + Standard Diffie-Hellman groups from various IETF specifications. + + + P1363 7.2.1 ECSVDP-DH + + ECSVDP-DH is Elliptic Curve Secret Value Derivation Primitive, + Diffie-Hellman version. It is based on the work of [DH76], [Mil86], + and [Kob87]. This primitive derives a shared secret value from one + party's private key and another party's public key, where both have + the same set of EC domain parameters. If two parties correctly + execute this primitive, they will produce the same output. This + primitive can be invoked by a scheme to derive a shared secret key; + specifically, it may be used with the schemes ECKAS-DH1 and + DL/ECKAS-DH2. It assumes that the input keys are valid (see also + Section 7.2.2). + + + P1363 7.2.2 ECSVDP-DHC + + ECSVDP-DHC is Elliptic Curve Secret Value Derivation Primitive, + Diffie-Hellman version with cofactor multiplication. It is based on + the work of [DH76], [Mil86], [Kob87], [LMQ98] and [Kal98a]. This + primitive derives a shared secret value from one party's private key + and another party's public key, where both have the same set of EC + domain parameters. If two parties correctly execute this primitive, + they will produce the same output. This primitive can be invoked by a + scheme to derive a shared secret key; specifically, it may be used + with the schemes ECKAS-DH1 and DL/ECKAS-DH2. It does not assume the + validity of the input public key (see also Section 7.2.1). +

+ Note: As stated P1363 compatibility mode with ECDH can be preset, and + in this case the implementation doesn't have a ECDH compatibility mode + (if you want that just use ECDHBasicAgreement and note they both implement + BasicAgreement!).

+
+ + + A participant in a Password Authenticated Key Exchange by Juggling (J-PAKE) exchange. + + The J-PAKE exchange is defined by Feng Hao and Peter Ryan in the paper + + "Password Authenticated Key Exchange by Juggling, 2008." + + The J-PAKE protocol is symmetric. + There is no notion of a client or server, but rather just two participants. + An instance of JPakeParticipant represents one participant, and + is the primary interface for executing the exchange. + + To execute an exchange, construct a JPakeParticipant on each end, + and call the following 7 methods + (once and only once, in the given order, for each participant, sending messages between them as described): + + CreateRound1PayloadToSend() - and send the payload to the other participant + ValidateRound1PayloadReceived(JPakeRound1Payload) - use the payload received from the other participant + CreateRound2PayloadToSend() - and send the payload to the other participant + ValidateRound2PayloadReceived(JPakeRound2Payload) - use the payload received from the other participant + CalculateKeyingMaterial() + CreateRound3PayloadToSend(BigInteger) - and send the payload to the other participant + ValidateRound3PayloadReceived(JPakeRound3Payload, BigInteger) - use the payload received from the other participant + + Each side should derive a session key from the keying material returned by CalculateKeyingMaterial(). + The caller is responsible for deriving the session key using a secure key derivation function (KDF). + + Round 3 is an optional key confirmation process. + If you do not execute round 3, then there is no assurance that both participants are using the same key. + (i.e. if the participants used different passwords, then their session keys will differ.) + + If the round 3 validation succeeds, then the keys are guaranteed to be the same on both sides. + + The symmetric design can easily support the asymmetric cases when one party initiates the communication. + e.g. Sometimes the round1 payload and round2 payload may be sent in one pass. + Also, in some cases, the key confirmation payload can be sent together with the round2 payload. + These are the trivial techniques to optimize the communication. + + The key confirmation process is implemented as specified in + NIST SP 800-56A Revision 1, + Section 8.2 Unilateral Key Confirmation for Key Agreement Schemes. + + This class is stateful and NOT threadsafe. + Each instance should only be used for ONE complete J-PAKE exchange + (i.e. a new JPakeParticipant should be constructed for each new J-PAKE exchange). + + + + + Convenience constructor for a new JPakeParticipant that uses + the JPakePrimeOrderGroups#NIST_3072 prime order group, + a SHA-256 digest, and a default SecureRandom implementation. + + After construction, the State state will be STATE_INITIALIZED. + + Throws NullReferenceException if any argument is null. Throws + ArgumentException if password is empty. + + Unique identifier of this participant. + The two participants in the exchange must NOT share the same id. + Shared secret. + A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called). + Caller should clear the input password as soon as possible. + + + + Convenience constructor for a new JPakeParticipant that uses + a SHA-256 digest, and a default SecureRandom implementation. + + After construction, the State state will be STATE_INITIALIZED. + + Throws NullReferenceException if any argument is null. Throws + ArgumentException if password is empty. + + Unique identifier of this participant. + The two participants in the exchange must NOT share the same id. + Shared secret. + A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called). + Caller should clear the input password as soon as possible. + Prime order group. See JPakePrimeOrderGroups for standard groups. + + + + Constructor for a new JPakeParticipant. + + After construction, the State state will be STATE_INITIALIZED. + + Throws NullReferenceException if any argument is null. Throws + ArgumentException if password is empty. + + Unique identifier of this participant. + The two participants in the exchange must NOT share the same id. + Shared secret. + A defensive copy of this array is made (and cleared once CalculateKeyingMaterial() is called). + Caller should clear the input password as soon as possible. + Prime order group. See JPakePrimeOrderGroups for standard groups. + Digest to use during zero knowledge proofs and key confirmation + (SHA-256 or stronger preferred). + Source of secure random data for x1 and x2, and for the zero knowledge proofs. + + + + Gets the current state of this participant. + See the STATE_* constants for possible values. + + + + + Creates and returns the payload to send to the other participant during round 1. + + After execution, the State state} will be STATE_ROUND_1_CREATED}. + + + + + Validates the payload received from the other participant during round 1. + + Must be called prior to CreateRound2PayloadToSend(). + + After execution, the State state will be STATE_ROUND_1_VALIDATED. + + Throws CryptoException if validation fails. Throws InvalidOperationException + if called multiple times. + + + + + Creates and returns the payload to send to the other participant during round 2. + + ValidateRound1PayloadReceived(JPakeRound1Payload) must be called prior to this method. + + After execution, the State state will be STATE_ROUND_2_CREATED. + + Throws InvalidOperationException if called prior to ValidateRound1PayloadReceived(JPakeRound1Payload), or multiple times + + + + + Validates the payload received from the other participant during round 2. + Note that this DOES NOT detect a non-common password. + The only indication of a non-common password is through derivation + of different keys (which can be detected explicitly by executing round 3 and round 4) + + Must be called prior to CalculateKeyingMaterial(). + + After execution, the State state will be STATE_ROUND_2_VALIDATED. + + Throws CryptoException if validation fails. Throws + InvalidOperationException if called prior to ValidateRound1PayloadReceived(JPakeRound1Payload), or multiple times + + + + + Calculates and returns the key material. + A session key must be derived from this key material using a secure key derivation function (KDF). + The KDF used to derive the key is handled externally (i.e. not by JPakeParticipant). + + The keying material will be identical for each participant if and only if + each participant's password is the same. i.e. If the participants do not + share the same password, then each participant will derive a different key. + Therefore, if you immediately start using a key derived from + the keying material, then you must handle detection of incorrect keys. + If you want to handle this detection explicitly, you can optionally perform + rounds 3 and 4. See JPakeParticipant for details on how to execute + rounds 3 and 4. + + The keying material will be in the range [0, p-1]. + + ValidateRound2PayloadReceived(JPakeRound2Payload) must be called prior to this method. + + As a side effect, the internal password array is cleared, since it is no longer needed. + + After execution, the State state will be STATE_KEY_CALCULATED. + + Throws InvalidOperationException if called prior to ValidateRound2PayloadReceived(JPakeRound2Payload), + or if called multiple times. + + + + + Creates and returns the payload to send to the other participant during round 3. + + See JPakeParticipant for more details on round 3. + + After execution, the State state} will be STATE_ROUND_3_CREATED. + Throws InvalidOperationException if called prior to CalculateKeyingMaterial, or multiple + times. + + The keying material as returned from CalculateKeyingMaterial(). + + + + Validates the payload received from the other participant during round 3. + + See JPakeParticipant for more details on round 3. + + After execution, the State state will be STATE_ROUND_3_VALIDATED. + + Throws CryptoException if validation fails. Throws InvalidOperationException if called prior to + CalculateKeyingMaterial or multiple times + + The round 3 payload received from the other participant. + The keying material as returned from CalculateKeyingMaterial(). + + + + A pre-computed prime order group for use during a J-PAKE exchange. + + Typically a Schnorr group is used. In general, J-PAKE can use any prime order group + that is suitable for public key cryptography, including elliptic curve cryptography. + + See JPakePrimeOrderGroups for convenient standard groups. + + NIST publishes + many groups that can be used for the desired level of security. + + + + + Constructs a new JPakePrimeOrderGroup. + + In general, you should use one of the pre-approved groups from + JPakePrimeOrderGroups, rather than manually constructing one. + + The following basic checks are performed: + + p-1 must be evenly divisible by q + g must be in [2, p-1] + g^q mod p must equal 1 + p must be prime (within reasonably certainty) + q must be prime (within reasonably certainty) + + The prime checks are performed using BigInteger#isProbablePrime(int), + and are therefore subject to the same probability guarantees. + + These checks prevent trivial mistakes. + However, due to the small uncertainties if p and q are not prime, + advanced attacks are not prevented. + Use it at your own risk. + + Throws NullReferenceException if any argument is null. Throws + InvalidOperationException is any of the above validations fail. + + + + + Constructor used by the pre-approved groups in JPakePrimeOrderGroups. + These pre-approved groups can avoid the expensive checks. + User-specified groups should not use this constructor. + + + + + Standard pre-computed prime order groups for use by J-PAKE. + (J-PAKE can use pre-computed prime order groups, same as DSA and Diffie-Hellman.) +

+ This class contains some convenient constants for use as input for + constructing {@link JPAKEParticipant}s. +

+ The prime order groups below are taken from Sun's JDK JavaDoc (docs/guide/security/CryptoSpec.html#AppB), + and from the prime order groups + published by NIST. +

+
+ + + From Sun's JDK JavaDoc (docs/guide/security/CryptoSpec.html#AppB) + 1024-bit p, 160-bit q and 1024-bit g for 80-bit security. + + + + + From NIST. + 2048-bit p, 224-bit q and 2048-bit g for 112-bit security. + + + + + From NIST. + 3072-bit p, 256-bit q and 3072-bit g for 128-bit security. + + + + + The payload sent/received during the first round of a J-PAKE exchange. + + Each JPAKEParticipant creates and sends an instance of this payload to + the other. The payload to send should be created via + JPAKEParticipant.CreateRound1PayloadToSend(). + + Each participant must also validate the payload received from the other. + The received payload should be validated via + JPAKEParticipant.ValidateRound1PayloadReceived(JPakeRound1Payload). + + + + + The id of the JPAKEParticipant who created/sent this payload. + + + + + The value of g^x1 + + + + + The value of g^x2 + + + + + The zero knowledge proof for x1. + + This is a two element array, containing {g^v, r} for x1. + + + + + The zero knowledge proof for x2. + + This is a two element array, containing {g^v, r} for x2. + + + + + The payload sent/received during the second round of a J-PAKE exchange. + + Each JPAKEParticipant creates and sends an instance + of this payload to the other JPAKEParticipant. + The payload to send should be created via + JPAKEParticipant#createRound2PayloadToSend() + + Each JPAKEParticipant must also validate the payload + received from the other JPAKEParticipant. + The received payload should be validated via + JPAKEParticipant#validateRound2PayloadReceived(JPakeRound2Payload) + + + + + The id of the JPAKEParticipant who created/sent this payload. + + + + + The value of A, as computed during round 2. + + + + + The zero knowledge proof for x2 * s. + + This is a two element array, containing {g^v, r} for x2 * s. + + + + + The payload sent/received during the optional third round of a J-PAKE exchange, + which is for explicit key confirmation. + + Each JPAKEParticipant creates and sends an instance + of this payload to the other JPAKEParticipant. + The payload to send should be created via + JPAKEParticipant#createRound3PayloadToSend(BigInteger) + + Eeach JPAKEParticipant must also validate the payload + received from the other JPAKEParticipant. + The received payload should be validated via + JPAKEParticipant#validateRound3PayloadReceived(JPakeRound3Payload, BigInteger) + + + + + The id of the {@link JPAKEParticipant} who created/sent this payload. + + + + + The value of MacTag, as computed by round 3. + + See JPAKEUtil#calculateMacTag(string, string, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, org.bouncycastle.crypto.Digest) + + + + + Primitives needed for a J-PAKE exchange. + + The recommended way to perform a J-PAKE exchange is by using + two JPAKEParticipants. Internally, those participants + call these primitive operations in JPakeUtilities. + + The primitives, however, can be used without a JPAKEParticipant if needed. + + + + + Return a value that can be used as x1 or x3 during round 1. + The returned value is a random value in the range [0, q-1]. + + + + + Return a value that can be used as x2 or x4 during round 1. + The returned value is a random value in the range [1, q-1]. + + + + + Converts the given password to a BigInteger + for use in arithmetic calculations. + + + + + Calculate g^x mod p as done in round 1. + + + + + Calculate ga as done in round 2. + + + + + Calculate x2 * s as done in round 2. + + + + + Calculate A as done in round 2. + + + + + Calculate a zero knowledge proof of x using Schnorr's signature. + The returned array has two elements {g^v, r = v-x*h} for x. + + + + + Validates that g^x4 is not 1. + throws CryptoException if g^x4 is 1 + + + + + Validates that ga is not 1. + + As described by Feng Hao... + Alice could simply check ga != 1 to ensure it is a generator. + In fact, as we will explain in Section 3, (x1 + x3 + x4 ) is random over Zq even in the face of active attacks. + Hence, the probability for ga = 1 is extremely small - on the order of 2^160 for 160-bit q. + + throws CryptoException if ga is 1 + + + + + Validates the zero knowledge proof (generated by + calculateZeroKnowledgeProof(BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, string, Digest, SecureRandom) + is correct. + + throws CryptoException if the zero knowledge proof is not correct + + + + + Calculates the keying material, which can be done after round 2 has completed. + A session key must be derived from this key material using a secure key derivation function (KDF). + The KDF used to derive the key is handled externally (i.e. not by JPAKEParticipant). + + KeyingMaterial = (B/g^{x2*x4*s})^x2 + + + + + Validates that the given participant ids are not equal. + (For the J-PAKE exchange, each participant must use a unique id.) + + Throws CryptoException if the participantId strings are equal. + + + + + Validates that the given participant ids are equal. + This is used to ensure that the payloads received from + each round all come from the same participant. + + + + + Validates that the given object is not null. + throws NullReferenceException if the object is null. + + object in question + name of the object (to be used in exception message) + + + + Calculates the MacTag (to be used for key confirmation), as defined by + NIST SP 800-56A Revision 1, + Section 8.2 Unilateral Key Confirmation for Key Agreement Schemes. + + MacTag = HMAC(MacKey, MacLen, MacData) + MacKey = H(K || "JPAKE_KC") + MacData = "KC_1_U" || participantId || partnerParticipantId || gx1 || gx2 || gx3 || gx4 + + Note that both participants use "KC_1_U" because the sender of the round 3 message + is always the initiator for key confirmation. + + HMAC = {@link HMac} used with the given {@link Digest} + H = The given {@link Digest} + MacLen = length of MacTag + + + + + Calculates the MacKey (i.e. the key to use when calculating the MagTag for key confirmation). + + MacKey = H(K || "JPAKE_KC") + + + + + Validates the MacTag received from the partner participant. + + throws CryptoException if the participantId strings are equal. + + + + Generator for Concatenation Key Derivation Function defined in NIST SP 800-56A, Sect 5.8.1 + + + @param digest the digest to be used as the source of generated bytes + + + return the underlying digest. + + + fill len bytes of the output buffer with bytes generated from + the derivation function. + + @throws DataLengthException if the out buffer is too small. + + + RFC 2631 Diffie-hellman KEK derivation function. + + + X9.63 based key derivation function for ECDH CMS. + + + + SM2 Key Exchange protocol - based on https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02 + + + + Implements the client side SRP-6a protocol. Note that this class is stateful, and therefore NOT threadsafe. + This implementation of SRP is based on the optimized message sequence put forth by Thomas Wu in the paper + "SRP-6: Improvements and Refinements to the Secure Remote Password Protocol, 2002" + + + Initialises the client to begin new authentication attempt + @param N The safe prime associated with the client's verifier + @param g The group parameter associated with the client's verifier + @param digest The digest algorithm associated with the client's verifier + @param random For key generation + + + Generates client's credentials given the client's salt, identity and password + @param salt The salt used in the client's verifier. + @param identity The user's identity (eg. username) + @param password The user's password + @return Client's public value to send to server + + + Generates client's verification message given the server's credentials + @param serverB The server's credentials + @return Client's verification message for the server + @throws CryptoException If server's credentials are invalid + + + Computes the client evidence message M1 using the previously received values. + To be called after calculating the secret S. + @return M1: the client side generated evidence message + @throws CryptoException + + + Authenticates the server evidence message M2 received and saves it only if correct. + @param M2: the server side generated evidence message + @return A boolean indicating if the server message M2 was the expected one. + @throws CryptoException + + + Computes the final session key as a result of the SRP successful mutual authentication + To be called after verifying the server evidence message M2. + @return Key: the mutually authenticated symmetric session key + @throws CryptoException + + + Implements the server side SRP-6a protocol. Note that this class is stateful, and therefore NOT threadsafe. + This implementation of SRP is based on the optimized message sequence put forth by Thomas Wu in the paper + "SRP-6: Improvements and Refinements to the Secure Remote Password Protocol, 2002" + + + Initialises the server to accept a new client authentication attempt + @param N The safe prime associated with the client's verifier + @param g The group parameter associated with the client's verifier + @param v The client's verifier + @param digest The digest algorithm associated with the client's verifier + @param random For key generation + + + Generates the server's credentials that are to be sent to the client. + @return The server's public value to the client + + + Processes the client's credentials. If valid the shared secret is generated and returned. + @param clientA The client's credentials + @return A shared secret BigInteger + @throws CryptoException If client's credentials are invalid + + + Authenticates the received client evidence message M1 and saves it only if correct. + To be called after calculating the secret S. + @param M1: the client side generated evidence message + @return A boolean indicating if the client message M1 was the expected one. + @throws CryptoException + + + Computes the server evidence message M2 using the previously verified values. + To be called after successfully verifying the client evidence message M1. + @return M2: the server side generated evidence message + @throws CryptoException + + + Computes the final session key as a result of the SRP successful mutual authentication + To be called after calculating the server evidence message M2. + @return Key: the mutual authenticated symmetric session key + @throws CryptoException + + + Computes the client evidence message (M1) according to the standard routine: + M1 = H( A | B | S ) + @param digest The Digest used as the hashing function H + @param N Modulus used to get the pad length + @param A The public client value + @param B The public server value + @param S The secret calculated by both sides + @return M1 The calculated client evidence message + + + Computes the server evidence message (M2) according to the standard routine: + M2 = H( A | M1 | S ) + @param digest The Digest used as the hashing function H + @param N Modulus used to get the pad length + @param A The public client value + @param M1 The client evidence message + @param S The secret calculated by both sides + @return M2 The calculated server evidence message + + + Computes the final Key according to the standard routine: Key = H(S) + @param digest The Digest used as the hashing function H + @param N Modulus used to get the pad length + @param S The secret calculated by both sides + @return + + + Generates new SRP verifier for user + + + Initialises generator to create new verifiers + @param N The safe prime to use (see DHParametersGenerator) + @param g The group parameter to use (see DHParametersGenerator) + @param digest The digest to use. The same digest type will need to be used later for the actual authentication + attempt. Also note that the final session key size is dependent on the chosen digest. + + + Creates a new SRP verifier + @param salt The salt to use, generally should be large and random + @param identity The user's identifying information (eg. username) + @param password The user's password + @return A new verifier for use in future SRP authentication + + + a holding class for public/private parameter pairs. + + + basic constructor. + + @param publicParam a public key parameters object. + @param privateParam the corresponding private key parameters. + + + return the public key parameters. + + @return the public key parameters. + + + return the private key parameters. + + @return the private key parameters. + + + The AEAD block ciphers already handle buffering internally, so this class + just takes care of implementing IBufferedCipher methods. + + + initialise the cipher. + + @param forEncryption if true the cipher is initialised for + encryption, if false for decryption. + @param param the key and other data required by the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + return the blocksize for the underlying cipher. + + @return the blocksize for the underlying cipher. + + + return the size of the output buffer required for an update + an input of len bytes. + + @param len the length of the input. + @return the space required to accommodate a call to update + with len bytes of input. + + + return the size of the output buffer required for an update plus a + doFinal with an input of len bytes. + + @param len the length of the input. + @return the space required to accommodate a call to update and doFinal + with len bytes of input. + + + process a single byte, producing an output block if necessary. + + @param in the input byte. + @param out the space for any output that might be produced. + @param outOff the offset from which the output will be copied. + @return the number of output bytes copied to out. + @exception DataLengthException if there isn't enough space in out. + @exception InvalidOperationException if the cipher isn't initialised. + + + process an array of bytes, producing output if necessary. + + @param in the input byte array. + @param inOff the offset at which the input data starts. + @param len the number of bytes to be copied out of the input array. + @param out the space for any output that might be produced. + @param outOff the offset from which the output will be copied. + @return the number of output bytes copied to out. + @exception DataLengthException if there isn't enough space in out. + @exception InvalidOperationException if the cipher isn't initialised. + + + Process the last block in the buffer. + + @param out the array the block currently being held is copied into. + @param outOff the offset at which the copying starts. + @return the number of output bytes copied to out. + @exception DataLengthException if there is insufficient space in out for + the output, or the input is not block size aligned and should be. + @exception InvalidOperationException if the underlying cipher is not + initialised. + @exception InvalidCipherTextException if padding is expected and not found. + @exception DataLengthException if the input is not block size + aligned. + + + Reset the buffer and cipher. After resetting the object is in the same + state as it was after the last init (if there was one). + + + The AEAD ciphers already handle buffering internally, so this class + just takes care of implementing IBufferedCipher methods. + + + initialise the cipher. + + @param forEncryption if true the cipher is initialised for + encryption, if false for decryption. + @param param the key and other data required by the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + return the blocksize for the underlying cipher. + + @return the blocksize for the underlying cipher. + + + return the size of the output buffer required for an update + an input of len bytes. + + @param len the length of the input. + @return the space required to accommodate a call to update + with len bytes of input. + + + return the size of the output buffer required for an update plus a + doFinal with an input of len bytes. + + @param len the length of the input. + @return the space required to accommodate a call to update and doFinal + with len bytes of input. + + + process a single byte, producing an output block if necessary. + + @param in the input byte. + @param out the space for any output that might be produced. + @param outOff the offset from which the output will be copied. + @return the number of output bytes copied to out. + @exception DataLengthException if there isn't enough space in out. + @exception InvalidOperationException if the cipher isn't initialised. + + + process an array of bytes, producing output if necessary. + + @param in the input byte array. + @param inOff the offset at which the input data starts. + @param len the number of bytes to be copied out of the input array. + @param out the space for any output that might be produced. + @param outOff the offset from which the output will be copied. + @return the number of output bytes copied to out. + @exception DataLengthException if there isn't enough space in out. + @exception InvalidOperationException if the cipher isn't initialised. + + + Process the last block in the buffer. + + @param out the array the block currently being held is copied into. + @param outOff the offset at which the copying starts. + @return the number of output bytes copied to out. + @exception DataLengthException if there is insufficient space in out for + the output, or the input is not block size aligned and should be. + @exception InvalidOperationException if the underlying cipher is not + initialised. + @exception InvalidCipherTextException if padding is expected and not found. + @exception DataLengthException if the input is not block size + aligned. + + + Reset the buffer and cipher. After resetting the object is in the same + state as it was after the last init (if there was one). + + + a buffer wrapper for an asymmetric block cipher, allowing input + to be accumulated in a piecemeal fashion until final processing. + + + base constructor. + + @param cipher the cipher this buffering object wraps. + + + return the amount of data sitting in the buffer. + + @return the amount of data sitting in the buffer. + + + initialise the buffer and the underlying cipher. + + @param forEncryption if true the cipher is initialised for + encryption, if false for decryption. + @param param the key and other data required by the cipher. + + + process the contents of the buffer using the underlying + cipher. + + @return the result of the encryption/decryption process on the + buffer. + @exception InvalidCipherTextException if we are given a garbage block. + + + Reset the buffer + + + A wrapper class that allows block ciphers to be used to process data in + a piecemeal fashion. The BufferedBlockCipher outputs a block only when the + buffer is full and more data is being added, or on a doFinal. +

+ Note: in the case where the underlying cipher is either a CFB cipher or an + OFB one the last block may not be a multiple of the block size. +

+
+ + constructor for subclasses + + + Create a buffered block cipher without padding. + + @param cipher the underlying block cipher this buffering object wraps. + false otherwise. + + + initialise the cipher. + + @param forEncryption if true the cipher is initialised for + encryption, if false for decryption. + @param param the key and other data required by the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + return the blocksize for the underlying cipher. + + @return the blocksize for the underlying cipher. + + + return the size of the output buffer required for an update + an input of len bytes. + + @param len the length of the input. + @return the space required to accommodate a call to update + with len bytes of input. + + + return the size of the output buffer required for an update plus a + doFinal with an input of len bytes. + + @param len the length of the input. + @return the space required to accommodate a call to update and doFinal + with len bytes of input. + + + process a single byte, producing an output block if necessary. + + @param in the input byte. + @param out the space for any output that might be produced. + @param outOff the offset from which the output will be copied. + @return the number of output bytes copied to out. + @exception DataLengthException if there isn't enough space in out. + @exception InvalidOperationException if the cipher isn't initialised. + + + process an array of bytes, producing output if necessary. + + @param in the input byte array. + @param inOff the offset at which the input data starts. + @param len the number of bytes to be copied out of the input array. + @param out the space for any output that might be produced. + @param outOff the offset from which the output will be copied. + @return the number of output bytes copied to out. + @exception DataLengthException if there isn't enough space in out. + @exception InvalidOperationException if the cipher isn't initialised. + + + Process the last block in the buffer. + + @param out the array the block currently being held is copied into. + @param outOff the offset at which the copying starts. + @return the number of output bytes copied to out. + @exception DataLengthException if there is insufficient space in out for + the output, or the input is not block size aligned and should be. + @exception InvalidOperationException if the underlying cipher is not + initialised. + @exception InvalidCipherTextException if padding is expected and not found. + @exception DataLengthException if the input is not block size + aligned. + + + Reset the buffer and cipher. After resetting the object is in the same + state as it was after the last init (if there was one). + + + The base class for symmetric, or secret, cipher key generators. + + + initialise the key generator. + + @param param the parameters to be used for key generation + + + Generate a secret key. + + @return a byte array containing the key value. + + + this exception is thrown if a buffer that is meant to have output + copied into it turns out to be too short, or if we've been given + insufficient input. In general this exception will Get thrown rather + than an ArrayOutOfBounds exception. + + + base constructor. + + + create a DataLengthException with the given message. + + @param message the message to be carried with the exception. + + + + Basic sized constructor - size in bits. + + @param digestSize size of the digest in bits + + + Blake2b for authentication ("Prefix-MAC mode"). + After calling the doFinal() method, the key will + remain to be used for further computations of + this instance. + The key can be overwritten using the clearKey() method. + + @param key A key up to 64 bytes or null + + + Blake2b with key, required digest length (in bytes), salt and personalization. + After calling the doFinal() method, the key, the salt and the personal string + will remain and might be used for further computations with this instance. + The key can be overwritten using the clearKey() method, the salt (pepper) + can be overwritten using the clearSalt() method. + + @param key A key up to 64 bytes or null + @param digestLength from 1 up to 64 bytes + @param salt 16 bytes or null + @param personalization 16 bytes or null + + + update the message digest with a single byte. + + @param b the input byte to be entered. + + + update the message digest with a block of bytes. + + @param message the byte array containing the data. + @param offset the offset into the byte array where the data starts. + @param len the length of the data. + + + close the digest, producing the final digest value. The doFinal + call leaves the digest reset. + Key, salt and personal string remain. + + @param out the array the digest is to be copied into. + @param outOffset the offset into the out array the digest is to start at. + + + Reset the digest back to it's initial state. + The key, the salt and the personal string will + remain for further computations. + + + return the algorithm name + + @return the algorithm name + + + return the size, in bytes, of the digest produced by this message digest. + + @return the size, in bytes, of the digest produced by this message digest. + + + Return the size in bytes of the internal buffer the digest applies it's compression + function to. + + @return byte length of the digests internal buffer. + + + Overwrite the key + if it is no longer used (zeroization) + + + Overwrite the salt (pepper) if it + is secret and no longer used (zeroization) + + + Implementation of the cryptographic hash function BLAKE2s. +

+ BLAKE2s offers a built-in keying mechanism to be used directly + for authentication ("Prefix-MAC") rather than a HMAC construction. +

+ BLAKE2s offers a built-in support for a salt for randomized hashing + and a personal string for defining a unique hash function for each application. +

+ BLAKE2s is optimized for 32-bit platforms and produces digests of any size + between 1 and 32 bytes. + + + BLAKE2s Initialization Vector + + + + Message word permutations + + + + Whenever this buffer overflows, it will be processed in the Compress() + function. For performance issues, long messages will not use this buffer. + + + Position of last inserted byte + + + + Internal state, in the BLAKE2 paper it is called v + + + + State vector, in the BLAKE2 paper it is called h + + + + holds least significant bits of counter + + + + holds most significant bits of counter + + + + finalization flag, for last block: ~0 + + + + BLAKE2s-256 for hashing. + + + BLAKE2s for hashing. + + @param digestBits the desired digest length in bits. Must be a multiple of 8 and less than 256. + + + BLAKE2s for authentication ("Prefix-MAC mode"). +

+ After calling the doFinal() method, the key will remain to be used for + further computations of this instance. The key can be overwritten using + the clearKey() method. + + @param key a key up to 32 bytes or null + + + BLAKE2s with key, required digest length, salt and personalization. +

+ After calling the doFinal() method, the key, the salt and the personal + string will remain and might be used for further computations with this + instance. The key can be overwritten using the clearKey() method, the + salt (pepper) can be overwritten using the clearSalt() method. + + @param key a key up to 32 bytes or null + @param digestBytes from 1 up to 32 bytes + @param salt 8 bytes or null + @param personalization 8 bytes or null + + + Update the message digest with a single byte. + + @param b the input byte to be entered. + + + Update the message digest with a block of bytes. + + @param message the byte array containing the data. + @param offset the offset into the byte array where the data starts. + @param len the length of the data. + + + Close the digest, producing the final digest value. The doFinal() call + leaves the digest reset. Key, salt and personal string remain. + + @param out the array the digest is to be copied into. + @param outOffset the offset into the out array the digest is to start at. + + + Reset the digest back to its initial state. The key, the salt and the + personal string will remain for further computations. + + + Return the algorithm name. + + @return the algorithm name + + + Return the size in bytes of the digest produced by this message digest. + + @return the size in bytes of the digest produced by this message digest. + + + Return the size in bytes of the internal buffer the digest applies its + compression function to. + + @return byte length of the digest's internal buffer. + + + Overwrite the key if it is no longer used (zeroization). + + + Overwrite the salt (pepper) if it is secret and no longer used + (zeroization). + + +

+ Customizable SHAKE function. + +
+ + + Base constructor + + bit length of the underlying SHAKE function, 128 or 256. + the function name string, note this is reserved for use by NIST. Avoid using it if not required. + the customization string - available for local use. + + + implementation of Ukrainian DSTU 7564 hash function + + + base implementation of MD4 family style digest as outlined in + "Handbook of Applied Cryptography", pages 344 - 347. + + + implementation of GOST R 34.11-94 + + + Standard constructor + + + Constructor to allow use of a particular sbox with GOST28147 + @see GOST28147Engine#getSBox(String) + + + Copy constructor. This will copy the state of the provided + message digest. + + + reset the chaining variables to the IV values. + + + + Implementation of Keccak based on following KeccakNISTInterface.c from http://keccak.noekeon.org/ + + + Following the naming conventions used in the C source code to enable easy review of the implementation. + + + + Return the size of block that the compression function is applied to in bytes. + + @return internal byte length of a block. + + + Base class for SHA-384 and SHA-512. + + + Constructor for variable length word + + + Copy constructor. We are using copy constructors in place + of the object.Clone() interface as this interface is not + supported by J2ME. + + + adjust the byte counts so that byteCount2 represents the + upper long (less 3 bits) word of the byte count. + + + implementation of MD2 + as outlined in RFC1319 by B.Kaliski from RSA Laboratories April 1992 + + + return the algorithm name + + @return the algorithm name + + + Close the digest, producing the final digest value. The doFinal + call leaves the digest reset. + + @param out the array the digest is to be copied into. + @param outOff the offset into the out array the digest is to start at. + + + reset the digest back to it's initial state. + + + update the message digest with a single byte. + + @param in the input byte to be entered. + + + update the message digest with a block of bytes. + + @param in the byte array containing the data. + @param inOff the offset into the byte array where the data starts. + @param len the length of the data. + + + implementation of MD4 as RFC 1320 by R. Rivest, MIT Laboratory for + Computer Science and RSA Data Security, Inc. +

+ NOTE: This algorithm is only included for backwards compatibility + with legacy applications, it's not secure, don't use it for anything new!

+
+ + Standard constructor + + + Copy constructor. This will copy the state of the provided + message digest. + + + reset the chaining variables to the IV values. + + + implementation of MD5 as outlined in "Handbook of Applied Cryptography", pages 346 - 347. + + + Copy constructor. This will copy the state of the provided + message digest. + + + reset the chaining variables to the IV values. + + + Wrapper removes exposure to the IMemoable interface on an IDigest implementation. + + + Base constructor. + + @param baseDigest underlying digest to use. + @exception IllegalArgumentException if baseDigest is null + + + implementation of RipeMD128 + + + Standard constructor + + + Copy constructor. This will copy the state of the provided + message digest. + + + reset the chaining variables to the IV values. + + + implementation of RipeMD see, + http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html + + + Standard constructor + + + Copy constructor. This will copy the state of the provided + message digest. + + + reset the chaining variables to the IV values. + + + +

Implementation of RipeMD256.

+

Note: this algorithm offers the same level of security as RipeMD128.

+
+
+ + Standard constructor + + + Copy constructor. This will copy the state of the provided + message digest. + + + + reset the chaining variables to the IV values. + + + +

Implementation of RipeMD 320.

+

Note: this algorithm offers the same level of security as RipeMD160.

+
+
+ + Standard constructor + + + Copy constructor. This will copy the state of the provided + message digest. + + + + reset the chaining variables to the IV values. + + + implementation of SHA-1 as outlined in "Handbook of Applied Cryptography", pages 346 - 349. + + It is interesting to ponder why the, apart from the extra IV, the other difference here from MD5 + is the "endianness" of the word processing! + + + Copy constructor. This will copy the state of the provided + message digest. + + + reset the chaining variables + + + SHA-224 as described in RFC 3874 +
+                    block  word  digest
+            SHA-1   512    32    160
+            SHA-224 512    32    224
+            SHA-256 512    32    256
+            SHA-384 1024   64    384
+            SHA-512 1024   64    512
+            
+
+ + Standard constructor + + + Copy constructor. This will copy the state of the provided + message digest. + + + reset the chaining variables + + + Draft FIPS 180-2 implementation of SHA-256. Note: As this is + based on a draft this implementation is subject to change. + +
+                     block  word  digest
+             SHA-1   512    32    160
+             SHA-256 512    32    256
+             SHA-384 1024   64    384
+             SHA-512 1024   64    512
+             
+
+ + Copy constructor. This will copy the state of the provided + message digest. + + + reset the chaining variables + + + Draft FIPS 180-2 implementation of SHA-384. Note: As this is + based on a draft this implementation is subject to change. + +
+                     block  word  digest
+             SHA-1   512    32    160
+             SHA-256 512    32    256
+             SHA-384 1024   64    384
+             SHA-512 1024   64    512
+             
+
+ + Copy constructor. This will copy the state of the provided + message digest. + + + reset the chaining variables + + + + Implementation of SHA-3 based on following KeccakNISTInterface.c from http://keccak.noekeon.org/ + + + Following the naming conventions used in the C source code to enable easy review of the implementation. + + + + Draft FIPS 180-2 implementation of SHA-512. Note: As this is + based on a draft this implementation is subject to change. + +
+                     block  word  digest
+             SHA-1   512    32    160
+             SHA-256 512    32    256
+             SHA-384 1024   64    384
+             SHA-512 1024   64    512
+             
+
+ + Copy constructor. This will copy the state of the provided + message digest. + + + reset the chaining variables + + + FIPS 180-4 implementation of SHA-512/t + + + Standard constructor + + + Copy constructor. This will copy the state of the provided + message digest. + + + reset the chaining variables + + + + Implementation of SHAKE based on following KeccakNISTInterface.c from http://keccak.noekeon.org/ + + + Following the naming conventions used in the C source code to enable easy review of the implementation. + + + + Wrapper class that reduces the output length of a particular digest to + only the first n bytes of the digest function. + + + Base constructor. + + @param baseDigest underlying digest to use. + @param length length in bytes of the output of doFinal. + @exception ArgumentException if baseDigest is null, or length is greater than baseDigest.GetDigestSize(). + + + + Implementation of the Skein parameterised hash function in 256, 512 and 1024 bit block sizes, + based on the Threefish tweakable block cipher. + + + This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3 + competition in October 2010. +

+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir + Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker. + + + + + +

+ 256 bit block size - Skein-256 + +
+ + + 512 bit block size - Skein-512 + + + + + 1024 bit block size - Skein-1024 + + + + + Constructs a Skein digest with an internal state size and output size. + + the internal state size in bits - one of or + . + the output/digest size to produce in bits, which must be an integral number of + bytes. + + + + Optionally initialises the Skein digest with the provided parameters. + + See for details on the parameterisation of the Skein hash function. + the parameters to apply to this engine, or null to use no parameters. + + + + Implementation of the Skein family of parameterised hash functions in 256, 512 and 1024 bit block + sizes, based on the Threefish tweakable block cipher. + + + This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3 + competition in October 2010. +

+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir + Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker. +

+ This implementation is the basis for and , implementing the + parameter based configuration system that allows Skein to be adapted to multiple applications.
+ Initialising the engine with allows standard and arbitrary parameters to + be applied during the Skein hash function. +

+ Implemented: +

    +
  • 256, 512 and 1024 bit internal states.
  • +
  • Full 96 bit input length.
  • +
  • Parameters defined in the Skein specification, and arbitrary other pre and post message + parameters.
  • +
  • Arbitrary output size in 1 byte intervals.
  • +
+

+ Not implemented: +

    +
  • Sub-byte length input (bit padding).
  • +
  • Tree hashing.
  • +
+
+ +
+ + + 256 bit block size - Skein-256 + + + + + 512 bit block size - Skein-512 + + + + + 1024 bit block size - Skein-1024 + + + + The parameter type for the Skein key. + + + The parameter type for the Skein configuration block. + + + The parameter type for the message. + + + The parameter type for the output transformation. + + + Precalculated UBI(CFG) states for common state/output combinations without key or other + pre-message params. + + + Point at which position might overflow long, so switch to add with carry logic + + + Bit 127 = final + + + Bit 126 = first + + + UBI uses a 128 bit tweak + + + Whether 64 bit position exceeded + + + Advances the position in the tweak by the specified value. + + + The Unique Block Iteration chaining mode. + + + Buffer for the current block of message data + + + Offset into the current message block + + + Buffer for message words for feedback into encrypted block + + + Underlying Threefish tweakable block cipher + + + Size of the digest output, in bytes + + + The current chaining/state value + + + The initial state value + + + The (optional) key parameter + + + Parameters to apply prior to the message + + + Parameters to apply after the message, but prior to output + + + The current UBI operation + + + Buffer for single byte update method + + + + Constructs a Skein digest with an internal state size and output size. + + the internal state size in bits - one of or + . + the output/digest size to produce in bits, which must be an integral number of + bytes. + + + + Creates a SkeinEngine as an exact copy of an existing instance. + + + + + Initialises the Skein engine with the provided parameters. See for + details on the parameterisation of the Skein hash function. + + the parameters to apply to this engine, or null to use no parameters. + + + Calculate the initial (pre message block) chaining state. + + + + Reset the engine to the initial state (with the key and any pre-message parameters , ready to + accept message input. + + + + + Implementation of Chinese SM3 digest as described at + http://tools.ietf.org/html/draft-shen-sm3-hash-00 + and at .... ( Chinese PDF ) + + + The specification says "process a bit stream", + but this is written to process bytes in blocks of 4, + meaning this will process 32-bit word groups. + But so do also most other digest specifications, + including the SHA-256 which was a origin for + this specification. + + + + + Standard constructor + + + + + Copy constructor. This will copy the state of the provided + message digest. + + + + + reset the chaining variables + + + + implementation of Tiger based on: + + http://www.cs.technion.ac.il/~biham/Reports/Tiger + + + Standard constructor + + + Copy constructor. This will copy the state of the provided + message digest. + + + reset the chaining variables + + + Implementation of WhirlpoolDigest, based on Java source published by Barreto + and Rijmen. + + + + Copy constructor. This will copy the state of the provided message + digest. + + + Reset the chaining variables + + + return the X9ECParameters object for the named curve represented by + the passed in object identifier. Null if the curve isn't present. + + @param oid an object identifier representing a named curve, if present. + + + return the object identifier signified by the passed in name. Null + if there is no object identifier associated with name. + + @return the object identifier associated with name, if present. + + + return the named curve name represented by the given object identifier. + + + returns an enumeration containing the name strings for curves + contained in this structure. + + + ISO 9796-1 padding. Note in the light of recent results you should + only use this with RSA (rather than the "simpler" Rabin keys) and you + should never use it with anything other than a hash (ie. even if the + message is small don't sign the message, sign it's hash) or some "random" + value. See your favorite search engine for details. + + + return the input block size. The largest message we can process + is (key_size_in_bits + 3)/16, which in our world comes to + key_size_in_bytes / 2. + + + return the maximum possible size for the output. + + + set the number of bits in the next message to be treated as + pad bits. + + + retrieve the number of pad bits in the last decoded message. + + + @exception InvalidCipherTextException if the decrypted block is not a valid ISO 9796 bit string + + + Optimal Asymmetric Encryption Padding (OAEP) - see PKCS 1 V 2. + + + @exception InvalidCipherTextException if the decrypted block turns out to + be badly formatted. + + + int to octet string. + + + mask generator function, as described in PKCS1v2. + + + this does your basic Pkcs 1 v1.5 padding - whether or not you should be using this + depends on your application - see Pkcs1 Version 2 for details. + + + some providers fail to include the leading zero in PKCS1 encoded blocks. If you need to + work with one of these set the system property Org.BouncyCastle.Pkcs1.Strict to false. + + + The same effect can be achieved by setting the static property directly +

+ The static property is checked during construction of the encoding object, it is set to + true by default. +

+
+ + Basic constructor. + + @param cipher + + + Constructor for decryption with a fixed plaintext length. + + @param cipher The cipher to use for cryptographic operation. + @param pLen Length of the expected plaintext. + + + Constructor for decryption with a fixed plaintext length and a fallback + value that is returned, if the padding is incorrect. + + @param cipher + The cipher to use for cryptographic operation. + @param fallback + The fallback value, we don't to a arraycopy here. + + + Checks if the argument is a correctly PKCS#1.5 encoded Plaintext + for encryption. + + @param encoded The Plaintext. + @param pLen Expected length of the plaintext. + @return Either 0, if the encoding is correct, or -1, if it is incorrect. + + + Decode PKCS#1.5 encoding, and return a random value if the padding is not correct. + + @param in The encrypted block. + @param inOff Offset in the encrypted block. + @param inLen Length of the encrypted block. + @param pLen Length of the desired output. + @return The plaintext without padding, or a random value if the padding was incorrect. + @throws InvalidCipherTextException + + + @exception InvalidCipherTextException if the decrypted block is not in Pkcs1 format. + + + an implementation of the AES (Rijndael), from FIPS-197. +

+ For further details see: http://csrc.nist.gov/encryption/aes/. + + This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at + http://fp.gladman.plus.com/cryptography_technology/rijndael/ + + There are three levels of tradeoff of speed vs memory + Because java has no preprocessor, they are written as three separate classes from which to choose + + The fastest uses 8Kbytes of static tables to precompute round calculations, 4 256 word tables for encryption + and 4 for decryption. + + The middle performance version uses only one 256 word table for each, for a total of 2Kbytes, + adding 12 rotate operations per round to compute the values contained in the other tables from + the contents of the first. + + The slowest version uses no static tables at all and computes the values in each round. +

+

+ This file contains the middle performance version with 2Kbytes of static tables for round precomputation. +

+
+ + Calculate the necessary round keys + The number of calculations depends on key size and block size + AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits + This code is written assuming those are the only possible values + + + default constructor - 128 bit block size. + + + initialise an AES cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + an implementation of the AES (Rijndael)), from FIPS-197. +

+ For further details see: http://csrc.nist.gov/encryption/aes/. + + This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at + http://fp.gladman.plus.com/cryptography_technology/rijndael/ + + There are three levels of tradeoff of speed vs memory + Because java has no preprocessor), they are written as three separate classes from which to choose + + The fastest uses 8Kbytes of static tables to precompute round calculations), 4 256 word tables for encryption + and 4 for decryption. + + The middle performance version uses only one 256 word table for each), for a total of 2Kbytes), + adding 12 rotate operations per round to compute the values contained in the other tables from + the contents of the first + + The slowest version uses no static tables at all and computes the values in each round +

+

+ This file contains the fast version with 8Kbytes of static tables for round precomputation +

+ + Unfortunately this class has a few side channel issues. + In an environment where encryption/decryption may be closely observed it should not be used. + +
+ + Calculate the necessary round keys + The number of calculations depends on key size and block size + AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits + This code is written assuming those are the only possible values + + + default constructor - 128 bit block size. + + + initialise an AES cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + an implementation of the AES (Rijndael), from FIPS-197. +

+ For further details see: http://csrc.nist.gov/encryption/aes/. + + This implementation is based on optimizations from Dr. Brian Gladman's paper and C code at + http://fp.gladman.plus.com/cryptography_technology/rijndael/ + + There are three levels of tradeoff of speed vs memory + Because java has no preprocessor, they are written as three separate classes from which to choose + + The fastest uses 8Kbytes of static tables to precompute round calculations, 4 256 word tables for encryption + and 4 for decryption. + + The middle performance version uses only one 256 word table for each, for a total of 2Kbytes, + adding 12 rotate operations per round to compute the values contained in the other tables from + the contents of the first + + The slowest version uses no static tables at all and computes the values + in each round. +

+

+ This file contains the slowest performance version with no static tables + for round precomputation, but it has the smallest foot print. +

+
+ + Calculate the necessary round keys + The number of calculations depends on key size and block size + AES specified a fixed block size of 128 bits and key sizes 128/192/256 bits + This code is written assuming those are the only possible values + + + default constructor - 128 bit block size. + + + initialise an AES cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + + An implementation of the AES Key Wrapper from the NIST Key Wrap Specification. +

+ For further details see: http://csrc.nist.gov/encryption/kms/key-wrap.pdf. + + + + A class that provides Blowfish key encryption operations, + such as encoding data and generating keys. + All the algorithms herein are from Applied Cryptography + and implement a simplified cryptography interface. + + + initialise a Blowfish cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + apply the encryption cycle to each value pair in the table. + + + Encrypt the given input starting at the given offset and place + the result in the provided buffer starting at the given offset. + The input will be an exact multiple of our blocksize. + + + Decrypt the given input starting at the given offset and place + the result in the provided buffer starting at the given offset. + The input will be an exact multiple of our blocksize. + + + Camellia - based on RFC 3713. + + + Camellia - based on RFC 3713, smaller implementation, about half the size of CamelliaEngine. + + + + An implementation of the Camellia key wrapper based on RFC 3657/RFC 3394. +

+ For further details see: http://www.ietf.org/rfc/rfc3657.txt. + + + + A class that provides CAST key encryption operations, + such as encoding data and generating keys. + + All the algorithms herein are from the Internet RFC's + + RFC2144 - Cast5 (64bit block, 40-128bit key) + RFC2612 - CAST6 (128bit block, 128-256bit key) + + and implement a simplified cryptography interface. + + + initialise a CAST cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + Encrypt the given input starting at the given offset and place + the result in the provided buffer starting at the given offset. + + @param src The plaintext buffer + @param srcIndex An offset into src + @param dst The ciphertext buffer + @param dstIndex An offset into dst + + + Decrypt the given input starting at the given offset and place + the result in the provided buffer starting at the given offset. + + @param src The plaintext buffer + @param srcIndex An offset into src + @param dst The ciphertext buffer + @param dstIndex An offset into dst + + + The first of the three processing functions for the + encryption and decryption. + + @param D the input to be processed + @param Kmi the mask to be used from Km[n] + @param Kri the rotation value to be used + + + + The second of the three processing functions for the + encryption and decryption. + + @param D the input to be processed + @param Kmi the mask to be used from Km[n] + @param Kri the rotation value to be used + + + + The third of the three processing functions for the + encryption and decryption. + + @param D the input to be processed + @param Kmi the mask to be used from Km[n] + @param Kri the rotation value to be used + + + + Does the 16 rounds to encrypt the block. + + @param L0 the LH-32bits of the plaintext block + @param R0 the RH-32bits of the plaintext block + + + A class that provides CAST6 key encryption operations, + such as encoding data and generating keys. + + All the algorithms herein are from the Internet RFC + + RFC2612 - CAST6 (128bit block, 128-256bit key) + + and implement a simplified cryptography interface. + + + Encrypt the given input starting at the given offset and place + the result in the provided buffer starting at the given offset. + + @param src The plaintext buffer + @param srcIndex An offset into src + @param dst The ciphertext buffer + @param dstIndex An offset into dst + + + Decrypt the given input starting at the given offset and place + the result in the provided buffer starting at the given offset. + + @param src The plaintext buffer + @param srcIndex An offset into src + @param dst The ciphertext buffer + @param dstIndex An offset into dst + + + Does the 12 quad rounds rounds to encrypt the block. + + @param A the 00-31 bits of the plaintext block + @param B the 32-63 bits of the plaintext block + @param C the 64-95 bits of the plaintext block + @param D the 96-127 bits of the plaintext block + @param result the resulting ciphertext + + + Does the 12 quad rounds rounds to decrypt the block. + + @param A the 00-31 bits of the ciphertext block + @param B the 32-63 bits of the ciphertext block + @param C the 64-95 bits of the ciphertext block + @param D the 96-127 bits of the ciphertext block + @param result the resulting plaintext + + +

+ Implementation of Daniel J. Bernstein's ChaCha stream cipher. + +
+ + + Creates a 20 rounds ChaCha engine. + + + + + Implementation of Daniel J. Bernstein's ChaCha stream cipher. + + + + + Creates a 20 rounds ChaCha engine. + + + + + Creates a ChaCha engine with a specific number of rounds. + + the number of rounds (must be an even number). + + + + ChaCha function. + + The number of ChaCha rounds to execute + The input words. + The ChaCha state to modify. + + + A class that provides a basic DESede (or Triple DES) engine. + + + initialise a DESede cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + * Wrap keys according to + * + * draft-ietf-smime-key-wrap-01.txt. + *

+ * Note: + *

    + *
  • this is based on a draft, and as such is subject to change - don't use this class for anything requiring long term storage.
  • + *
  • if you are using this to wrap triple-des keys you need to set the + * parity bits on the key and, if it's a two-key triple-des key, pad it + * yourself.
  • + *
+ *

+
+ + Field engine + + + Field param + + + Field paramPlusIV + + + Field iv + + + Field forWrapping + + + Field IV2 + + + Method init + + @param forWrapping + @param param + + + Method GetAlgorithmName + + @return + + + Method wrap + + @param in + @param inOff + @param inLen + @return + + + Method unwrap + + @param in + @param inOff + @param inLen + @return + @throws InvalidCipherTextException + + + Some key wrap algorithms make use of the Key Checksum defined + in CMS [CMS-Algorithms]. This is used to provide an integrity + check value for the key being wrapped. The algorithm is + + - Compute the 20 octet SHA-1 hash on the key being wrapped. + - Use the first 8 octets of this hash as the checksum value. + + @param key + @return + @throws Exception + @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum + + + @param key + @param checksum + @return + @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum + + + A class that provides a basic DES engine. + + + initialise a DES cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + what follows is mainly taken from "Applied Cryptography", by + Bruce Schneier, however it also bears great resemblance to Richard + Outerbridge's D3DES... + + + Generate an integer based working key based on our secret key + and what we processing we are planning to do. + + Acknowledgements for this routine go to James Gillogly and Phil Karn. + (whoever, and wherever they are!). + + + the DES engine. + + + implementation of DSTU 7624 (Kalyna) + + + this does your basic ElGamal algorithm. + + + initialise the ElGamal engine. + + @param forEncryption true if we are encrypting, false otherwise. + @param param the necessary ElGamal key parameters. + + + Return the maximum size for an input block to this engine. + For ElGamal this is always one byte less than the size of P on + encryption, and twice the length as the size of P on decryption. + + @return maximum size for an input block. + + + Return the maximum size for an output block to this engine. + For ElGamal this is always one byte less than the size of P on + decryption, and twice the length as the size of P on encryption. + + @return maximum size for an output block. + + + Process a single block using the basic ElGamal algorithm. + + @param in the input array. + @param inOff the offset into the input buffer where the data starts. + @param length the length of the data to be processed. + @return the result of the ElGamal process. + @exception DataLengthException the input block is too large. + + + implementation of GOST 28147-89 + + + standard constructor. + + + initialise an Gost28147 cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is inappropriate. + + + Return the S-Box associated with SBoxName + @param sBoxName name of the S-Box + @return byte array representing the S-Box + + + HC-128 is a software-efficient stream cipher created by Hongjun Wu. It + generates keystream from a 128-bit secret key and a 128-bit initialization + vector. +

+ http://www.ecrypt.eu.org/stream/p3ciphers/hc/hc128_p3.pdf +

+ It is a third phase candidate in the eStream contest, and is patent-free. + No attacks are known as of today (April 2007). See + + http://www.ecrypt.eu.org/stream/hcp3.html +

+
+ + Initialise a HC-128 cipher. + + @param forEncryption whether or not we are for encryption. Irrelevant, as + encryption and decryption are the same. + @param params the parameters required to set up the cipher. + @throws ArgumentException if the params argument is + inappropriate (ie. the key is not 128 bit long). + + + HC-256 is a software-efficient stream cipher created by Hongjun Wu. It + generates keystream from a 256-bit secret key and a 256-bit initialization + vector. +

+ http://www.ecrypt.eu.org/stream/p3ciphers/hc/hc256_p3.pdf +

+ Its brother, HC-128, is a third phase candidate in the eStream contest. + The algorithm is patent-free. No attacks are known as of today (April 2007). + See + + http://www.ecrypt.eu.org/stream/hcp3.html +

+
+ + Initialise a HC-256 cipher. + + @param forEncryption whether or not we are for encryption. Irrelevant, as + encryption and decryption are the same. + @param params the parameters required to set up the cipher. + @throws ArgumentException if the params argument is + inappropriate (ie. the key is not 256 bit long). + + + A class that provides a basic International Data Encryption Algorithm (IDEA) engine. +

+ This implementation is based on the "HOWTO: INTERNATIONAL DATA ENCRYPTION ALGORITHM" + implementation summary by Fauzan Mirza (F.U.Mirza@sheffield.ac.uk). (barring 1 typo at the + end of the MulInv function!). +

+

+ It can be found at ftp://ftp.funet.fi/pub/crypt/cryptography/symmetric/idea/ +

+

+ Note: This algorithm was patented in the USA, Japan and Europe. These patents expired in 2011/2012. +

+
+ + standard constructor. + + + initialise an IDEA cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + return x = x * y where the multiplication is done modulo + 65537 (0x10001) (as defined in the IDEA specification) and + a zero input is taken to be 65536 (0x10000). + + @param x the x value + @param y the y value + @return x = x * y + + + The following function is used to expand the user key to the encryption + subkey. The first 16 bytes are the user key, and the rest of the subkey + is calculated by rotating the previous 16 bytes by 25 bits to the left, + and so on until the subkey is completed. + + + This function computes multiplicative inverse using Euclid's Greatest + Common Divisor algorithm. Zero and one are self inverse. +

+ i.e. x * MulInv(x) == 1 (modulo BASE) +

+
+ + Return the additive inverse of x. +

+ i.e. x + AddInv(x) == 0 +

+
+ + The function to invert the encryption subkey to the decryption subkey. + It also involves the multiplicative inverse and the additive inverse functions. + + + support class for constructing intergrated encryption ciphers + for doing basic message exchanges on top of key agreement ciphers + + + set up for use with stream mode, where the key derivation function + is used to provide a stream of bytes to xor with the message. + + @param agree the key agreement used as the basis for the encryption + @param kdf the key derivation function used for byte generation + @param mac the message authentication code generator for the message + + + set up for use in conjunction with a block cipher to handle the + message. + + @param agree the key agreement used as the basis for the encryption + @param kdf the key derivation function used for byte generation + @param mac the message authentication code generator for the message + @param cipher the cipher to used for encrypting the message + + + Initialise the encryptor. + + @param forEncryption whether or not this is encryption/decryption. + @param privParam our private key parameters + @param pubParam the recipient's/sender's public key parameters + @param param encoding and derivation parameters. + + + Implementation of Bob Jenkin's ISAAC (Indirection Shift Accumulate Add and Count). + see: http://www.burtleburtle.net/bob/rand/isaacafa.html + + + initialise an ISAAC cipher. + + @param forEncryption whether or not we are for encryption. + @param params the parameters required to set up the cipher. + @exception ArgumentException if the params argument is + inappropriate. + + + NaccacheStern Engine. For details on this cipher, please see + http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf + + + Initializes this algorithm. Must be called before all other Functions. + + @see org.bouncycastle.crypto.AsymmetricBlockCipher#init(bool, + org.bouncycastle.crypto.CipherParameters) + + + Returns the input block size of this algorithm. + + @see org.bouncycastle.crypto.AsymmetricBlockCipher#GetInputBlockSize() + + + Returns the output block size of this algorithm. + + @see org.bouncycastle.crypto.AsymmetricBlockCipher#GetOutputBlockSize() + + + Process a single Block using the Naccache-Stern algorithm. + + @see org.bouncycastle.crypto.AsymmetricBlockCipher#ProcessBlock(byte[], + int, int) + + + Encrypts a BigInteger aka Plaintext with the public key. + + @param plain + The BigInteger to encrypt + @return The byte[] representation of the encrypted BigInteger (i.e. + crypted.toByteArray()) + + + Adds the contents of two encrypted blocks mod sigma + + @param block1 + the first encrypted block + @param block2 + the second encrypted block + @return encrypt((block1 + block2) mod sigma) + @throws InvalidCipherTextException + + + Convenience Method for data exchange with the cipher. + + Determines blocksize and splits data to blocksize. + + @param data the data to be processed + @return the data after it went through the NaccacheSternEngine. + @throws InvalidCipherTextException + + + Computes the integer x that is expressed through the given primes and the + congruences with the chinese remainder theorem (CRT). + + @param congruences + the congruences c_i + @param primes + the primes p_i + @return an integer x for that x % p_i == c_i + + + A Noekeon engine, using direct-key mode. + + + Create an instance of the Noekeon encryption algorithm + and set some defaults + + + initialise + + @param forEncryption whether or not we are for encryption. + @param params the parameters required to set up the cipher. + @exception ArgumentException if the params argument is + inappropriate. + + + The no-op engine that just copies bytes through, irrespective of whether encrypting and decrypting. + Provided for the sake of completeness. + + + an implementation of RC2 as described in RFC 2268 + "A Description of the RC2(r) Encryption Algorithm" R. Rivest. + + + initialise a RC2 cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + return the result rotating the 16 bit number in x left by y + + + Wrap keys according to RFC 3217 - RC2 mechanism + + + Field engine + + + Field param + + + Field paramPlusIV + + + Field iv + + + Field forWrapping + + + Field IV2 + + + Method init + + @param forWrapping + @param param + + + Method GetAlgorithmName + + @return + + + Method wrap + + @param in + @param inOff + @param inLen + @return + + + Method unwrap + + @param in + @param inOff + @param inLen + @return + @throws InvalidCipherTextException + + + Some key wrap algorithms make use of the Key Checksum defined + in CMS [CMS-Algorithms]. This is used to provide an integrity + check value for the key being wrapped. The algorithm is + + - Compute the 20 octet SHA-1 hash on the key being wrapped. + - Use the first 8 octets of this hash as the checksum value. + + @param key + @return + @throws Exception + @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum + + + @param key + @param checksum + @return + @see http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum + + + initialise a RC4 cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + The specification for RC5 came from the RC5 Encryption Algorithm + publication in RSA CryptoBytes, Spring of 1995. + http://www.rsasecurity.com/rsalabs/cryptobytes. +

+ This implementation has a word size of 32 bits.

+
+ + Create an instance of the RC5 encryption algorithm + and set some defaults + + + initialise a RC5-32 cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + Re-key the cipher. + + @param key the key to be used + + + Encrypt the given block starting at the given offset and place + the result in the provided buffer starting at the given offset. + + @param in in byte buffer containing data to encrypt + @param inOff offset into src buffer + @param out out buffer where encrypted data is written + @param outOff offset into out buffer + + + Perform a left "spin" of the word. The rotation of the given + word x is rotated left by y bits. + Only the lg(32) low-order bits of y + are used to determine the rotation amount. Here it is + assumed that the wordsize used is a power of 2. + + @param x word to rotate + @param y number of bits to rotate % 32 + + + Perform a right "spin" of the word. The rotation of the given + word x is rotated left by y bits. + Only the lg(32) low-order bits of y + are used to determine the rotation amount. Here it is + assumed that the wordsize used is a power of 2. + + @param x word to rotate + @param y number of bits to rotate % 32 + + + The specification for RC5 came from the RC5 Encryption Algorithm + publication in RSA CryptoBytes, Spring of 1995. + http://www.rsasecurity.com/rsalabs/cryptobytes. +

+ This implementation is set to work with a 64 bit word size.

+
+ + Create an instance of the RC5 encryption algorithm + and set some defaults + + + initialise a RC5-64 cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + Re-key the cipher. + + @param key the key to be used + + + Encrypt the given block starting at the given offset and place + the result in the provided buffer starting at the given offset. + + @param in in byte buffer containing data to encrypt + @param inOff offset into src buffer + @param out out buffer where encrypted data is written + @param outOff offset into out buffer + + + Perform a left "spin" of the word. The rotation of the given + word x is rotated left by y bits. + Only the lg(wordSize) low-order bits of y + are used to determine the rotation amount. Here it is + assumed that the wordsize used is a power of 2. + + @param x word to rotate + @param y number of bits to rotate % wordSize + + + Perform a right "spin" of the word. The rotation of the given + word x is rotated left by y bits. + Only the lg(wordSize) low-order bits of y + are used to determine the rotation amount. Here it is + assumed that the wordsize used is a power of 2. + + @param x word to rotate + @param y number of bits to rotate % wordSize + + + An RC6 engine. + + + Create an instance of the RC6 encryption algorithm + and set some defaults + + + initialise a RC5-32 cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + Re-key the cipher. + + @param inKey the key to be used + + + Perform a left "spin" of the word. The rotation of the given + word x is rotated left by y bits. + Only the lg(wordSize) low-order bits of y + are used to determine the rotation amount. Here it is + assumed that the wordsize used is a power of 2. + + @param x word to rotate + @param y number of bits to rotate % wordSize + + + Perform a right "spin" of the word. The rotation of the given + word x is rotated left by y bits. + Only the lg(wordSize) low-order bits of y + are used to determine the rotation amount. Here it is + assumed that the wordsize used is a power of 2. + + @param x word to rotate + @param y number of bits to rotate % wordSize + + + an implementation of the RFC 3211 Key Wrap + Specification. + + + + An implementation of the AES Key Wrapper from the NIST Key Wrap + Specification as described in RFC 3394. +

+ For further details see: http://www.ietf.org/rfc/rfc3394.txt + and http://csrc.nist.gov/encryption/kms/key-wrap.pdf. + + + + an implementation of Rijndael, based on the documentation and reference implementation + by Paulo Barreto, Vincent Rijmen, for v2.0 August '99. +

+ Note: this implementation is based on information prior to readonly NIST publication. +

+
+ + multiply two elements of GF(2^m) + needed for MixColumn and InvMixColumn + + + xor corresponding text input and round key input bytes + + + Row 0 remains unchanged + The other three rows are shifted a variable amount + + + Replace every byte of the input by the byte at that place + in the nonlinear S-box + + + Mix the bytes of every column in a linear way + + + Mix the bytes of every column in a linear way + This is the opposite operation of Mixcolumn + + + Calculate the necessary round keys + The number of calculations depends on keyBits and blockBits + + + default constructor - 128 bit block size. + + + basic constructor - set the cipher up for a given blocksize + + @param blocksize the blocksize in bits, must be 128, 192, or 256. + + + initialise a Rijndael cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + this does your basic RSA algorithm with blinding + + + initialise the RSA engine. + + @param forEncryption true if we are encrypting, false otherwise. + @param param the necessary RSA key parameters. + + + Return the maximum size for an input block to this engine. + For RSA this is always one byte less than the key size on + encryption, and the same length as the key size on decryption. + + @return maximum size for an input block. + + + Return the maximum size for an output block to this engine. + For RSA this is always one byte less than the key size on + decryption, and the same length as the key size on encryption. + + @return maximum size for an output block. + + + Process a single block using the basic RSA algorithm. + + @param inBuf the input array. + @param inOff the offset into the input buffer where the data starts. + @param inLen the length of the data to be processed. + @return the result of the RSA process. + @exception DataLengthException the input block is too large. + + + This does your basic RSA Chaum's blinding and unblinding as outlined in + "Handbook of Applied Cryptography", page 475. You need to use this if you are + trying to get another party to generate signatures without them being aware + of the message they are signing. + + + Initialise the blinding engine. + + @param forEncryption true if we are encrypting (blinding), false otherwise. + @param param the necessary RSA key parameters. + + + Return the maximum size for an input block to this engine. + For RSA this is always one byte less than the key size on + encryption, and the same length as the key size on decryption. + + @return maximum size for an input block. + + + Return the maximum size for an output block to this engine. + For RSA this is always one byte less than the key size on + decryption, and the same length as the key size on encryption. + + @return maximum size for an output block. + + + Process a single block using the RSA blinding algorithm. + + @param in the input array. + @param inOff the offset into the input buffer where the data starts. + @param inLen the length of the data to be processed. + @return the result of the RSA process. + @throws DataLengthException the input block is too large. + + + this does your basic RSA algorithm. + + + initialise the RSA engine. + + @param forEncryption true if we are encrypting, false otherwise. + @param param the necessary RSA key parameters. + + + Return the maximum size for an input block to this engine. + For RSA this is always one byte less than the key size on + encryption, and the same length as the key size on decryption. + + @return maximum size for an input block. + + + Return the maximum size for an output block to this engine. + For RSA this is always one byte less than the key size on + decryption, and the same length as the key size on encryption. + + @return maximum size for an output block. + + + this does your basic RSA algorithm. + + + initialise the RSA engine. + + @param forEncryption true if we are encrypting, false otherwise. + @param param the necessary RSA key parameters. + + + Return the maximum size for an input block to this engine. + For RSA this is always one byte less than the key size on + encryption, and the same length as the key size on decryption. + + @return maximum size for an input block. + + + Return the maximum size for an output block to this engine. + For RSA this is always one byte less than the key size on + decryption, and the same length as the key size on encryption. + + @return maximum size for an output block. + + + Process a single block using the basic RSA algorithm. + + @param inBuf the input array. + @param inOff the offset into the input buffer where the data starts. + @param inLen the length of the data to be processed. + @return the result of the RSA process. + @exception DataLengthException the input block is too large. + + + + Implementation of Daniel J. Bernstein's Salsa20 stream cipher, Snuffle 2005 + + + + Constants + + + + Creates a 20 round Salsa20 engine. + + + + + Creates a Salsa20 engine with a specific number of rounds. + + the number of rounds (must be an even number). + + + Implementation of the SEED algorithm as described in RFC 4009 + + + + An implementation of the SEED key wrapper based on RFC 4010/RFC 3394. +

+ For further details see: http://www.ietf.org/rfc/rfc4010.txt. + + + + * Serpent is a 128-bit 32-round block cipher with variable key lengths, + * including 128, 192 and 256 bit keys conjectured to be at least as + * secure as three-key triple-DES. + *

+ * Serpent was designed by Ross Anderson, Eli Biham and Lars Knudsen as a + * candidate algorithm for the NIST AES Quest. + *

+ *

+ * For full details see The Serpent home page + *

+
+ + Expand a user-supplied key material into a session key. + + @param key The user-key bytes (multiples of 4) to use. + @exception ArgumentException + + + Encrypt one block of plaintext. + + @param input the array containing the input data. + @param inOff offset into the in array the data starts at. + @param output the array the output data will be copied into. + @param outOff the offset into the out array the output will start at. + + + Decrypt one block of ciphertext. + + @param input the array containing the input data. + @param inOff offset into the in array the data starts at. + @param output the array the output data will be copied into. + @param outOff the offset into the out array the output will start at. + + + initialise a Serpent cipher. + + @param encrypting whether or not we are for encryption. + @param params the parameters required to set up the cipher. + @throws IllegalArgumentException if the params argument is + inappropriate. + + + Process one block of input from the array in and write it to + the out array. + + @param in the array containing the input data. + @param inOff offset into the in array the data starts at. + @param out the array the output data will be copied into. + @param outOff the offset into the out array the output will start at. + @return the number of bytes processed and produced. + @throws DataLengthException if there isn't enough data in in, or + space in out. + @throws IllegalStateException if the cipher isn't initialised. + + + InvSO - {13, 3,11, 0,10, 6, 5,12, 1,14, 4, 7,15, 9, 8, 2 } - 15 terms. + + + S1 - {15,12, 2, 7, 9, 0, 5,10, 1,11,14, 8, 6,13, 3, 4 } - 14 terms. + + + InvS1 - { 5, 8, 2,14,15, 6,12, 3,11, 4, 7, 9, 1,13,10, 0 } - 14 steps. + + + S2 - { 8, 6, 7, 9, 3,12,10,15,13, 1,14, 4, 0,11, 5, 2 } - 16 terms. + + + InvS2 - {12, 9,15, 4,11,14, 1, 2, 0, 3, 6,13, 5, 8,10, 7 } - 16 steps. + + + S3 - { 0,15,11, 8,12, 9, 6, 3,13, 1, 2, 4,10, 7, 5,14 } - 16 terms. + + + InvS3 - { 0, 9,10, 7,11,14, 6,13, 3, 5,12, 2, 4, 8,15, 1 } - 15 terms + + + S4 - { 1,15, 8, 3,12, 0,11, 6, 2, 5, 4,10, 9,14, 7,13 } - 15 terms. + + + InvS4 - { 5, 0, 8, 3,10, 9, 7,14, 2,12,11, 6, 4,15,13, 1 } - 15 terms. + + + S5 - {15, 5, 2,11, 4,10, 9,12, 0, 3,14, 8,13, 6, 7, 1 } - 16 terms. + + + InvS5 - { 8,15, 2, 9, 4, 1,13,14,11, 6, 5, 3, 7,12,10, 0 } - 16 terms. + + + S6 - { 7, 2,12, 5, 8, 4, 6,11,14, 9, 1,15,13, 3,10, 0 } - 15 terms. + + + InvS6 - {15,10, 1,13, 5, 3, 6, 0, 4, 9,14, 7, 2,12, 8,11 } - 15 terms. + + + S7 - { 1,13,15, 0,14, 8, 2,11, 7, 4,12,10, 9, 3, 5, 6 } - 16 terms. + + + InvS7 - { 3, 0, 6,13, 9,14,15, 8, 5,12,11, 7,10, 1, 4, 2 } - 17 terms. + + + Apply the linear transformation to the register set. + + + Apply the inverse of the linear transformation to the register set. + + + a class that provides a basic SKIPJACK engine. + + + initialise a SKIPJACK cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + The G permutation + + + the inverse of the G permutation. + + + + SM2 public key encryption engine - based on https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02. + + + + SM4 Block Cipher - SM4 is a 128 bit block cipher with a 128 bit key. + + The implementation here is based on the document http://eprint.iacr.org/2008/329.pdf + by Whitfield Diffie and George Ledin, which is a translation of Prof. LU Shu-wang's original standard. + + + + An TEA engine. + + + Create an instance of the TEA encryption algorithm + and set some defaults + + + initialise + + @param forEncryption whether or not we are for encryption. + @param params the parameters required to set up the cipher. + @exception ArgumentException if the params argument is + inappropriate. + + + Re-key the cipher. + + @param key the key to be used + + + + Implementation of the Threefish tweakable large block cipher in 256, 512 and 1024 bit block + sizes. + + + This is the 1.3 version of Threefish defined in the Skein hash function submission to the NIST + SHA-3 competition in October 2010. +

+ Threefish was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir + Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker. +

+ This implementation inlines all round functions, unrolls 8 rounds, and uses 1.2k of static tables + to speed up key schedule injection.
+ 2 x block size state is retained by each cipher instance. + + + +

+ 256 bit block size - Threefish-256 + +
+ + + 512 bit block size - Threefish-512 + + + + + 1024 bit block size - Threefish-1024 + + + + Size of the tweak in bytes (always 128 bit/16 bytes) + + + Rounds in Threefish-256 + + + Rounds in Threefish-512 + + + Rounds in Threefish-1024 + + + Max rounds of any of the variants + + + Key schedule parity constant + + + Block size in bytes + + + Block size in 64 bit words + + + Buffer for byte oriented processBytes to call internal word API + + + Tweak bytes (2 byte t1,t2, calculated t3 and repeat of t1,t2 for modulo free lookup + + + Key schedule words + + + The internal cipher implementation (varies by blocksize) + + + + Constructs a new Threefish cipher, with a specified block size. + + the block size in bits, one of , , + . + + + + Initialise the engine. + + Initialise for encryption if true, for decryption if false. + an instance of or (to + use a 0 tweak) + + + + Initialise the engine, specifying the key and tweak directly. + + the cipher mode. + the words of the key, or null to use the current key. + the 2 word (128 bit) tweak, or null to use the current tweak. + + + + Process a block of data represented as 64 bit words. + + the number of 8 byte words processed (which will be the same as the block size). + a block sized buffer of words to process. + a block sized buffer of words to receive the output of the operation. + if either the input or output is not block sized + if this engine is not initialised + + + + Read a single 64 bit word from input in LSB first order. + + + + + Write a 64 bit word to output in LSB first order. + + + + Rotate left + xor part of the mix operation. + + + Rotate xor + rotate right part of the unmix operation. + + + The extended + repeated tweak words + + + The extended + repeated key words + + + Mix rotation constants defined in Skein 1.3 specification + + + Mix rotation constants defined in Skein 1.3 specification + + + Mix rotation constants defined in Skein 1.3 specification + + + Mix rotation constants defined in Skein 1.3 specification + + + Mix rotation constants defined in Skein 1.3 specification + + + Mix rotation constants defined in Skein 1.3 specification + + + Mix rotation constants defined in Skein 1.3 specification + + + Mix rotation constants defined in Skein 1.3 specification + + + Mix rotation constants defined in Skein 1.3 specification + + + Mix rotation constants defined in Skein 1.3 specification + + + Tnepres is a 128-bit 32-round block cipher with variable key lengths, + including 128, 192 and 256 bit keys conjectured to be at least as + secure as three-key triple-DES. +

+ Tnepres is based on Serpent which was designed by Ross Anderson, Eli Biham and Lars Knudsen as a + candidate algorithm for the NIST AES Quest. Unfortunately there was an endianness issue + with test vectors in the AES submission and the resulting confusion lead to the Tnepres cipher + as well, which is a byte swapped version of Serpent. +

+

+ For full details see The Serpent home page +

+
+ + Expand a user-supplied key material into a session key. + + @param key The user-key bytes (multiples of 4) to use. + @exception ArgumentException + + + Encrypt one block of plaintext. + + @param input the array containing the input data. + @param inOff offset into the in array the data starts at. + @param output the array the output data will be copied into. + @param outOff the offset into the out array the output will start at. + + + Decrypt one block of ciphertext. + + @param input the array containing the input data. + @param inOff offset into the in array the data starts at. + @param output the array the output data will be copied into. + @param outOff the offset into the out array the output will start at. + + + A class that provides Twofish encryption operations. + + This Java implementation is based on the Java reference + implementation provided by Bruce Schneier and developed + by Raif S. Naffah. + + + Define the fixed p0/p1 permutations used in keyed S-box lookup. + By changing the following constant definitions, the S-boxes will + automatically Get changed in the Twofish engine. + + + gSubKeys[] and gSBox[] are eventually used in the + encryption and decryption methods. + + + initialise a Twofish cipher. + + @param forEncryption whether or not we are for encryption. + @param parameters the parameters required to set up the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + Encrypt the given input starting at the given offset and place + the result in the provided buffer starting at the given offset. + The input will be an exact multiple of our blocksize. + + encryptBlock uses the pre-calculated gSBox[] and subKey[] + arrays. + + + Decrypt the given input starting at the given offset and place + the result in the provided buffer starting at the given offset. + The input will be an exact multiple of our blocksize. + + + Use (12, 8) Reed-Solomon code over GF(256) to produce + a key S-box 32-bit entity from 2 key material 32-bit + entities. + + @param k0 first 32-bit entity + @param k1 second 32-bit entity + @return Remainder polynomial Generated using RS code + + + * Reed-Solomon code parameters: (12,8) reversible code: + *

+ *

+                    * G(x) = x^4 + (a+1/a)x^3 + ax^2 + (a+1/a)x + 1
+                    * 
+ * where a = primitive root of field generator 0x14D + *

+
+ + initialise a VMPC cipher. + + @param forEncryption + whether or not we are for encryption. + @param params + the parameters required to set up the cipher. + @exception ArgumentException + if the params argument is inappropriate. + + + + Implementation of Daniel J. Bernstein's XSalsa20 stream cipher - Salsa20 with an extended nonce. + + + XSalsa20 requires a 256 bit key, and a 192 bit nonce. + + + + + XSalsa20 key generation: process 256 bit input key and 128 bits of the input nonce + using a core Salsa20 function without input addition to produce 256 bit working key + and use that with the remaining 64 bits of nonce to initialize a standard Salsa20 engine state. + + + + An XTEA engine. + + + Create an instance of the TEA encryption algorithm + and set some defaults + + + initialise + + @param forEncryption whether or not we are for encryption. + @param params the parameters required to set up the cipher. + @exception ArgumentException if the params argument is + inappropriate. + + + Re-key the cipher. + + @param key the key to be used + + + Basic KDF generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033 +
+ This implementation is based on ISO 18033/P1363a. +
+ + Construct a KDF Parameters generator. + + @param counterStart value of counter. + @param digest the digest to be used as the source of derived keys. + + + return the underlying digest. + + + fill len bytes of the output buffer with bytes generated from + the derivation function. + + @throws ArgumentException if the size of the request will cause an overflow. + @throws DataLengthException if the out buffer is too small. + + + Core of password hashing scheme Bcrypt, + designed by Niels Provos and David Mazières, + corresponds to the C reference implementation. +

+ This implementation does not correspondent to the 1999 published paper + "A Future-Adaptable Password Scheme" of Niels Provos and David Mazières, + see: https://www.usenix.org/legacy/events/usenix99/provos/provos_html/node1.html. + In contrast to the paper, the order of key setup and salt setup is reversed: + state <- ExpandKey(state, 0, key) + state %lt;- ExpandKey(state, 0, salt) + This corresponds to the OpenBSD reference implementation of Bcrypt. +

+ Note: + There is no successful cryptanalysis (status 2015), but + the amount of memory and the band width of Bcrypt + may be insufficient to effectively prevent attacks + with custom hardware like FPGAs, ASICs +

+ This implementation uses some parts of Bouncy Castle's BlowfishEngine. +

+
+ + Derives a raw 192 bit Bcrypt key + + @param cost the cost factor, treated as an exponent of 2 + @param salt a 16 byte salt + @param psw the password + @return a 192 bit key + + + Size of the salt parameter in bytes + + + Minimum value of cost parameter, equal to log2(bytes of salt) + + + Maximum value of cost parameter (31 == 2,147,483,648) + + + Maximum size of password == max (unrestricted) size of Blowfish key + + + Converts a character password to bytes incorporating the required trailing zero byte. + + @param password the password to be encoded. + @return a byte representation of the password in UTF8 + trailing zero. + + + Calculates the bcrypt hash of a password. +

+ This implements the raw bcrypt function as defined in the bcrypt specification, not + the crypt encoded version implemented in OpenBSD. +

+ @param password the password bytes (up to 72 bytes) to use for this invocation. + @param salt the 128 bit salt to use for this invocation. + @param cost the bcrypt cost parameter. The cost of the bcrypt function grows as + 2^cost. Legal values are 4..31 inclusive. + @return the output of the raw bcrypt operation: a 192 bit (24 byte) hash. +
+ + initialise the key generator - if strength is set to zero + the key Generated will be 192 bits in size, otherwise + strength can be 128 or 192 (or 112 or 168 if you don't count + parity bits), depending on whether you wish to do 2-key or 3-key + triple DES. + + @param param the parameters to be used for key generation + + + initialise the key generator - if strength is set to zero + the key generated will be 64 bits in size, otherwise + strength can be 64 or 56 bits (if you don't count the parity bits). + + @param param the parameters to be used for key generation + + + a basic Diffie-Hellman key pair generator. + + This generates keys consistent for use with the basic algorithm for + Diffie-Hellman. + + + a Diffie-Hellman key pair generator. + + This generates keys consistent for use in the MTI/A0 key agreement protocol + as described in "Handbook of Applied Cryptography", Pages 516-519. + + + which Generates the p and g values from the given parameters, + returning the DHParameters object. +

+ Note: can take a while...

+
+ + a DSA key pair generator. + + This Generates DSA keys in line with the method described + in FIPS 186-3 B.1 FFC Key Pair Generation. + + + Generate suitable parameters for DSA, in line with FIPS 186-2, or FIPS 186-3. + + + Initialise the generator + This form can only be used for older DSA (pre-DSA2) parameters + the size of keys in bits (from 512 up to 1024, and a multiple of 64) + measure of robustness of primes (at least 80 for FIPS 186-2 compliance) + the source of randomness to use + + + Initialise the generator for DSA 2 + You must use this Init method if you need to generate parameters for DSA 2 keys + An instance of DsaParameterGenerationParameters used to configure this generator + + + Generates a set of DsaParameters + Can take a while... + + + generate suitable parameters for DSA, in line with + FIPS 186-3 A.1 Generation of the FFC Primes p and q. + + + Given the domain parameters this routine generates an EC key + pair in accordance with X9.62 section 5.2.1 pages 26, 27. + + + a ElGamal key pair generator. +

+ This Generates keys consistent for use with ElGamal as described in + page 164 of "Handbook of Applied Cryptography".

+
+ + * which Generates the p and g values from the given parameters, + * returning the ElGamalParameters object. + *

+ * Note: can take a while... + *

+
+ + a GOST3410 key pair generator. + This generates GOST3410 keys in line with the method described + in GOST R 34.10-94. + + + generate suitable parameters for GOST3410. + + + initialise the key generator. + + @param size size of the key + @param typeProcedure type procedure A,B = 1; A',B' - else + @param random random byte source. + + + Procedure C + procedure generates the a value from the given p,q, + returning the a value. + + + which generates the p , q and a values from the given parameters, + returning the Gost3410Parameters object. + + + HMAC-based Extract-and-Expand Key Derivation Function (HKDF) implemented + according to IETF RFC 5869, May 2010 as specified by H. Krawczyk, IBM + Research & P. Eronen, Nokia. It uses a HMac internally to compute de OKM + (output keying material) and is likely to have better security properties + than KDF's based on just a hash function. + + + Creates a HKDFBytesGenerator based on the given hash function. + + @param hash the digest to be used as the source of generatedBytes bytes + + + Performs the extract part of the key derivation function. + + @param salt the salt to use + @param ikm the input keying material + @return the PRK as KeyParameter + + + Performs the expand part of the key derivation function, using currentT + as input and output buffer. + + @throws DataLengthException if the total number of bytes generated is larger than the one + specified by RFC 5869 (255 * HashLen) + + + KFD2 generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033 +
+ This implementation is based on IEEE P1363/ISO 18033. +
+ + Construct a KDF1 byte generator. + + @param digest the digest to be used as the source of derived keys. + + + KDF2 generator for derived keys and ivs as defined by IEEE P1363a/ISO 18033 +
+ This implementation is based on IEEE P1363/ISO 18033. +
+ + Construct a KDF2 bytes generator. Generates key material + according to IEEE P1363 or ISO 18033 depending on the initialisation. + + @param digest the digest to be used as the source of derived keys. + + + Generator for MGF1 as defined in Pkcs 1v2 + + + @param digest the digest to be used as the source of Generated bytes + + + return the underlying digest. + + + int to octet string. + + + fill len bytes of the output buffer with bytes Generated from + the derivation function. + + @throws DataLengthException if the out buffer is too small. + + + Key generation parameters for NaccacheStern cipher. For details on this cipher, please see + + http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf + + + Generates a permuted ArrayList from the original one. The original List + is not modified + + @param arr + the ArrayList to be permuted + @param rand + the source of Randomness for permutation + @return a new IList with the permuted elements. + + + Finds the first 'count' primes starting with 3 + + @param count + the number of primes to find + @return a vector containing the found primes as Integer + + + Password hashing scheme BCrypt, + designed by Niels Provos and David Mazières, using the + String format and the Base64 encoding + of the reference implementation on OpenBSD + + + Creates a 60 character Bcrypt String, including + version, cost factor, salt and hash, separated by '$' + + @param version the version, 2y,2b or 2a. (2a is not backwards compatible.) + @param cost the cost factor, treated as an exponent of 2 + @param salt a 16 byte salt + @param password the password + @return a 60 character Bcrypt String + + + Creates a 60 character Bcrypt String, including + version, cost factor, salt and hash, separated by '$' using version + '2y'. + + @param cost the cost factor, treated as an exponent of 2 + @param salt a 16 byte salt + @param password the password + @return a 60 character Bcrypt String + + + Creates a 60 character Bcrypt String, including + version, cost factor, salt and hash, separated by '$' + + @param version the version, may be 2b, 2y or 2a. (2a is not backwards compatible.) + @param cost the cost factor, treated as an exponent of 2 + @param salt a 16 byte salt + @param password the password + @return a 60 character Bcrypt String + + + Checks if a password corresponds to a 60 character Bcrypt String + + @param bcryptString a 60 character Bcrypt String, including + version, cost factor, salt and hash, + separated by '$' + @param password the password as an array of chars + @return true if the password corresponds to the + Bcrypt String, otherwise false + + + Generator for PBE derived keys and ivs as usd by OpenSSL. +

+ The scheme is a simple extension of PKCS 5 V2.0 Scheme 1 using MD5 with an + iteration count of 1. +

+
+ + Construct a OpenSSL Parameters generator. + + + Initialise - note the iteration count for this algorithm is fixed at 1. + + @param password password to use. + @param salt salt to use. + + + the derived key function, the ith hash of the password and the salt. + + + Generate a key parameter derived from the password, salt, and iteration + count we are currently initialised with. + + @param keySize the size of the key we want (in bits) + @return a KeyParameter object. + @exception ArgumentException if the key length larger than the base hash size. + + + Generate a key with initialisation vector parameter derived from + the password, salt, and iteration count we are currently initialised + with. + + @param keySize the size of the key we want (in bits) + @param ivSize the size of the iv we want (in bits) + @return a ParametersWithIV object. + @exception ArgumentException if keySize + ivSize is larger than the base hash size. + + + Generate a key parameter for use with a MAC derived from the password, + salt, and iteration count we are currently initialised with. + + @param keySize the size of the key we want (in bits) + @return a KeyParameter object. + @exception ArgumentException if the key length larger than the base hash size. + + + Generator for Pbe derived keys and ivs as defined by Pkcs 12 V1.0. +

+ The document this implementation is based on can be found at + + RSA's Pkcs12 Page +

+
+ + Construct a Pkcs 12 Parameters generator. + + @param digest the digest to be used as the source of derived keys. + @exception ArgumentException if an unknown digest is passed in. + + + add a + b + 1, returning the result in a. The a value is treated + as a BigInteger of length (b.Length * 8) bits. The result is + modulo 2^b.Length in case of overflow. + + + generation of a derived key ala Pkcs12 V1.0. + + + Generate a key parameter derived from the password, salt, and iteration + count we are currently initialised with. + + @param keySize the size of the key we want (in bits) + @return a KeyParameter object. + + + Generate a key with initialisation vector parameter derived from + the password, salt, and iteration count we are currently initialised + with. + + @param keySize the size of the key we want (in bits) + @param ivSize the size of the iv we want (in bits) + @return a ParametersWithIV object. + + + Generate a key parameter for use with a MAC derived from the password, + salt, and iteration count we are currently initialised with. + + @param keySize the size of the key we want (in bits) + @return a KeyParameter object. + + + Generator for Pbe derived keys and ivs as defined by Pkcs 5 V2.0 Scheme 1. + Note this generator is limited to the size of the hash produced by the + digest used to drive it. +

+ The document this implementation is based on can be found at + + RSA's Pkcs5 Page +

+
+ + Construct a Pkcs 5 Scheme 1 Parameters generator. + + @param digest the digest to be used as the source of derived keys. + + + the derived key function, the ith hash of the mPassword and the mSalt. + + + Generate a key parameter derived from the mPassword, mSalt, and iteration + count we are currently initialised with. + + @param keySize the size of the key we want (in bits) + @return a KeyParameter object. + @exception ArgumentException if the key length larger than the base hash size. + + + Generate a key with initialisation vector parameter derived from + the mPassword, mSalt, and iteration count we are currently initialised + with. + + @param keySize the size of the key we want (in bits) + @param ivSize the size of the iv we want (in bits) + @return a ParametersWithIV object. + @exception ArgumentException if keySize + ivSize is larger than the base hash size. + + + Generate a key parameter for use with a MAC derived from the mPassword, + mSalt, and iteration count we are currently initialised with. + + @param keySize the size of the key we want (in bits) + @return a KeyParameter object. + @exception ArgumentException if the key length larger than the base hash size. + + + Generator for Pbe derived keys and ivs as defined by Pkcs 5 V2.0 Scheme 2. + This generator uses a SHA-1 HMac as the calculation function. +

+ The document this implementation is based on can be found at + + RSA's Pkcs5 Page

+
+ + construct a Pkcs5 Scheme 2 Parameters generator. + + + Generate a key parameter derived from the password, salt, and iteration + count we are currently initialised with. + + @param keySize the size of the key we want (in bits) + @return a KeyParameter object. + + + Generate a key with initialisation vector parameter derived from + the password, salt, and iteration count we are currently initialised + with. + + @param keySize the size of the key we want (in bits) + @param ivSize the size of the iv we want (in bits) + @return a ParametersWithIV object. + + + Generate a key parameter for use with a MAC derived from the password, + salt, and iteration count we are currently initialised with. + + @param keySize the size of the key we want (in bits) + @return a KeyParameter object. + + + + Generates keys for the Poly1305 MAC. + + + Poly1305 keys are 256 bit keys consisting of a 128 bit secret key used for the underlying block + cipher followed by a 128 bit {@code r} value used for the polynomial portion of the Mac.
+ The {@code r} value has a specific format with some bits required to be cleared, resulting in an + effective 106 bit key.
+ A separately generated 256 bit key can be modified to fit the Poly1305 key format by using the + {@link #clamp(byte[])} method to clear the required bits. +
+ +
+ + + Initialises the key generator. + + + Poly1305 keys are always 256 bits, so the key length in the provided parameters is ignored. + + + + + Generates a 256 bit key in the format required for Poly1305 - e.g. + k[0] ... k[15], r[0] ... r[15] with the required bits in r cleared + as per . + + + + + Modifies an existing 32 byte key value to comply with the requirements of the Poly1305 key by + clearing required bits in the r (second 16 bytes) portion of the key.
+ Specifically: +
    +
  • r[3], r[7], r[11], r[15] have top four bits clear (i.e., are {0, 1, . . . , 15})
  • +
  • r[4], r[8], r[12] have bottom two bits clear (i.e., are in {0, 4, 8, . . . , 252})
  • +
+
+ a 32 byte key value k[0] ... k[15], r[0] ... r[15] +
+ + + Checks a 32 byte key for compliance with the Poly1305 key requirements, e.g. + k[0] ... k[15], r[0] ... r[15] with the required bits in r cleared + as per . + + Key. + if the key is of the wrong length, or has invalid bits set + in the r portion of the key. + + + Generate a random factor suitable for use with RSA blind signatures + as outlined in Chaum's blinding and unblinding as outlined in + "Handbook of Applied Cryptography", page 475. + + + Initialise the factor generator + + @param param the necessary RSA key parameters. + + + Generate a suitable blind factor for the public key the generator was initialised with. + + @return a random blind factor + + + an RSA key pair generator. + + + Choose a random prime value for use with RSA + the bit-length of the returned prime + the RSA public exponent + a prime p, with (p-1) relatively prime to e + + + Implementation of the scrypt a password-based key derivation function. + + Scrypt was created by Colin Percival and is specified in + draft-josefsson-scrypt-kd. + + + + Generate a key using the scrypt key derivation function. + the bytes of the pass phrase. + the salt to use for this invocation. + CPU/Memory cost parameter. Must be larger than 1, a power of 2 and less than + 2^(128 * r / 8). + the block size, must be >= 1. + Parallelization parameter. Must be a positive integer less than or equal to + Int32.MaxValue / (128 * r * 8). + the length of the key to generate. + the generated key. + + + Base interface for a public/private key block cipher. + + + The name of the algorithm this cipher implements. + + + Initialise the cipher. + Initialise for encryption if true, for decryption if false. + The key or other data required by the cipher. + + + The maximum size, in bytes, an input block may be. + + + The maximum size, in bytes, an output block will be. + + + Process a block. + The input buffer. + The offset into inBuf that the input block begins. + The length of the input block. + Input decrypts improperly. + Input is too large for the cipher. + + + interface that a public/private key pair generator should conform to. + + + intialise the key pair generator. + + @param the parameters the key pair is to be initialised with. + + + return an AsymmetricCipherKeyPair containing the Generated keys. + + @return an AsymmetricCipherKeyPair containing the Generated keys. + + + The basic interface that basic Diffie-Hellman implementations + conforms to. + + + initialise the agreement engine. + + + return the field size for the agreement algorithm in bytes. + + + given a public key from a given party calculate the next + message in the agreement sequence. + + + Base interface for a symmetric key block cipher. + + + The name of the algorithm this cipher implements. + + + Initialise the cipher. + Initialise for encryption if true, for decryption if false. + The key or other data required by the cipher. + + + The block size for this cipher, in bytes. + + + Indicates whether this cipher can handle partial blocks. + + + Process a block. + The input buffer. + The offset into inBuf that the input block begins. + The output buffer. + The offset into outBuf to write the output block. + If input block is wrong size, or outBuf too small. + The number of bytes processed and produced. + + + + Reset the cipher to the same state as it was after the last init (if there was one). + + + + + Operators that reduce their input to a single block return an object + of this type. + + + + + Return the final result of the operation. + + A block of bytes, representing the result of an operation. + + + + Store the final result of the operation by copying it into the destination array. + + The number of bytes copied into destination. + The byte array to copy the result into. + The offset into destination to start copying the result at. + + + Block cipher engines are expected to conform to this interface. + + + The name of the algorithm this cipher implements. + + + Initialise the cipher. + If true the cipher is initialised for encryption, + if false for decryption. + The key and other data required by the cipher. + + + + Reset the cipher. After resetting the cipher is in the same state + as it was after the last init (if there was one). + + + + + Base interface for a ciphers that do not require data to be block aligned. + + Note: In cases where the underlying algorithm is block based, these ciphers may add or remove padding as needed. + + + + + + Return the size of the output buffer required for a Write() plus a + close() with the write() being passed inputLen bytes. + + The returned size may be dependent on the initialisation of this cipher + and may not be accurate once subsequent input data is processed as the cipher may + add, add or remove padding, as it sees fit. + + + The space required to accommodate a call to processBytes and doFinal with inputLen bytes of input. + The length of the expected input. + + + + Return the size of the output buffer required for a write() with the write() being + passed inputLen bytes and just updating the cipher output. + + The space required to accommodate a call to processBytes with inputLen bytes of input. + The length of the expected input. + + + + Gets the stream for reading/writing data processed/to be processed. + + The stream associated with this cipher. + + + + Base interface for cipher builders. + + + + + Return the algorithm and parameter details associated with any cipher built. + + + + + Return the maximum output size that a given input will produce. + + the length of the expected input. + The maximum possible output size that can produced for the expected input length. + + + + Build a cipher that operates on the passed in stream. + + The stream to write/read any encrypted/decrypted data. + A cipher based around the given stream. + + + + A cipher builder that can also return the key it was initialized with. + + + + + Return the key we were initialized with. + + + + all parameter classes implement this. + + + + Interface describing a provider of cipher builders for creating decrypting ciphers. + + + + + Return a cipher builder for creating decrypting ciphers. + + The algorithm details/parameters to use to create the final cipher. + A new cipher builder. + + + base interface for general purpose byte derivation functions. + + + return the message digest used as the basis for the function + + + Parameters for key/byte stream derivation classes + + + interface that a message digest conforms to. + + + return the algorithm name + + @return the algorithm name + + + return the size, in bytes, of the digest produced by this message digest. + + @return the size, in bytes, of the digest produced by this message digest. + + + return the size, in bytes, of the internal buffer used by this digest. + + @return the size, in bytes, of the internal buffer used by this digest. + + + update the message digest with a single byte. + + @param inByte the input byte to be entered. + + + update the message digest with a block of bytes. + + @param input the byte array containing the data. + @param inOff the offset into the byte array where the data starts. + @param len the length of the data. + + + Close the digest, producing the final digest value. The doFinal + call leaves the digest reset. + + @param output the array the digest is to be copied into. + @param outOff the offset into the out array the digest is to start at. + + + reset the digest back to it's initial state. + + + + Base interface for operator factories that create stream-based digest calculators. + + + + The algorithm details object for calculators made by this factory. + + + Return the size of the digest associated with this factory. + The length of the digest produced by this calculators from this factory in bytes. + + + + Create a stream calculator for the digest associated with this factory. The stream + calculator is used for the actual operation of entering the data to be digested + and producing the digest block. + + A calculator producing an IBlockResult with the final digest in it. + + + interface for classes implementing the Digital Signature Algorithm + + + initialise the signer for signature generation or signature + verification. + + @param forSigning true if we are generating a signature, false + otherwise. + @param param key parameters for signature generation. + + + sign the passed in message (usually the output of a hash function). + + @param message the message to be signed. + @return two big integers representing the r and s values respectively. + + + verify the message message against the signature values r and s. + + @param message the message that was supposed to have been signed. + @param r the r signature value. + @param s the s signature value. + + + + An "extended" interface for classes implementing DSA-style algorithms, that provides access + to the group order. + + + + The order of the group that the r, s values in signatures belong to. + + + + Base interface describing an entropy source for a DRBG. + + + + + Return whether or not this entropy source is regarded as prediction resistant. + + true if this instance is prediction resistant; otherwise, false. + + + + Return a byte array of entropy. + + The entropy bytes. + + + + Return the number of bits of entropy this source can produce. + + The size, in bits, of the return value of getEntropy. + + + + Base interface describing a provider of entropy sources. + + + + + Return an entropy source providing a block of entropy. + + The size of the block of entropy required. + An entropy source providing bitsRequired blocks of entropy. + + + + Base interface for a key unwrapper. + + + + + The parameter set used to configure this key unwrapper. + + + + + Unwrap the passed in data. + + The array containing the data to be unwrapped. + The offset into cipherText at which the unwrapped data starts. + The length of the data to be unwrapped. + an IBlockResult containing the unwrapped key data. + + + + Base interface for a key wrapper. + + + + + The parameter set used to configure this key wrapper. + + + + + Wrap the passed in key data. + + The key data to be wrapped. + an IBlockResult containing the wrapped key data. + + + The base interface for implementations of message authentication codes (MACs). + + + Initialise the MAC. + + @param param the key and other data required by the MAC. + @exception ArgumentException if the parameters argument is + inappropriate. + + + Return the name of the algorithm the MAC implements. + + @return the name of the algorithm the MAC implements. + + + Return the block size for this MAC (in bytes). + + @return the block size for this MAC in bytes. + + + add a single byte to the mac for processing. + + @param in the byte to be processed. + @exception InvalidOperationException if the MAC is not initialised. + + + @param in the array containing the input. + @param inOff the index in the array the data begins at. + @param len the length of the input starting at inOff. + @exception InvalidOperationException if the MAC is not initialised. + @exception DataLengthException if there isn't enough data in in. + + + Compute the final stage of the MAC writing the output to the out + parameter. +

+ doFinal leaves the MAC in the same state it was after the last init. +

+ @param out the array the MAC is to be output to. + @param outOff the offset into the out buffer the output is to start at. + @exception DataLengthException if there isn't enough space in out. + @exception InvalidOperationException if the MAC is not initialised. +
+ + Reset the MAC. At the end of resetting the MAC should be in the + in the same state it was after the last init (if there was one). + + + The algorithm details object for this calculator. + + + + Create a stream calculator for this signature calculator. The stream + calculator is used for the actual operation of entering the data to be signed + and producing the signature block. + + A calculator producing an IBlockResult with a signature in it. + + + this exception is thrown whenever we find something we don't expect in a + message. + + + base constructor. + + + create a InvalidCipherTextException with the given message. + + @param message the message to be carried with the exception. + + + + Base interface for operators that serve as stream-based signature calculators. + + + + The algorithm details object for this calculator. + + + + Create a stream calculator for this signature calculator. The stream + calculator is used for the actual operation of entering the data to be signed + and producing the signature block. + + A calculator producing an IBlockResult with a signature in it. + + + Return the name of the algorithm the signer implements. + + @return the name of the algorithm the signer implements. + + + Initialise the signer for signing or verification. + + @param forSigning true if for signing, false otherwise + @param param necessary parameters. + + + update the internal digest with the byte b + + + update the internal digest with the byte array in + + + Generate a signature for the message we've been loaded with using + the key we were initialised with. + + + return true if the internal state represents the signature described + in the passed in array. + + + reset the internal state + + + Signer with message recovery. + + + Returns true if the signer has recovered the full message as + part of signature verification. + + @return true if full message recovered. + + + Returns a reference to what message was recovered (if any). + + @return full/partial message, null if nothing. + + + Perform an update with the recovered message before adding any other data. This must + be the first update method called, and calling it will result in the signer assuming + that further calls to update will include message content past what is recoverable. + + @param signature the signature that we are in the process of verifying. + @throws IllegalStateException + + + + Base interface for cryptographic operations such as Hashes, MACs, and Signatures which reduce a stream of data + to a single value. + + + + Return a "sink" stream which only exists to update the implementing object. + A stream to write to in order to update the implementing object. + + + + Return the result of processing the stream. This value is only available once the stream + has been closed. + + The result of processing the stream. + + + The interface stream ciphers conform to. + + + The name of the algorithm this cipher implements. + + + Initialise the cipher. + If true the cipher is initialised for encryption, + if false for decryption. + The key and other data required by the cipher. + + If the parameters argument is inappropriate. + + + + encrypt/decrypt a single byte returning the result. + the byte to be processed. + the result of processing the input byte. + + + + Process a block of bytes from input putting the result into output. + + The input byte array. + + The offset into input where the data to be processed starts. + + The number of bytes to be processed. + The output buffer the processed bytes go into. + + The offset into output the processed data starts at. + + If the output buffer is too small. + + + + Reset the cipher to the same state as it was after the last init (if there was one). + + + + + Operators that reduce their input to the validation of a signature produce this type. + + + + + Return true if the passed in data matches what is expected by the verification result. + + The bytes representing the signature. + true if the signature verifies, false otherwise. + + + + Return true if the length bytes from off in the source array match the signature + expected by the verification result. + + Byte array containing the signature. + The offset into the source array where the signature starts. + The number of bytes in source making up the signature. + true if the signature verifies, false otherwise. + + + + Base interface for operators that serve as stream-based signature verifiers. + + + + The algorithm details object for this verifier. + + + + Create a stream calculator for this verifier. The stream + calculator is used for the actual operation of entering the data to be verified + and producing a result which can be used to verify the original signature. + + A calculator producing an IVerifier which can verify the signature. + + + + Base interface for a provider to support the dynamic creation of signature verifiers. + + + + + Return a signature verfier for signature algorithm described in the passed in algorithm details object. + + The details of the signature algorithm verification is required for. + A new signature verifier. + + + The name of the algorithm this cipher implements. + + + + With FIPS PUB 202 a new kind of message digest was announced which supported extendable output, or variable digest sizes. + This interface provides the extra method required to support variable output on a digest implementation. + + + + + Output the results of the final calculation for this digest to outLen number of bytes. + + output array to write the output bytes to. + offset to start writing the bytes at. + the number of output bytes requested. + the number of bytes written + + + + Start outputting the results of the final calculation for this digest. Unlike DoFinal, this method + will continue producing output until the Xof is explicitly reset, or signals otherwise. + + output array to write the output bytes to. + offset to start writing the bytes at. + the number of output bytes requested. + the number of bytes written + + + The base class for parameters to key generators. + + + initialise the generator with a source of randomness + and a strength (in bits). + + @param random the random byte source. + @param strength the size, in bits, of the keys we want to produce. + + + return the random source associated with this + generator. + + @return the generators random source. + + + return the bit strength for keys produced by this generator, + + @return the strength of the keys this generator produces (in bits). + + + standard CBC Block Cipher MAC - if no padding is specified the default of + pad of zeroes is used. + + + create a standard MAC based on a CBC block cipher. This will produce an + authentication code half the length of the block size of the cipher. + + @param cipher the cipher to be used as the basis of the MAC generation. + + + create a standard MAC based on a CBC block cipher. This will produce an + authentication code half the length of the block size of the cipher. + + @param cipher the cipher to be used as the basis of the MAC generation. + @param padding the padding to be used to complete the last block. + + + create a standard MAC based on a block cipher with the size of the + MAC been given in bits. This class uses CBC mode as the basis for the + MAC generation. +

+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81), + or 16 bits if being used as a data authenticator (FIPS Publication 113), + and in general should be less than the size of the block cipher as it reduces + the chance of an exhaustive attack (see Handbook of Applied Cryptography). +

+ @param cipher the cipher to be used as the basis of the MAC generation. + @param macSizeInBits the size of the MAC in bits, must be a multiple of 8. +
+ + create a standard MAC based on a block cipher with the size of the + MAC been given in bits. This class uses CBC mode as the basis for the + MAC generation. +

+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81), + or 16 bits if being used as a data authenticator (FIPS Publication 113), + and in general should be less than the size of the block cipher as it reduces + the chance of an exhaustive attack (see Handbook of Applied Cryptography). +

+ @param cipher the cipher to be used as the basis of the MAC generation. + @param macSizeInBits the size of the MAC in bits, must be a multiple of 8. + @param padding the padding to be used to complete the last block. +
+ + Reset the mac generator. + + + implements a Cipher-FeedBack (CFB) mode on top of a simple cipher. + + + Basic constructor. + + @param cipher the block cipher to be used as the basis of the + feedback mode. + @param blockSize the block size in bits (note: a multiple of 8) + + + Initialise the cipher and, possibly, the initialisation vector (IV). + If an IV isn't passed as part of the parameter, the IV will be all zeros. + An IV which is too short is handled in FIPS compliant fashion. + + @param param the key and other data required by the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + return the algorithm name and mode. + + @return the name of the underlying algorithm followed by "/CFB" + and the block size in bits. + + + return the block size we are operating at. + + @return the block size we are operating at (in bytes). + + + Process one block of input from the array in and write it to + the out array. + + @param in the array containing the input data. + @param inOff offset into the in array the data starts at. + @param out the array the output data will be copied into. + @param outOff the offset into the out array the output will start at. + @exception DataLengthException if there isn't enough data in in, or + space in out. + @exception InvalidOperationException if the cipher isn't initialised. + @return the number of bytes processed and produced. + + + reset the chaining vector back to the IV and reset the underlying + cipher. + + + create a standard MAC based on a CFB block cipher. This will produce an + authentication code half the length of the block size of the cipher, with + the CFB mode set to 8 bits. + + @param cipher the cipher to be used as the basis of the MAC generation. + + + create a standard MAC based on a CFB block cipher. This will produce an + authentication code half the length of the block size of the cipher, with + the CFB mode set to 8 bits. + + @param cipher the cipher to be used as the basis of the MAC generation. + @param padding the padding to be used. + + + create a standard MAC based on a block cipher with the size of the + MAC been given in bits. This class uses CFB mode as the basis for the + MAC generation. +

+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81), + or 16 bits if being used as a data authenticator (FIPS Publication 113), + and in general should be less than the size of the block cipher as it reduces + the chance of an exhaustive attack (see Handbook of Applied Cryptography). +

+ @param cipher the cipher to be used as the basis of the MAC generation. + @param cfbBitSize the size of an output block produced by the CFB mode. + @param macSizeInBits the size of the MAC in bits, must be a multiple of 8. +
+ + create a standard MAC based on a block cipher with the size of the + MAC been given in bits. This class uses CFB mode as the basis for the + MAC generation. +

+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81), + or 16 bits if being used as a data authenticator (FIPS Publication 113), + and in general should be less than the size of the block cipher as it reduces + the chance of an exhaustive attack (see Handbook of Applied Cryptography). +

+ @param cipher the cipher to be used as the basis of the MAC generation. + @param cfbBitSize the size of an output block produced by the CFB mode. + @param macSizeInBits the size of the MAC in bits, must be a multiple of 8. + @param padding a padding to be used. +
+ + Reset the mac generator. + + + CMAC - as specified at www.nuee.nagoya-u.ac.jp/labs/tiwata/omac/omac.html +

+ CMAC is analogous to OMAC1 - see also en.wikipedia.org/wiki/CMAC +

+ CMAC is a NIST recomendation - see + csrc.nist.gov/CryptoToolkit/modes/800-38_Series_Publications/SP800-38B.pdf +

+ CMAC/OMAC1 is a blockcipher-based message authentication code designed and + analyzed by Tetsu Iwata and Kaoru Kurosawa. +

+ CMAC/OMAC1 is a simple variant of the CBC MAC (Cipher Block Chaining Message + Authentication Code). OMAC stands for One-Key CBC MAC. +

+ It supports 128- or 64-bits block ciphers, with any key size, and returns + a MAC with dimension less or equal to the block size of the underlying + cipher. +

+
+ + create a standard MAC based on a CBC block cipher (64 or 128 bit block). + This will produce an authentication code the length of the block size + of the cipher. + + @param cipher the cipher to be used as the basis of the MAC generation. + + + create a standard MAC based on a block cipher with the size of the + MAC been given in bits. +

+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81), + or 16 bits if being used as a data authenticator (FIPS Publication 113), + and in general should be less than the size of the block cipher as it reduces + the chance of an exhaustive attack (see Handbook of Applied Cryptography). + + @param cipher the cipher to be used as the basis of the MAC generation. + @param macSizeInBits the size of the MAC in bits, must be a multiple of 8 and @lt;= 128. + + + Reset the mac generator. + + +

+ Implementation of DSTU7564 mac mode + +
+ + implementation of DSTU 7624 MAC + + + + The GMAC specialisation of Galois/Counter mode (GCM) detailed in NIST Special Publication + 800-38D. + + + GMac is an invocation of the GCM mode where no data is encrypted (i.e. all input data to the Mac + is processed as additional authenticated data with the underlying GCM block cipher). + + + + + Creates a GMAC based on the operation of a block cipher in GCM mode. + + + This will produce an authentication code the length of the block size of the cipher. + + the cipher to be used in GCM mode to generate the MAC. + + + + Creates a GMAC based on the operation of a 128 bit block cipher in GCM mode. + + + This will produce an authentication code the length of the block size of the cipher. + + the cipher to be used in GCM mode to generate the MAC. + the mac size to generate, in bits. Must be a multiple of 8, between 32 and 128 (inclusive). + Sizes less than 96 are not recommended, but are supported for specialized applications. + + + + Initialises the GMAC - requires a + providing a and a nonce. + + + + implementation of GOST 28147-89 MAC + + + HMAC implementation based on RFC2104 + + H(K XOR opad, H(K XOR ipad, text)) + + + Reset the mac generator. + + + DES based CBC Block Cipher MAC according to ISO9797, algorithm 3 (ANSI X9.19 Retail MAC) + + This could as well be derived from CBCBlockCipherMac, but then the property mac in the base + class must be changed to protected + + + create a Retail-MAC based on a CBC block cipher. This will produce an + authentication code of the length of the block size of the cipher. + + @param cipher the cipher to be used as the basis of the MAC generation. This must + be DESEngine. + + + create a Retail-MAC based on a CBC block cipher. This will produce an + authentication code of the length of the block size of the cipher. + + @param cipher the cipher to be used as the basis of the MAC generation. + @param padding the padding to be used to complete the last block. + + + create a Retail-MAC based on a block cipher with the size of the + MAC been given in bits. This class uses single DES CBC mode as the basis for the + MAC generation. +

+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81), + or 16 bits if being used as a data authenticator (FIPS Publication 113), + and in general should be less than the size of the block cipher as it reduces + the chance of an exhaustive attack (see Handbook of Applied Cryptography). +

+ @param cipher the cipher to be used as the basis of the MAC generation. + @param macSizeInBits the size of the MAC in bits, must be a multiple of 8. +
+ + create a standard MAC based on a block cipher with the size of the + MAC been given in bits. This class uses single DES CBC mode as the basis for the + MAC generation. The final block is decrypted and then encrypted using the + middle and right part of the key. +

+ Note: the size of the MAC must be at least 24 bits (FIPS Publication 81), + or 16 bits if being used as a data authenticator (FIPS Publication 113), + and in general should be less than the size of the block cipher as it reduces + the chance of an exhaustive attack (see Handbook of Applied Cryptography). +

+ @param cipher the cipher to be used as the basis of the MAC generation. + @param macSizeInBits the size of the MAC in bits, must be a multiple of 8. + @param padding the padding to be used to complete the last block. +
+ + Reset the mac generator. + + + + Poly1305 message authentication code, designed by D. J. Bernstein. + + + Poly1305 computes a 128-bit (16 bytes) authenticator, using a 128 bit nonce and a 256 bit key + consisting of a 128 bit key applied to an underlying cipher, and a 128 bit key (with 106 + effective key bits) used in the authenticator. + + The polynomial calculation in this implementation is adapted from the public domain poly1305-donna-unrolled C implementation + by Andrew M (@floodyberry). + + + + + Polynomial key + + + Polynomial key + + + Polynomial key + + + Polynomial key + + + Polynomial key + + + Precomputed 5 * r[1..4] + + + Precomputed 5 * r[1..4] + + + Precomputed 5 * r[1..4] + + + Precomputed 5 * r[1..4] + + + Encrypted nonce + + + Encrypted nonce + + + Encrypted nonce + + + Encrypted nonce + + + Current block of buffered input + + + Current offset in input buffer + + + Polynomial accumulator + + + Polynomial accumulator + + + Polynomial accumulator + + + Polynomial accumulator + + + Polynomial accumulator + + + Constructs a Poly1305 MAC, where the key passed to init() will be used directly. + + + Constructs a Poly1305 MAC, using a 128 bit block cipher. + + + + Initialises the Poly1305 MAC. + + a {@link ParametersWithIV} containing a 128 bit nonce and a {@link KeyParameter} with + a 256 bit key complying to the {@link Poly1305KeyGenerator Poly1305 key format}. + + + + Implementation of SipHash as specified in "SipHash: a fast short-input PRF", by Jean-Philippe + Aumasson and Daniel J. Bernstein (https://131002.net/siphash/siphash.pdf). + + + "SipHash is a family of PRFs SipHash-c-d where the integer parameters c and d are the number of + compression rounds and the number of finalization rounds. A compression round is identical to a + finalization round and this round function is called SipRound. Given a 128-bit key k and a + (possibly empty) byte string m, SipHash-c-d returns a 64-bit value..." + + + + SipHash-2-4 + + + SipHash-c-d + the number of compression rounds + the number of finalization rounds + + + + Implementation of the Skein parameterised MAC function in 256, 512 and 1024 bit block sizes, + based on the Threefish tweakable block cipher. + + + This is the 1.3 version of Skein defined in the Skein hash function submission to the NIST SHA-3 + competition in October 2010. +

+ Skein was designed by Niels Ferguson - Stefan Lucks - Bruce Schneier - Doug Whiting - Mihir + Bellare - Tadayoshi Kohno - Jon Callas - Jesse Walker. + + + + + +

+ 256 bit block size - Skein-256 + +
+ + + 512 bit block size - Skein-512 + + + + + 1024 bit block size - Skein-1024 + + + + + Constructs a Skein MAC with an internal state size and output size. + + the internal state size in bits - one of or + . + the output/MAC size to produce in bits, which must be an integral number of + bytes. + + + + Optionally initialises the Skein digest with the provided parameters. + + See for details on the parameterisation of the Skein hash function. + the parameters to apply to this engine, or null to use no parameters. + + + + This exception is thrown whenever a cipher requires a change of key, iv + or similar after x amount of bytes enciphered + + + + implements Cipher-Block-Chaining (CBC) mode on top of a simple cipher. + + + Basic constructor. + + @param cipher the block cipher to be used as the basis of chaining. + + + return the underlying block cipher that we are wrapping. + + @return the underlying block cipher that we are wrapping. + + + Initialise the cipher and, possibly, the initialisation vector (IV). + If an IV isn't passed as part of the parameter, the IV will be all zeros. + + @param forEncryption if true the cipher is initialised for + encryption, if false for decryption. + @param param the key and other data required by the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + return the algorithm name and mode. + + @return the name of the underlying algorithm followed by "/CBC". + + + return the block size of the underlying cipher. + + @return the block size of the underlying cipher. + + + Process one block of input from the array in and write it to + the out array. + + @param in the array containing the input data. + @param inOff offset into the in array the data starts at. + @param out the array the output data will be copied into. + @param outOff the offset into the out array the output will start at. + @exception DataLengthException if there isn't enough data in in, or + space in out. + @exception InvalidOperationException if the cipher isn't initialised. + @return the number of bytes processed and produced. + + + reset the chaining vector back to the IV and reset the underlying + cipher. + + + Do the appropriate chaining step for CBC mode encryption. + + @param in the array containing the data to be encrypted. + @param inOff offset into the in array the data starts at. + @param out the array the encrypted data will be copied into. + @param outOff the offset into the out array the output will start at. + @exception DataLengthException if there isn't enough data in in, or + space in out. + @exception InvalidOperationException if the cipher isn't initialised. + @return the number of bytes processed and produced. + + + Do the appropriate chaining step for CBC mode decryption. + + @param in the array containing the data to be decrypted. + @param inOff offset into the in array the data starts at. + @param out the array the decrypted data will be copied into. + @param outOff the offset into the out array the output will start at. + @exception DataLengthException if there isn't enough data in in, or + space in out. + @exception InvalidOperationException if the cipher isn't initialised. + @return the number of bytes processed and produced. + + + Implements the Counter with Cipher Block Chaining mode (CCM) detailed in + NIST Special Publication 800-38C. +

+ Note: this mode is a packet mode - it needs all the data up front. +

+
+ + Basic constructor. + + @param cipher the block cipher to be used. + + + return the underlying block cipher that we are wrapping. + + @return the underlying block cipher that we are wrapping. + + + Returns a byte array containing the mac calculated as part of the + last encrypt or decrypt operation. + + @return the last mac calculated. + + + Process a packet of data for either CCM decryption or encryption. + + @param in data for processing. + @param inOff offset at which data starts in the input array. + @param inLen length of the data in the input array. + @return a byte array containing the processed input.. + @throws IllegalStateException if the cipher is not appropriately set up. + @throws InvalidCipherTextException if the input data is truncated or the mac check fails. + + + Process a packet of data for either CCM decryption or encryption. + + @param in data for processing. + @param inOff offset at which data starts in the input array. + @param inLen length of the data in the input array. + @param output output array. + @param outOff offset into output array to start putting processed bytes. + @return the number of bytes added to output. + @throws IllegalStateException if the cipher is not appropriately set up. + @throws InvalidCipherTextException if the input data is truncated or the mac check fails. + @throws DataLengthException if output buffer too short. + + + implements a Cipher-FeedBack (CFB) mode on top of a simple cipher. + + + Basic constructor. + + @param cipher the block cipher to be used as the basis of the + feedback mode. + @param blockSize the block size in bits (note: a multiple of 8) + + + return the underlying block cipher that we are wrapping. + + @return the underlying block cipher that we are wrapping. + + + Initialise the cipher and, possibly, the initialisation vector (IV). + If an IV isn't passed as part of the parameter, the IV will be all zeros. + An IV which is too short is handled in FIPS compliant fashion. + + @param forEncryption if true the cipher is initialised for + encryption, if false for decryption. + @param param the key and other data required by the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + return the algorithm name and mode. + + @return the name of the underlying algorithm followed by "/CFB" + and the block size in bits. + + + return the block size we are operating at. + + @return the block size we are operating at (in bytes). + + + Process one block of input from the array in and write it to + the out array. + + @param in the array containing the input data. + @param inOff offset into the in array the data starts at. + @param out the array the output data will be copied into. + @param outOff the offset into the out array the output will start at. + @exception DataLengthException if there isn't enough data in in, or + space in out. + @exception InvalidOperationException if the cipher isn't initialised. + @return the number of bytes processed and produced. + + + Do the appropriate processing for CFB mode encryption. + + @param in the array containing the data to be encrypted. + @param inOff offset into the in array the data starts at. + @param out the array the encrypted data will be copied into. + @param outOff the offset into the out array the output will start at. + @exception DataLengthException if there isn't enough data in in, or + space in out. + @exception InvalidOperationException if the cipher isn't initialised. + @return the number of bytes processed and produced. + + + Do the appropriate processing for CFB mode decryption. + + @param in the array containing the data to be decrypted. + @param inOff offset into the in array the data starts at. + @param out the array the encrypted data will be copied into. + @param outOff the offset into the out array the output will start at. + @exception DataLengthException if there isn't enough data in in, or + space in out. + @exception InvalidOperationException if the cipher isn't initialised. + @return the number of bytes processed and produced. + + + reset the chaining vector back to the IV and reset the underlying + cipher. + + + A Cipher Text Stealing (CTS) mode cipher. CTS allows block ciphers to + be used to produce cipher text which is the same outLength as the plain text. + + + Create a buffered block cipher that uses Cipher Text Stealing + + @param cipher the underlying block cipher this buffering object wraps. + + + return the size of the output buffer required for an update of 'length' bytes. + + @param length the outLength of the input. + @return the space required to accommodate a call to update + with length bytes of input. + + + return the size of the output buffer required for an update plus a + doFinal with an input of length bytes. + + @param length the outLength of the input. + @return the space required to accommodate a call to update and doFinal + with length bytes of input. + + + process a single byte, producing an output block if necessary. + + @param in the input byte. + @param out the space for any output that might be produced. + @param outOff the offset from which the output will be copied. + @return the number of output bytes copied to out. + @exception DataLengthException if there isn't enough space in out. + @exception InvalidOperationException if the cipher isn't initialised. + + + process an array of bytes, producing output if necessary. + + @param in the input byte array. + @param inOff the offset at which the input data starts. + @param length the number of bytes to be copied out of the input array. + @param out the space for any output that might be produced. + @param outOff the offset from which the output will be copied. + @return the number of output bytes copied to out. + @exception DataLengthException if there isn't enough space in out. + @exception InvalidOperationException if the cipher isn't initialised. + + + Process the last block in the buffer. + + @param out the array the block currently being held is copied into. + @param outOff the offset at which the copying starts. + @return the number of output bytes copied to out. + @exception DataLengthException if there is insufficient space in out for + the output. + @exception InvalidOperationException if the underlying cipher is not + initialised. + @exception InvalidCipherTextException if cipher text decrypts wrongly (in + case the exception will never Get thrown). + + + A Two-Pass Authenticated-Encryption Scheme Optimized for Simplicity and + Efficiency - by M. Bellare, P. Rogaway, D. Wagner. + + http://www.cs.ucdavis.edu/~rogaway/papers/eax.pdf + + EAX is an AEAD scheme based on CTR and OMAC1/CMAC, that uses a single block + cipher to encrypt and authenticate data. It's on-line (the length of a + message isn't needed to begin processing it), has good performances, it's + simple and provably secure (provided the underlying block cipher is secure). + + Of course, this implementations is NOT thread-safe. + + + Constructor that accepts an instance of a block cipher engine. + + @param cipher the engine to use + + + + Implements the Galois/Counter mode (GCM) detailed in + NIST Special Publication 800-38D. + + + + + MAC sizes from 32 bits to 128 bits (must be a multiple of 8) are supported. The default is 128 bits. + Sizes less than 96 are not recommended, but are supported for specialized applications. + + + + implements the GOST 28147 OFB counter mode (GCTR). + + + Basic constructor. + + @param cipher the block cipher to be used as the basis of the + counter mode (must have a 64 bit block size). + + + return the underlying block cipher that we are wrapping. + + @return the underlying block cipher that we are wrapping. + + + Initialise the cipher and, possibly, the initialisation vector (IV). + If an IV isn't passed as part of the parameter, the IV will be all zeros. + An IV which is too short is handled in FIPS compliant fashion. + + @param encrypting if true the cipher is initialised for + encryption, if false for decryption. + @param parameters the key and other data required by the cipher. + @exception ArgumentException if the parameters argument is inappropriate. + + + return the algorithm name and mode. + + @return the name of the underlying algorithm followed by "/GCTR" + and the block size in bits + + + return the block size we are operating at (in bytes). + + @return the block size we are operating at (in bytes). + + + Process one block of input from the array in and write it to + the out array. + + @param in the array containing the input data. + @param inOff offset into the in array the data starts at. + @param out the array the output data will be copied into. + @param outOff the offset into the out array the output will start at. + @exception DataLengthException if there isn't enough data in in, or + space in out. + @exception InvalidOperationException if the cipher isn't initialised. + @return the number of bytes processed and produced. + + + reset the feedback vector back to the IV and reset the underlying + cipher. + + + An IAeadCipher based on an IBlockCipher. + + + The block size for this cipher, in bytes. + + + The block cipher underlying this algorithm. + + + + A cipher mode that includes authenticated encryption with a streaming mode and optional + associated data. + + + Implementations of this interface may operate in a packet mode (where all input data is + buffered and processed during the call to DoFinal, or in a streaming mode (where output + data is incrementally produced with each call to ProcessByte or ProcessBytes. This is + important to consider during decryption: in a streaming mode, unauthenticated plaintext + data may be output prior to the call to DoFinal that results in an authentication failure. + The higher level protocol utilising this cipher must ensure the plaintext data is handled + appropriately until the end of data is reached and the entire ciphertext is authenticated. + + + + + The name of the algorithm this cipher implements. + + + Initialise the cipher. + Parameter can either be an AeadParameters or a ParametersWithIV object. + Initialise for encryption if true, for decryption if false. + The key or other data required by the cipher. + + + Add a single byte to the associated data check. + If the implementation supports it, this will be an online operation and will not retain the associated data. + The byte to be processed. + + + Add a sequence of bytes to the associated data check. + If the implementation supports it, this will be an online operation and will not retain the associated data. + The input byte array. + The offset into the input array where the data to be processed starts. + The number of bytes to be processed. + + + Encrypt/decrypt a single byte. + + @param input the byte to be processed. + @param outBytes the output buffer the processed byte goes into. + @param outOff the offset into the output byte array the processed data starts at. + @return the number of bytes written to out. + @exception DataLengthException if the output buffer is too small. + + + Process a block of bytes from in putting the result into out. + + @param inBytes the input byte array. + @param inOff the offset into the in array where the data to be processed starts. + @param len the number of bytes to be processed. + @param outBytes the output buffer the processed bytes go into. + @param outOff the offset into the output byte array the processed data starts at. + @return the number of bytes written to out. + @exception DataLengthException if the output buffer is too small. + + + Finish the operation either appending or verifying the MAC at the end of the data. + + @param outBytes space for any resulting output data. + @param outOff offset into out to start copying the data at. + @return number of bytes written into out. + @throws InvalidOperationException if the cipher is in an inappropriate state. + @throws InvalidCipherTextException if the MAC fails to match. + + + Return the value of the MAC associated with the last stream processed. + + @return MAC for plaintext data. + + + Return the size of the output buffer required for a ProcessBytes + an input of len bytes. + + @param len the length of the input. + @return the space required to accommodate a call to ProcessBytes + with len bytes of input. + + + Return the size of the output buffer required for a ProcessBytes plus a + DoFinal with an input of len bytes. + + @param len the length of the input. + @return the space required to accommodate a call to ProcessBytes and DoFinal + with len bytes of input. + + + + Reset the cipher to the same state as it was after the last init (if there was one). + + + + + Base constructor. Nb value is set to 4. + + base cipher to use under CCM. + + + + Constructor allowing Nb configuration. + + Nb is a parameter specified in CCM mode of DSTU7624 standard. + This parameter specifies maximum possible length of input.It should + be calculated as follows: Nb = 1 / 8 * (-3 + log[2]Nmax) + 1, + where Nmax - length of input message in bits.For practical reasons + Nmax usually less than 4Gb, e.g. for Nmax = 2^32 - 1, Nb = 4. + + base cipher to use under CCM. + Nb value to use. + + + Implements a Gamming or Counter (CTR) mode on top of a DSTU 7624 block cipher. + + + Basic constructor. + + @param cipher the block cipher to be used as the basis of the + feedback mode. + + + return the underlying block cipher that we are wrapping. + + @return the underlying block cipher that we are wrapping. + + + Initialise the cipher and, possibly, the initialisation vector (IV). + If an IV isn't passed as part of the parameter, the IV will be all zeros. + An IV which is too short is handled in FIPS compliant fashion. + + @param forEncryption if true the cipher is initialised for + encryption, if false for decryption. + @param param the key and other data required by the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + return the algorithm name and mode. + + @return the name of the underlying algorithm followed by "/KCTR" + and the block size in bits. + + + return the block size we are operating at. + + @return the block size we are operating at (in bytes). + + + Process one block of input from the array in and write it to + the out array. + + @param input the array containing the input data. + @param inOff offset into the in array the data starts at. + @param output the array the output data will be copied into. + @param outOff the offset into the out array the output will start at. + @exception DataLengthException if there isn't enough data in in, or + space in out. + @exception InvalidOperationException if the cipher isn't initialised. + @return the number of bytes processed and produced. + + + reset the chaining vector back to the IV and reset the underlying + cipher. + + + An implementation of RFC 7253 on The OCB + Authenticated-Encryption Algorithm, licensed per: + +

License for + Open-Source Software Implementations of OCB (Jan 9, 2013) - 'License 1'
+ Under this license, you are authorized to make, use, and distribute open-source software + implementations of OCB. This license terminates for you if you sue someone over their open-source + software implementation of OCB claiming that you have a patent covering their implementation. +

+ This is a non-binding summary of a legal document (the link above). The parameters of the license + are specified in the license document and that document is controlling.

+
+ + implements a Output-FeedBack (OFB) mode on top of a simple cipher. + + + Basic constructor. + + @param cipher the block cipher to be used as the basis of the + feedback mode. + @param blockSize the block size in bits (note: a multiple of 8) + + + return the underlying block cipher that we are wrapping. + + @return the underlying block cipher that we are wrapping. + + + Initialise the cipher and, possibly, the initialisation vector (IV). + If an IV isn't passed as part of the parameter, the IV will be all zeros. + An IV which is too short is handled in FIPS compliant fashion. + + @param forEncryption if true the cipher is initialised for + encryption, if false for decryption. + @param param the key and other data required by the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + return the algorithm name and mode. + + @return the name of the underlying algorithm followed by "/OFB" + and the block size in bits + + + return the block size we are operating at (in bytes). + + @return the block size we are operating at (in bytes). + + + Process one block of input from the array in and write it to + the out array. + + @param in the array containing the input data. + @param inOff offset into the in array the data starts at. + @param out the array the output data will be copied into. + @param outOff the offset into the out array the output will start at. + @exception DataLengthException if there isn't enough data in in, or + space in out. + @exception InvalidOperationException if the cipher isn't initialised. + @return the number of bytes processed and produced. + + + reset the feedback vector back to the IV and reset the underlying + cipher. + + + * Implements OpenPGP's rather strange version of Cipher-FeedBack (CFB) mode + * on top of a simple cipher. This class assumes the IV has been prepended + * to the data stream already, and just accomodates the reset after + * (blockSize + 2) bytes have been read. + *

+ * For further info see RFC 2440. + *

+
+ + Basic constructor. + + @param cipher the block cipher to be used as the basis of the + feedback mode. + + + return the underlying block cipher that we are wrapping. + + @return the underlying block cipher that we are wrapping. + + + return the algorithm name and mode. + + @return the name of the underlying algorithm followed by "/PGPCFB" + and the block size in bits. + + + return the block size we are operating at. + + @return the block size we are operating at (in bytes). + + + Process one block of input from the array in and write it to + the out array. + + @param in the array containing the input data. + @param inOff offset into the in array the data starts at. + @param out the array the output data will be copied into. + @param outOff the offset into the out array the output will start at. + @exception DataLengthException if there isn't enough data in in, or + space in out. + @exception InvalidOperationException if the cipher isn't initialised. + @return the number of bytes processed and produced. + + + reset the chaining vector back to the IV and reset the underlying + cipher. + + + Initialise the cipher and, possibly, the initialisation vector (IV). + If an IV isn't passed as part of the parameter, the IV will be all zeros. + An IV which is too short is handled in FIPS compliant fashion. + + @param forEncryption if true the cipher is initialised for + encryption, if false for decryption. + @param parameters the key and other data required by the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + Encrypt one byte of data according to CFB mode. + @param data the byte to encrypt + @param blockOff offset in the current block + @returns the encrypted byte + + + Do the appropriate processing for CFB IV mode encryption. + + @param in the array containing the data to be encrypted. + @param inOff offset into the in array the data starts at. + @param out the array the encrypted data will be copied into. + @param outOff the offset into the out array the output will start at. + @exception DataLengthException if there isn't enough data in in, or + space in out. + @exception InvalidOperationException if the cipher isn't initialised. + @return the number of bytes processed and produced. + + + Do the appropriate processing for CFB IV mode decryption. + + @param in the array containing the data to be decrypted. + @param inOff offset into the in array the data starts at. + @param out the array the encrypted data will be copied into. + @param outOff the offset into the out array the output will start at. + @exception DataLengthException if there isn't enough data in in, or + space in out. + @exception InvalidOperationException if the cipher isn't initialised. + @return the number of bytes processed and produced. + + + Implements the Segmented Integer Counter (SIC) mode on top of a simple + block cipher. + + + Basic constructor. + + @param c the block cipher to be used. + + + return the underlying block cipher that we are wrapping. + + @return the underlying block cipher that we are wrapping. + + + Return the digest algorithm using one of the standard JCA string + representations rather than the algorithm identifier (if possible). + + + + Calculator factory class for signature generation in ASN.1 based profiles that use an AlgorithmIdentifier to preserve + signature algorithm details. + + + + + Base constructor. + + The name of the signature algorithm to use. + The private key to be used in the signing operation. + + + + Constructor which also specifies a source of randomness to be used if one is required. + + The name of the signature algorithm to use. + The private key to be used in the signing operation. + The source of randomness to be used in signature calculation. + + + + Allows enumeration of the signature names supported by the verifier provider. + + + + + Verifier class for signature verification in ASN.1 based profiles that use an AlgorithmIdentifier to preserve + signature algorithm details. + + + + + Base constructor. + + The name of the signature algorithm to use. + The public key to be used in the verification operation. + + + + Provider class which supports dynamic creation of signature verifiers. + + + + + Base constructor - specify the public key to be used in verification. + + The public key to be used in creating verifiers provided by this object. + + + + Allows enumeration of the signature names supported by the verifier provider. + + + + Block cipher padders are expected to conform to this interface + + + Initialise the padder. + + @param param parameters, if any required. + + + Return the name of the algorithm the cipher implements. + + @return the name of the algorithm the cipher implements. + + + add the pad bytes to the passed in block, returning the + number of bytes added. + + + return the number of pad bytes present in the block. + @exception InvalidCipherTextException if the padding is badly formed + or invalid. + + + A padder that adds ISO10126-2 padding to a block. + + + Initialise the padder. + + @param random a SecureRandom if available. + + + Return the name of the algorithm the cipher implements. + + @return the name of the algorithm the cipher implements. + + + add the pad bytes to the passed in block, returning the + number of bytes added. + + + return the number of pad bytes present in the block. + + + A padder that adds the padding according to the scheme referenced in + ISO 7814-4 - scheme 2 from ISO 9797-1. The first byte is 0x80, rest is 0x00 + + + Initialise the padder. + + @param random - a SecureRandom if available. + + + Return the name of the algorithm the padder implements. + + @return the name of the algorithm the padder implements. + + + add the pad bytes to the passed in block, returning the + number of bytes added. + + + return the number of pad bytes present in the block. + + + A wrapper class that allows block ciphers to be used to process data in + a piecemeal fashion with padding. The PaddedBufferedBlockCipher + outputs a block only when the buffer is full and more data is being added, + or on a doFinal (unless the current block in the buffer is a pad block). + The default padding mechanism used is the one outlined in Pkcs5/Pkcs7. + + + Create a buffered block cipher with the desired padding. + + @param cipher the underlying block cipher this buffering object wraps. + @param padding the padding type. + + + Create a buffered block cipher Pkcs7 padding + + @param cipher the underlying block cipher this buffering object wraps. + + + initialise the cipher. + + @param forEncryption if true the cipher is initialised for + encryption, if false for decryption. + @param param the key and other data required by the cipher. + @exception ArgumentException if the parameters argument is + inappropriate. + + + return the minimum size of the output buffer required for an update + plus a doFinal with an input of len bytes. + + @param len the length of the input. + @return the space required to accommodate a call to update and doFinal + with len bytes of input. + + + return the size of the output buffer required for an update + an input of len bytes. + + @param len the length of the input. + @return the space required to accommodate a call to update + with len bytes of input. + + + process a single byte, producing an output block if necessary. + + @param in the input byte. + @param out the space for any output that might be produced. + @param outOff the offset from which the output will be copied. + @return the number of output bytes copied to out. + @exception DataLengthException if there isn't enough space in out. + @exception InvalidOperationException if the cipher isn't initialised. + + + process an array of bytes, producing output if necessary. + + @param in the input byte array. + @param inOff the offset at which the input data starts. + @param len the number of bytes to be copied out of the input array. + @param out the space for any output that might be produced. + @param outOff the offset from which the output will be copied. + @return the number of output bytes copied to out. + @exception DataLengthException if there isn't enough space in out. + @exception InvalidOperationException if the cipher isn't initialised. + + + Process the last block in the buffer. If the buffer is currently + full and padding needs to be added a call to doFinal will produce + 2 * GetBlockSize() bytes. + + @param out the array the block currently being held is copied into. + @param outOff the offset at which the copying starts. + @return the number of output bytes copied to out. + @exception DataLengthException if there is insufficient space in out for + the output or we are decrypting and the input is not block size aligned. + @exception InvalidOperationException if the underlying cipher is not + initialised. + @exception InvalidCipherTextException if padding is expected and not found. + + + A padder that adds Pkcs7/Pkcs5 padding to a block. + + + Initialise the padder. + + @param random - a SecureRandom if available. + + + Return the name of the algorithm the cipher implements. + + @return the name of the algorithm the cipher implements. + + + add the pad bytes to the passed in block, returning the + number of bytes added. + + + return the number of pad bytes present in the block. + + + A padder that adds Trailing-Bit-Compliment padding to a block. +

+ This padding pads the block out compliment of the last bit + of the plain text. +

+
+
+ + Return the name of the algorithm the cipher implements. + the name of the algorithm the cipher implements. + + + + Initialise the padder. + - a SecureRandom if available. + + + + add the pad bytes to the passed in block, returning the + number of bytes added. +

+ Note: this assumes that the last block of plain text is always + passed to it inside in. i.e. if inOff is zero, indicating the + entire block is to be overwritten with padding the value of in + should be the same as the last block of plain text. +

+
+
+ + return the number of pad bytes present in the block. + + + A padder that adds X9.23 padding to a block - if a SecureRandom is + passed in random padding is assumed, otherwise padding with zeros is used. + + + Initialise the padder. + + @param random a SecureRandom if one is available. + + + Return the name of the algorithm the cipher implements. + + @return the name of the algorithm the cipher implements. + + + add the pad bytes to the passed in block, returning the + number of bytes added. + + + return the number of pad bytes present in the block. + + + A padder that adds Null byte padding to a block. + + + Return the name of the algorithm the cipher implements. + + + the name of the algorithm the cipher implements. + + + + Initialise the padder. + + + - a SecureRandom if available. + + + + add the pad bytes to the passed in block, returning the + number of bytes added. + + + + return the number of pad bytes present in the block. + + + Base constructor. + + @param key key to be used by underlying cipher + @param macSize macSize in bits + @param nonce nonce to be used + + + Base constructor. + + @param key key to be used by underlying cipher + @param macSize macSize in bits + @param nonce nonce to be used + @param associatedText associated text, if any + + + Base constructor. + + @param key key to be used by underlying cipher + @param macSize macSize in bits + @param nonce nonce to be used + @param associatedText associated text, if any + + + return true if the passed in key is a DES-EDE weak key. + + @param key bytes making up the key + @param offset offset into the byte array the key starts at + @param length number of bytes making up the key + + + return true if the passed in key is a DES-EDE weak key. + + @param key bytes making up the key + @param offset offset into the byte array the key starts at + + + return true if the passed in key is a real 2/3 part DES-EDE key. + + @param key bytes making up the key + @param offset offset into the byte array the key starts at + + + return true if the passed in key is a real 2 part DES-EDE key. + + @param key bytes making up the key + @param offset offset into the byte array the key starts at + + + return true if the passed in key is a real 3 part DES-EDE key. + + @param key bytes making up the key + @param offset offset into the byte array the key starts at + + + DES has 16 weak keys. This method will check + if the given DES key material is weak or semi-weak. + Key material that is too short is regarded as weak. +

+ See "Applied + Cryptography" by Bruce Schneier for more information. +

+ @return true if the given DES key material is weak or semi-weak, + false otherwise. +
+ + DES Keys use the LSB as the odd parity bit. This can + be used to check for corrupt keys. + + @param bytes the byte array to set the parity on. + + + The minimum bitlength of the private value. + + + The bitlength of the private value. + + + Construct without a usage index, this will do a random construction of G. + + @param L desired length of prime P in bits (the effective key size). + @param N desired length of prime Q in bits. + @param certainty certainty level for prime number generation. + @param random the source of randomness to use. + + + Construct for a specific usage index - this has the effect of using verifiable canonical generation of G. + + @param L desired length of prime P in bits (the effective key size). + @param N desired length of prime Q in bits. + @param certainty certainty level for prime number generation. + @param random the source of randomness to use. + @param usageIndex a valid usage index. + + + return the generator - g + + + return private value limit - l + + + Parameter class for the HkdfBytesGenerator class. + + + Generates parameters for HKDF, specifying both the optional salt and + optional info. Step 1: Extract won't be skipped. + + @param ikm the input keying material or seed + @param salt the salt to use, may be null for a salt for hashLen zeros + @param info the info to use, may be null for an info field of zero bytes + + + Factory method that makes the HKDF skip the extract part of the key + derivation function. + + @param ikm the input keying material or seed, directly used for step 2: + Expand + @param info the info to use, may be null for an info field of zero bytes + @return HKDFParameters that makes the implementation skip step 1 + + + Returns the input keying material or seed. + + @return the keying material + + + Returns if step 1: extract has to be skipped or not + + @return true for skipping, false for no skipping of step 1 + + + Returns the salt, or null if the salt should be generated as a byte array + of HashLen zeros. + + @return the salt, or null + + + Returns the info field, which may be empty (null is converted to empty). + + @return the info field, never null + + + parameters for using an integrated cipher in stream mode. + + + @param derivation the derivation parameter for the KDF function. + @param encoding the encoding parameter for the KDF function. + @param macKeySize the size of the MAC key (in bits). + + + @param derivation the derivation parameter for the KDF function. + @param encoding the encoding parameter for the KDF function. + @param macKeySize the size of the MAC key (in bits). + @param cipherKeySize the size of the associated Cipher key (in bits). + + + parameters for Key derivation functions for ISO-18033 + + + + Base constructor - suffix fixed input data only. + + the KDF seed + fixed input data to follow counter. + length of the counter in bits + + + + Base constructor - prefix and suffix fixed input data. + + the KDF seed + fixed input data to precede counter + fixed input data to follow counter. + length of the counter in bits. + + + parameters for Key derivation functions for IEEE P1363a + + + Parameters for mask derivation functions. + + + Parameters for NaccacheStern public private key generation. For details on + this cipher, please see + + http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf + + + Parameters for generating a NaccacheStern KeyPair. + + @param random + The source of randomness + @param strength + The desired strength of the Key in Bits + @param certainty + the probability that the generated primes are not really prime + as integer: 2^(-certainty) is then the probability + @param countSmallPrimes + How many small key factors are desired + + + * Parameters for a NaccacheStern KeyPair. + * + * @param random + * The source of randomness + * @param strength + * The desired strength of the Key in Bits + * @param certainty + * the probability that the generated primes are not really prime + * as integer: 2^(-certainty) is then the probability + * @param cntSmallPrimes + * How many small key factors are desired + * @param debug + * Ignored + + + @return Returns the certainty. + + + @return Returns the countSmallPrimes. + + + Public key parameters for NaccacheStern cipher. For details on this cipher, + please see + + http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf + + + @param privateKey + + + @return Returns the g. + + + @return Returns the lowerSigmaBound. + + + @return Returns the n. + + + Private key parameters for NaccacheStern cipher. For details on this cipher, + please see + + http://www.gemplus.com/smart/rd/publications/pdf/NS98pkcs.pdf + + + Constructs a NaccacheSternPrivateKey + + @param g + the public enryption parameter g + @param n + the public modulus n = p*q + @param lowerSigmaBound + the public lower sigma bound up to which data can be encrypted + @param smallPrimes + the small primes, of which sigma is constructed in the right + order + @param phi_n + the private modulus phi(n) = (p-1)(q-1) + + + Cipher parameters with a fixed salt value associated with them. + + + + Parameters for the Skein hash function - a series of byte[] strings identified by integer tags. + + + Parameterised Skein can be used for: +
    +
  • MAC generation, by providing a key.
  • +
  • Randomised hashing, by providing a nonce.
  • +
  • A hash function for digital signatures, associating a + public key with the message digest.
  • +
  • A key derivation function, by providing a + key identifier.
  • +
  • Personalised hashing, by providing a + recommended format or + arbitrary personalisation string.
  • +
+
+ + + +
+ + + The parameter type for a secret key, supporting MAC or KDF functions: 0 + + + + + The parameter type for the Skein configuration block: 4 + + + + + The parameter type for a personalisation string: 8 + + + + + The parameter type for a public key: 12 + + + + + The parameter type for a key identifier string: 16 + + + + + The parameter type for a nonce: 20 + + + + + The parameter type for the message: 48 + + + + + The parameter type for the output transformation: 63 + + + + + Obtains a map of type (int) to value (byte[]) for the parameters tracked in this object. + + + + + Obtains the value of the key parameter, or null if not + set. + + The key. + + + + Obtains the value of the personalisation parameter, or + null if not set. + + + + + Obtains the value of the public key parameter, or + null if not set. + + + + + Obtains the value of the key identifier parameter, or + null if not set. + + + + + Obtains the value of the nonce parameter, or null if + not set. + + + + + A builder for . + + + + + Sets a parameters to apply to the Skein hash function. + + + Parameter types must be in the range 0,5..62, and cannot use the value 48 + (reserved for message body). +

+ Parameters with type < 48 are processed before + the message content, parameters with type > 48 + are processed after the message and prior to output. + + the type of the parameter, in the range 5..62. + the byte sequence of the parameter. + + +

+ Sets the parameter. + +
+ + + Sets the parameter. + + + + + Implements the recommended personalisation format for Skein defined in Section 4.11 of + the Skein 1.3 specification. + + + The format is YYYYMMDD email@address distinguisher, encoded to a byte + sequence using UTF-8 encoding. + + the date the personalised application of the Skein was defined. + the email address of the creation of the personalised application. + an arbitrary personalisation string distinguishing the application. + + + + Sets the parameter. + + + + + Sets the parameter. + + + + + Sets the parameter. + + + + + Constructs a new instance with the parameters provided to this + builder. + + + + Private parameters for an SM2 key exchange. + The ephemeralPrivateKey is used to calculate the random point used in the algorithm. + + + Public parameters for an SM2 key exchange. + In this case the ephemeralPublicKey provides the random point used in the algorithm. + + + + Parameters for tweakable block ciphers. + + + + + Gets the key. + + the key to use, or null to use the current key. + + + + Gets the tweak value. + + The tweak to use, or null to use the current tweak. + + + super class for all Password Based Encyrption (Pbe) parameter generator classes. + + + base constructor. + + + initialise the Pbe generator. + + @param password the password converted into bytes (see below). + @param salt the salt to be mixed with the password. + @param iterationCount the number of iterations the "mixing" function + is to be applied for. + + + return the password byte array. + + @return the password byte array. + + + return the salt byte array. + + @return the salt byte array. + + + return the iteration count. + + @return the iteration count. + + + Generate derived parameters for a key of length keySize. + + @param keySize the length, in bits, of the key required. + @return a parameters object representing a key. + + + Generate derived parameters for a key of length keySize, and + an initialisation vector (IV) of length ivSize. + + @param keySize the length, in bits, of the key required. + @param ivSize the length, in bits, of the iv required. + @return a parameters object representing a key and an IV. + + + Generate derived parameters for a key of length keySize, specifically + for use with a MAC. + + @param keySize the length, in bits, of the key required. + @return a parameters object representing a key. + + + converts a password to a byte array according to the scheme in + Pkcs5 (ascii, no padding) + + @param password a character array representing the password. + @return a byte array representing the password. + + + converts a password to a byte array according to the scheme in + PKCS5 (UTF-8, no padding) + + @param password a character array representing the password. + @return a byte array representing the password. + + + converts a password to a byte array according to the scheme in + Pkcs12 (unicode, big endian, 2 zero pad bytes at the end). + + @param password a character array representing the password. + @return a byte array representing the password. + + + An EntropySourceProvider where entropy generation is based on a SecureRandom output using SecureRandom.generateSeed(). + + + Create a entropy source provider based on the passed in SecureRandom. + + @param secureRandom the SecureRandom to base EntropySource construction on. + @param isPredictionResistant boolean indicating if the SecureRandom is based on prediction resistant entropy or not (true if it is). + + + Return an entropy source that will create bitsRequired bits of entropy on + each invocation of getEntropy(). + + @param bitsRequired size (in bits) of entropy to be created by the provided source. + @return an EntropySource that generates bitsRequired bits of entropy on each call to its getEntropy() method. + + + + Uses RandomNumberGenerator.Create() to get randomness generator + + + + Random generation based on the digest with counter. Calling AddSeedMaterial will + always increase the entropy of the hash. +

+ Internal access to the digest is synchronized so a single one of these can be shared. +

+
+ + A SP800-90A CTR DRBG. + + + Construct a SP800-90A CTR DRBG. +

+ Minimum entropy requirement is the security strength requested. +

+ @param engine underlying block cipher to use to support DRBG + @param keySizeInBits size of the key to use with the block cipher. + @param securityStrength security strength required (in bits) + @param entropySource source of entropy to use for seeding/reseeding. + @param personalizationString personalization string to distinguish this DRBG (may be null). + @param nonce nonce to further distinguish this DRBG (may be null). +
+ + Return the block size (in bits) of the DRBG. + + @return the number of bits produced on each internal round of the DRBG. + + + Populate a passed in array with random data. + + @param output output array for generated bits. + @param additionalInput additional input to be added to the DRBG in this step. + @param predictionResistant true if a reseed should be forced, false otherwise. + + @return number of bits generated, -1 if a reseed required. + + + Reseed the DRBG. + + @param additionalInput additional input to be added to the DRBG in this step. + + + Pad out a key for TDEA, setting odd parity for each byte. + + @param keyMaster + @param keyOff + @param tmp + @param tmpOff + + + Used by both Dual EC and Hash. + + + A SP800-90A Hash DRBG. + + + Construct a SP800-90A Hash DRBG. +

+ Minimum entropy requirement is the security strength requested. +

+ @param digest source digest to use for DRB stream. + @param securityStrength security strength required (in bits) + @param entropySource source of entropy to use for seeding/reseeding. + @param personalizationString personalization string to distinguish this DRBG (may be null). + @param nonce nonce to further distinguish this DRBG (may be null). +
+ + Return the block size (in bits) of the DRBG. + + @return the number of bits produced on each internal round of the DRBG. + + + Populate a passed in array with random data. + + @param output output array for generated bits. + @param additionalInput additional input to be added to the DRBG in this step. + @param predictionResistant true if a reseed should be forced, false otherwise. + + @return number of bits generated, -1 if a reseed required. + + + Reseed the DRBG. + + @param additionalInput additional input to be added to the DRBG in this step. + + + A SP800-90A HMAC DRBG. + + + Construct a SP800-90A Hash DRBG. +

+ Minimum entropy requirement is the security strength requested. +

+ @param hMac Hash MAC to base the DRBG on. + @param securityStrength security strength required (in bits) + @param entropySource source of entropy to use for seeding/reseeding. + @param personalizationString personalization string to distinguish this DRBG (may be null). + @param nonce nonce to further distinguish this DRBG (may be null). +
+ + Return the block size (in bits) of the DRBG. + + @return the number of bits produced on each round of the DRBG. + + + Populate a passed in array with random data. + + @param output output array for generated bits. + @param additionalInput additional input to be added to the DRBG in this step. + @param predictionResistant true if a reseed should be forced, false otherwise. + + @return number of bits generated, -1 if a reseed required. + + + Reseed the DRBG. + + @param additionalInput additional input to be added to the DRBG in this step. + + + Interface to SP800-90A deterministic random bit generators. + + + Return the block size of the DRBG. + + @return the block size (in bits) produced by each round of the DRBG. + + + Populate a passed in array with random data. + + @param output output array for generated bits. + @param additionalInput additional input to be added to the DRBG in this step. + @param predictionResistant true if a reseed should be forced, false otherwise. + + @return number of bits generated, -1 if a reseed required. + + + Reseed the DRBG. + + @param additionalInput additional input to be added to the DRBG in this step. + + + Generate numBytes worth of entropy from the passed in entropy source. + + @param entropySource the entropy source to request the data from. + @param numBytes the number of bytes of entropy requested. + @return a byte array populated with the random data. + + + Generic interface for objects generating random bytes. + + + Add more seed material to the generator. + A byte array to be mixed into the generator's state. + + + Add more seed material to the generator. + A long value to be mixed into the generator's state. + + + Fill byte array with random values. + Array to be filled. + + + Fill byte array with random values. + Array to receive bytes. + Index to start filling at. + Length of segment to fill. + + + + Takes bytes generated by an underling RandomGenerator and reverses the order in + each small window (of configurable size). +

+ Access to internals is synchronized so a single one of these can be shared. +

+
+
+ + Add more seed material to the generator. + A byte array to be mixed into the generator's state. + + + Add more seed material to the generator. + A long value to be mixed into the generator's state. + + + Fill byte array with random values. + Array to be filled. + + + Fill byte array with random values. + Array to receive bytes. + Index to start filling at. + Length of segment to fill. + + + Force a reseed of the DRBG. + optional additional input + + + Builder class for making SecureRandom objects based on SP 800-90A Deterministic Random Bit Generators (DRBG). + + + Basic constructor, creates a builder using an EntropySourceProvider based on the default SecureRandom with + predictionResistant set to false. +

+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if + the default SecureRandom does for its generateSeed() call. +

+
+ + Construct a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value + for prediction resistance. +

+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if + the passed in SecureRandom does for its generateSeed() call. +

+ @param entropySource + @param predictionResistant +
+ + Create a builder which makes creates the SecureRandom objects from a specified entropy source provider. +

+ Note: If this constructor is used any calls to setSeed() in the resulting SecureRandom will be ignored. +

+ @param entropySourceProvider a provider of EntropySource objects. +
+ + Set the personalization string for DRBG SecureRandoms created by this builder + @param personalizationString the personalisation string for the underlying DRBG. + @return the current builder. + + + Set the security strength required for DRBGs used in building SecureRandom objects. + + @param securityStrength the security strength (in bits) + @return the current builder. + + + Set the amount of entropy bits required for seeding and reseeding DRBGs used in building SecureRandom objects. + + @param entropyBitsRequired the number of bits of entropy to be requested from the entropy source on each seed/reseed. + @return the current builder. + + + Build a SecureRandom based on a SP 800-90A Hash DRBG. + + @param digest digest algorithm to use in the DRBG underneath the SecureRandom. + @param nonce nonce value to use in DRBG construction. + @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes. + @return a SecureRandom supported by a Hash DRBG. + + + Build a SecureRandom based on a SP 800-90A CTR DRBG. + + @param cipher the block cipher to base the DRBG on. + @param keySizeInBits key size in bits to be used with the block cipher. + @param nonce nonce value to use in DRBG construction. + @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes. + @return a SecureRandom supported by a CTR DRBG. + + + Build a SecureRandom based on a SP 800-90A HMAC DRBG. + + @param hMac HMAC algorithm to use in the DRBG underneath the SecureRandom. + @param nonce nonce value to use in DRBG construction. + @param predictionResistant specify whether the underlying DRBG in the resulting SecureRandom should reseed on each request for bytes. + @return a SecureRandom supported by a HMAC DRBG. + + + A thread based seed generator - one source of randomness. +

+ Based on an idea from Marcus Lippert. +

+
+ + Generate seed bytes. Set fast to false for best quality. +

+ If fast is set to true, the code should be round about 8 times faster when + generating a long sequence of random bytes. 20 bytes of random values using + the fast mode take less than half a second on a Nokia e70. If fast is set to false, + it takes round about 2500 ms. +

+ @param numBytes the number of bytes to generate + @param fast true if fast mode should be used +
+ + + Permutation generated by code: + + // First 1850 fractional digit of Pi number. + byte[] key = new BigInteger("14159265358979323846...5068006422512520511").ToByteArray(); + s = 0; + P = new byte[256]; + for (int i = 0; i < 256; i++) + { + P[i] = (byte) i; + } + for (int m = 0; m < 768; m++) + { + s = P[(s + P[m & 0xff] + key[m % key.length]) & 0xff]; + byte temp = P[m & 0xff]; + P[m & 0xff] = P[s & 0xff]; + P[s & 0xff] = temp; + } + + + + Value generated in the same way as P. + + + + @param engine + @param entropySource + + + Populate a passed in array with random data. + + @param output output array for generated bits. + @param predictionResistant true if a reseed should be forced, false otherwise. + + @return number of bits generated, -1 if a reseed required. + + + Reseed the RNG. + + + Basic constructor, creates a builder using an EntropySourceProvider based on the default SecureRandom with + predictionResistant set to false. +

+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if + the default SecureRandom does for its generateSeed() call. +

+
+ + Construct a builder with an EntropySourceProvider based on the passed in SecureRandom and the passed in value + for prediction resistance. +

+ Any SecureRandom created from a builder constructed like this will make use of input passed to SecureRandom.setSeed() if + the passed in SecureRandom does for its generateSeed() call. +

+ @param entropySource + @param predictionResistant +
+ + Create a builder which makes creates the SecureRandom objects from a specified entropy source provider. +

+ Note: If this constructor is used any calls to setSeed() in the resulting SecureRandom will be ignored. +

+ @param entropySourceProvider a provider of EntropySource objects. +
+ + Construct a X9.31 secure random generator using the passed in engine and key. If predictionResistant is true the + generator will be reseeded on each request. + + @param engine a block cipher to use as the operator. + @param key the block cipher key to initialise engine with. + @param predictionResistant true if engine to be reseeded on each use, false otherwise. + @return a SecureRandom. + + + update the internal digest with the byte b + + + update the internal digest with the byte array in + + + Generate a signature for the message we've been loaded with using + the key we were initialised with. + + + true if the internal state represents the signature described in the passed in array. + + + Reset the internal state + + + The Digital Signature Algorithm - as described in "Handbook of Applied + Cryptography", pages 452 - 453. + + + Default configuration, random K values. + + + Configuration with an alternate, possibly deterministic calculator of K. + + @param kCalculator a K value calculator. + + + Generate a signature for the given message using the key we were + initialised with. For conventional DSA the message should be a SHA-1 + hash of the message of interest. + + @param message the message that will be verified later. + + + return true if the value r and s represent a DSA signature for + the passed in message for standard DSA the message should be a + SHA-1 hash of the real message to be verified. + + + EC-DSA as described in X9.62 + + + Default configuration, random K values. + + + Configuration with an alternate, possibly deterministic calculator of K. + + @param kCalculator a K value calculator. + + + Generate a signature for the given message using the key we were + initialised with. For conventional DSA the message should be a SHA-1 + hash of the message of interest. + + @param message the message that will be verified later. + + + return true if the value r and s represent a DSA signature for + the passed in message (for standard DSA the message should be + a SHA-1 hash of the real message to be verified). + + + GOST R 34.10-2001 Signature Algorithm + + + generate a signature for the given message using the key we were + initialised with. For conventional GOST3410 the message should be a GOST3411 + hash of the message of interest. + + @param message the message that will be verified later. + + + return true if the value r and s represent a GOST3410 signature for + the passed in message (for standard GOST3410 the message should be + a GOST3411 hash of the real message to be verified). + + + EC-NR as described in IEEE 1363-2000 + + + generate a signature for the given message using the key we were + initialised with. Generally, the order of the curve should be at + least as long as the hash of the message of interest, and with + ECNR it *must* be at least as long. + + @param digest the digest to be signed. + @exception DataLengthException if the digest is longer than the key allows + + + return true if the value r and s represent a signature for the + message passed in. Generally, the order of the curve should be at + least as long as the hash of the message of interest, and with + ECNR, it *must* be at least as long. But just in case the signer + applied mod(n) to the longer digest, this implementation will + apply mod(n) during verification. + + @param digest the digest to be verified. + @param r the r value of the signature. + @param s the s value of the signature. + @exception DataLengthException if the digest is longer than the key allows + + + initialise the signer for signing or verification. + + @param forSigning + true if for signing, false otherwise + @param parameters + necessary parameters. + + + update the internal digest with the byte b + + + update the internal digest with the byte array in + + + Generate a signature for the message we've been loaded with using the key + we were initialised with. + + + return true if the internal state represents the signature described in + the passed in array. + + + update the internal digest with the byte b + + + update the internal digest with the byte array in + + + Generate a signature for the message we've been loaded with using + the key we were initialised with. + + + true if the internal state represents the signature described in the passed in array. + + + Reset the internal state + + + Gost R 34.10-94 Signature Algorithm + + + generate a signature for the given message using the key we were + initialised with. For conventional Gost3410 the message should be a Gost3411 + hash of the message of interest. + + @param message the message that will be verified later. + + + return true if the value r and s represent a Gost3410 signature for + the passed in message for standard Gost3410 the message should be a + Gost3411 hash of the real message to be verified. + + + A deterministic K calculator based on the algorithm in section 3.2 of RFC 6979. + + + Base constructor. + + @param digest digest to build the HMAC on. + + + + An interface for different encoding formats for DSA signatures. + + + + Decode the (r, s) pair of a DSA signature. + The order of the group that r, s belong to. + An encoding of the (r, s) pair of a DSA signature. + The (r, s) of a DSA signature, stored in an array of exactly two elements, r followed by s. + + + Encode the (r, s) pair of a DSA signature. + The order of the group that r, s belong to. + The r value of a DSA signature. + The s value of a DSA signature. + An encoding of the DSA signature given by the provided (r, s) pair. + + + Interface define calculators of K values for DSA/ECDSA. + + + Return true if this calculator is deterministic, false otherwise. + + @return true if deterministic, otherwise false. + + + Non-deterministic initialiser. + + @param n the order of the DSA group. + @param random a source of randomness. + + + Deterministic initialiser. + + @param n the order of the DSA group. + @param d the DSA private value. + @param message the message being signed. + + + Return the next valid value of K. + + @return a K value. + + + ISO9796-2 - mechanism using a hash function with recovery (scheme 2 and 3). +

+ Note: the usual length for the salt is the length of the hash + function used in bytes.

+
+
+ + + Return a reference to the recoveredMessage message. + + The full/partial recoveredMessage message. + + + + + Generate a signer with either implicit or explicit trailers for ISO9796-2, scheme 2 or 3. + + base cipher to use for signature creation/verification + digest to use. + length of salt in bytes. + whether or not the trailer is implicit or gives the hash. + + + Constructor for a signer with an explicit digest trailer. + + + cipher to use. + + digest to sign with. + + length of salt in bytes. + + + + Initialise the signer. + true if for signing, false if for verification. + parameters for signature generation/verification. If the + parameters are for generation they should be a ParametersWithRandom, + a ParametersWithSalt, or just an RsaKeyParameters object. If RsaKeyParameters + are passed in a SecureRandom will be created. + + if wrong parameter type or a fixed + salt is passed in which is the wrong length. + + + + compare two byte arrays - constant time. + + + clear possible sensitive data + + + update the internal digest with the byte b + + + update the internal digest with the byte array in + + + reset the internal state + + + Generate a signature for the loaded message using the key we were + initialised with. + + + + return true if the signature represents a ISO9796-2 signature + for the passed in message. + + + + + Return true if the full message was recoveredMessage. + + true on full message recovery, false otherwise, or if not sure. + + + + int to octet string. + int to octet string. + + + long to octet string. + + + mask generator function, as described in Pkcs1v2. + + + ISO9796-2 - mechanism using a hash function with recovery (scheme 1) + + + + Return a reference to the recoveredMessage message. + + The full/partial recoveredMessage message. + + + + + Generate a signer with either implicit or explicit trailers for ISO9796-2. + + base cipher to use for signature creation/verification + digest to use. + whether or not the trailer is implicit or gives the hash. + + + Constructor for a signer with an explicit digest trailer. + + + cipher to use. + + digest to sign with. + + + + compare two byte arrays - constant time. + + + clear possible sensitive data + + + update the internal digest with the byte b + + + update the internal digest with the byte array in + + + reset the internal state + + + Generate a signature for the loaded message using the key we were + initialised with. + + + + return true if the signature represents a ISO9796-2 signature + for the passed in message. + + + + + Return true if the full message was recoveredMessage. + + true on full message recovery, false otherwise. + + + + RSA-PSS as described in Pkcs# 1 v 2.1. +

+ Note: the usual value for the salt length is the number of + bytes in the hash function.

+
+
+ + Basic constructor + the asymmetric cipher to use. + the digest to use. + the length of the salt to use (in bytes). + + + Basic constructor + the asymmetric cipher to use. + the digest to use. + the fixed salt to be used. + + + clear possible sensitive data + + + update the internal digest with the byte b + + + update the internal digest with the byte array in + + + reset the internal state + + + Generate a signature for the message we've been loaded with using + the key we were initialised with. + + + + return true if the internal state represents the signature described + in the passed in array. + + + + int to octet string. + + + mask generator function, as described in Pkcs1v2. + + + + Load oid table. + + + + Initialise the signer for signing or verification. + + @param forSigning true if for signing, false otherwise + @param param necessary parameters. + + + update the internal digest with the byte b + + + update the internal digest with the byte array in + + + Generate a signature for the message we've been loaded with using + the key we were initialised with. + + + return true if the internal state represents the signature described + in the passed in array. + + + The SM2 Digital Signature algorithm. + + + X9.31-1998 - signing using a hash. +

+ The message digest hash, H, is encapsulated to form a byte string as follows +

+
+            EB = 06 || PS || 0xBA || H || TRAILER
+            
+ where PS is a string of bytes all of value 0xBB of length such that |EB|=|n|, and TRAILER is the ISO/IEC 10118 part number† for the digest. The byte string, EB, is converted to an integer value, the message representative, f. +
+ + Generate a signer with either implicit or explicit trailers for X9.31. + + @param cipher base cipher to use for signature creation/verification + @param digest digest to use. + @param implicit whether or not the trailer is implicit or gives the hash. + + + Constructor for a signer with an explicit digest trailer. + + @param cipher cipher to use. + @param digest digest to sign with. + + + clear possible sensitive data + + + update the internal digest with the byte b + + + update the internal digest with the byte array in + + + reset the internal state + + + generate a signature for the loaded message using the key we were + initialised with. + + + return true if the signature represents a ISO9796-2 signature + for the passed in message. + + + + A simple block result object which just carries a byte array. + + + + + Base constructor - a wrapper for the passed in byte array. + + The byte array to be wrapped. + + + + Return the number of bytes in the result + + The length of the result in bytes. + + + + Return the final result of the operation. + + A block of bytes, representing the result of an operation. + + + + Store the final result of the operation by copying it into the destination array. + + The number of bytes copied into destination. + The byte array to copy the result into. + The offset into destination to start copying the result at. + + + a wrapper for block ciphers with a single byte block size, so that they + can be treated like stream ciphers. + + + basic constructor. + + @param cipher the block cipher to be wrapped. + @exception ArgumentException if the cipher has a block size other than + one. + + + initialise the underlying cipher. + + @param forEncryption true if we are setting up for encryption, false otherwise. + @param param the necessary parameters for the underlying cipher to be initialised. + + + return the name of the algorithm we are wrapping. + + @return the name of the algorithm we are wrapping. + + + encrypt/decrypt a single byte returning the result. + + @param in the byte to be processed. + @return the result of processing the input byte. + + + process a block of bytes from in putting the result into out. + + @param in the input byte array. + @param inOff the offset into the in array where the data to be processed starts. + @param len the number of bytes to be processed. + @param out the output buffer the processed bytes go into. + @param outOff the offset into the output byte array the processed data stars at. + @exception DataLengthException if the output buffer is too small. + + + reset the underlying cipher. This leaves it in the same state + it was at after the last init (if there was one). + + + + + + + + + + + + + + + + + + + RFC 5246 7.2 + + + + This message notifies the recipient that the sender will not send any more messages on this + connection. Note that as of TLS 1.1, failure to properly close a connection no longer + requires that a session not be resumed. This is a change from TLS 1.0 ("The session becomes + unresumable if any connection is terminated without proper close_notify messages with level + equal to warning.") to conform with widespread implementation practice. + + + An inappropriate message was received. This alert is always fatal and should never be + observed in communication between proper implementations. + + + This alert is returned if a record is received with an incorrect MAC. This alert also MUST be + returned if an alert is sent because a TLSCiphertext decrypted in an invalid way: either it + wasn't an even multiple of the block length, or its padding values, when checked, weren't + correct. This message is always fatal and should never be observed in communication between + proper implementations (except when messages were corrupted in the network). + + + This alert was used in some earlier versions of TLS, and may have permitted certain attacks + against the CBC mode [CBCATT]. It MUST NOT be sent by compliant implementations. + + + A TLSCiphertext record was received that had a length more than 2^14+2048 bytes, or a record + decrypted to a TLSCompressed record with more than 2^14+1024 bytes. This message is always + fatal and should never be observed in communication between proper implementations (except + when messages were corrupted in the network). + + + The decompression function received improper input (e.g., data that would expand to excessive + length). This message is always fatal and should never be observed in communication between + proper implementations. + + + Reception of a handshake_failure alert message indicates that the sender was unable to + negotiate an acceptable set of security parameters given the options available. This is a + fatal error. + + + This alert was used in SSLv3 but not any version of TLS. It MUST NOT be sent by compliant + implementations. + + + A certificate was corrupt, contained signatures that did not verify correctly, etc. + + + A certificate was of an unsupported type. + + + A certificate was revoked by its signer. + + + A certificate has expired or is not currently valid. + + + Some other (unspecified) issue arose in processing the certificate, rendering it + unacceptable. + + + A field in the handshake was out of range or inconsistent with other fields. This message is + always fatal. + + + A valid certificate chain or partial chain was received, but the certificate was not accepted + because the CA certificate could not be located or couldn't be matched with a known, trusted + CA. This message is always fatal. + + + A valid certificate was received, but when access control was applied, the sender decided not + to proceed with negotiation. This message is always fatal. + + + A message could not be decoded because some field was out of the specified range or the + length of the message was incorrect. This message is always fatal and should never be + observed in communication between proper implementations (except when messages were corrupted + in the network). + + + A handshake cryptographic operation failed, including being unable to correctly verify a + signature or validate a Finished message. This message is always fatal. + + + This alert was used in some earlier versions of TLS. It MUST NOT be sent by compliant + implementations. + + + The protocol version the client has attempted to negotiate is recognized but not supported. + (For example, old protocol versions might be avoided for security reasons.) This message is + always fatal. + + + Returned instead of handshake_failure when a negotiation has failed specifically because the + server requires ciphers more secure than those supported by the client. This message is + always fatal. + + + An internal error unrelated to the peer or the correctness of the protocol (such as a memory + allocation failure) makes it impossible to continue. This message is always fatal. + + + This handshake is being canceled for some reason unrelated to a protocol failure. If the user + cancels an operation after the handshake is complete, just closing the connection by sending + a close_notify is more appropriate. This alert should be followed by a close_notify. This + message is generally a warning. + + + Sent by the client in response to a hello request or by the server in response to a client + hello after initial handshaking. Either of these would normally lead to renegotiation; when + that is not appropriate, the recipient should respond with this alert. At that point, the + original requester can decide whether to proceed with the connection. One case where this + would be appropriate is where a server has spawned a process to satisfy a request; the + process might receive security parameters (key length, authentication, etc.) at startup, and + it might be difficult to communicate changes to these parameters after that point. This + message is always a warning. + + + Sent by clients that receive an extended server hello containing an extension that they did + not put in the corresponding client hello. This message is always fatal. + + + This alert is sent by servers who are unable to retrieve a certificate chain from the URL + supplied by the client (see Section 3.3). This message MAY be fatal - for example if client + authentication is required by the server for the handshake to continue and the server is + unable to retrieve the certificate chain, it may send a fatal alert. + + + This alert is sent by servers that receive a server_name extension request, but do not + recognize the server name. This message MAY be fatal. + + + This alert is sent by clients that receive an invalid certificate status response (see + Section 3.6). This message is always fatal. + + + This alert is sent by servers when a certificate hash does not match a client provided + certificate_hash. This message is always fatal. + + + If the server does not recognize the PSK identity, it MAY respond with an + "unknown_psk_identity" alert message. + + + If TLS_FALLBACK_SCSV appears in ClientHello.cipher_suites and the highest protocol version + supported by the server is higher than the version indicated in ClientHello.client_version, + the server MUST respond with a fatal inappropriate_fallback alert [..]. + + + + RFC 5246 7.2 + + + + RFC 2246 + + Note that the values here are implementation-specific and arbitrary. It is recommended not to + depend on the particular values (e.g. serialization). + + + + + A queue for bytes. +

+ This file could be more optimized. +

+
+
+ + The smallest number which can be written as 2^x which is bigger than i. + + + The initial size for our buffer. + + + The buffer where we store our data. + + + How many bytes at the beginning of the buffer are skipped. + + + How many bytes in the buffer are valid data. + + + Add some data to our buffer. + A byte-array to read data from. + How many bytes to skip at the beginning of the array. + How many bytes to read from the array. + + + The number of bytes which are available in this buffer. + + + Copy some bytes from the beginning of the data to the provided Stream. + The Stream to copy the bytes to. + How many bytes to copy. + If insufficient data is available. + If there is a problem copying the data. + + + Read data from the buffer. + The buffer where the read data will be copied to. + How many bytes to skip at the beginning of buf. + How many bytes to read at all. + How many bytes from our data to skip. + + + Return a MemoryStream over some bytes at the beginning of the data. + How many bytes will be readable. + A MemoryStream over the data. + If insufficient data is available. + + + Remove some bytes from our data from the beginning. + How many bytes to remove. + + + Parsing and encoding of a Certificate struct from RFC 4346. +

+

+             opaque ASN.1Cert<2^24-1>;
+            
+             struct {
+                 ASN.1Cert certificate_list<0..2^24-1>;
+             } Certificate;
+             
+ + @see Org.BouncyCastle.Asn1.X509.X509CertificateStructure +
+ + The certificates. + + + @return an array of {@link org.bouncycastle.asn1.x509.Certificate} representing a certificate + chain. + + + @return true if this certificate chain contains no certificates, or + false otherwise. + + + Encode this {@link Certificate} to a {@link Stream}. + + @param output the {@link Stream} to encode to. + @throws IOException + + + Parse a {@link Certificate} from a {@link Stream}. + + @param input the {@link Stream} to parse from. + @return a {@link Certificate} object. + @throws IOException + + + Parsing and encoding of a CertificateRequest struct from RFC 4346. +

+

+             struct {
+                 ClientCertificateType certificate_types<1..2^8-1>;
+                 DistinguishedName certificate_authorities<3..2^16-1>
+             } CertificateRequest;
+             
+ + @see ClientCertificateType + @see X509Name +
+ + @param certificateTypes see {@link ClientCertificateType} for valid constants. + @param certificateAuthorities an {@link IList} of {@link X509Name}. + + + @return an array of certificate types + @see {@link ClientCertificateType} + + + @return an {@link IList} of {@link SignatureAndHashAlgorithm} (or null before TLS 1.2). + + + @return an {@link IList} of {@link X509Name} + + + Encode this {@link CertificateRequest} to a {@link Stream}. + + @param output the {@link Stream} to encode to. + @throws IOException + + + Parse a {@link CertificateRequest} from a {@link Stream}. + + @param context + the {@link TlsContext} of the current connection. + @param input + the {@link Stream} to parse from. + @return a {@link CertificateRequest} object. + @throws IOException + + + Encode this {@link CertificateStatus} to a {@link Stream}. + + @param output + the {@link Stream} to encode to. + @throws IOException + + + Parse a {@link CertificateStatus} from a {@link Stream}. + + @param input + the {@link Stream} to parse from. + @return a {@link CertificateStatus} object. + @throws IOException + + + Encode this {@link CertificateStatusRequest} to a {@link Stream}. + + @param output + the {@link Stream} to encode to. + @throws IOException + + + Parse a {@link CertificateStatusRequest} from a {@link Stream}. + + @param input + the {@link Stream} to parse from. + @return a {@link CertificateStatusRequest} object. + @throws IOException + + + RFC 6091 + + + @param type + see {@link CertChainType} for valid constants. + @param urlAndHashList + a {@link IList} of {@link UrlAndHash}. + + + @return {@link CertChainType} + + + @return an {@link IList} of {@link UrlAndHash} + + + Encode this {@link CertificateUrl} to a {@link Stream}. + + @param output the {@link Stream} to encode to. + @throws IOException + + + Parse a {@link CertificateUrl} from a {@link Stream}. + + @param context + the {@link TlsContext} of the current connection. + @param input + the {@link Stream} to parse from. + @return a {@link CertificateUrl} object. + @throws IOException + + + draft-ietf-tls-chacha20-poly1305-04 + + + + + + + + + + + + + + + + RFC 2246 A.5 + + + + RFC 2246 + + Note that the values here are implementation-specific and arbitrary. It is recommended not to + depend on the particular values (e.g. serialization). + + + + A combined hash, which implements md5(m) || sha1(m). + + + @see org.bouncycastle.crypto.Digest#update(byte[], int, int) + + + @see org.bouncycastle.crypto.Digest#doFinal(byte[], int) + + + @see org.bouncycastle.crypto.Digest#reset() + + + + RFC 2246 6.1 + + + + RFC 2246 + + Note that the values here are implementation-specific and arbitrary. It is recommended not to + depend on the particular values (e.g. serialization). + + + + RFC 2246 6.2.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Accept various standard DH groups with 'P' at least DefaultMinimumPrimeBits bits. + + + Accept various standard DH groups with 'P' at least the specified number of bits. + + + Accept a custom set of group parameters, subject to a minimum bitlength for 'P'. + An IList of acceptable DHParameters. + The minimum acceptable bitlength of the 'P' parameter. + + + + + + + + + Accept only the group parameters specified in RFC 5054 Appendix A. + + + Specify a custom set of acceptable group parameters. + + @param groups a {@link Vector} of acceptable {@link SRP6GroupParameters} + + + Buffers input until the hash algorithm is determined. + + + @return a {@link SignatureAndHashAlgorithm} (or null before TLS 1.2). + + + Encode this {@link DigitallySigned} to a {@link Stream}. + + @param output + the {@link Stream} to encode to. + @throws IOException + + + Parse a {@link DigitallySigned} from a {@link Stream}. + + @param context + the {@link TlsContext} of the current connection. + @param input + the {@link Stream} to parse from. + @return a {@link DigitallySigned} object. + @throws IOException + + + + + + + + + + + + + + + + + + + + + + + + + + + Check that there are no "extra" messages left in the current inbound flight + + + RFC 4347 4.1.2.5 Anti-replay +

+ Support fast rejection of duplicate records by maintaining a sliding receive window + + + Check whether a received record with the given sequence number should be rejected as a duplicate. + + @param seq the 48-bit DTLSPlainText.sequence_number field of a received record. + @return true if the record should be discarded without further processing. + + + Report that a received record with the given sequence number passed authentication checks. + + @param seq the 48-bit DTLSPlainText.sequence_number field of an authenticated record. + + + When a new epoch begins, sequence numbers begin again at 0 + + +

RFC 4492 5.4. (Errata ID: 2389) +
+ + + RFC 4492 5.4 + + + + Indicates the elliptic curve domain parameters are conveyed verbosely, and the + underlying finite field is a prime field. + + + Indicates the elliptic curve domain parameters are conveyed verbosely, and the + underlying finite field is a characteristic-2 field. + + + Indicates that a named curve is used. This option SHOULD be used when applicable. + + + + RFC 4492 5.1.2 + + + + RFC 2246 + + Note that the values here are implementation-specific and arbitrary. It is recommended not to + depend on the particular values (e.g. serialization). + + + + RFC 5705 + + + RFC 5246 7.4.1.4.1 + + + Encode this {@link HeartbeatExtension} to a {@link Stream}. + + @param output + the {@link Stream} to encode to. + @throws IOException + + + Parse a {@link HeartbeatExtension} from a {@link Stream}. + + @param input + the {@link Stream} to parse from. + @return a {@link HeartbeatExtension} object. + @throws IOException + + + Encode this {@link HeartbeatMessage} to a {@link Stream}. + + @param output + the {@link Stream} to encode to. + @throws IOException + + + Parse a {@link HeartbeatMessage} from a {@link Stream}. + + @param input + the {@link Stream} to parse from. + @return a {@link HeartbeatMessage} object. + @throws IOException + + + RFC 2246 + + Note that the values here are implementation-specific and arbitrary. It is recommended not to + depend on the particular values (e.g. serialization). + + + + RFC 2246 + + Note that the values here are implementation-specific and arbitrary. It is recommended not to + depend on the particular values (e.g. serialization). + + + + + RFC 4492 5.1.1 + The named curves defined here are those specified in SEC 2 [13]. Note that many of + these curves are also recommended in ANSI X9.62 [7] and FIPS 186-2 [11]. Values 0xFE00 + through 0xFEFF are reserved for private use. Values 0xFF01 and 0xFF02 indicate that the + client supports arbitrary prime and characteristic-2 curves, respectively (the curve + parameters must be encoded explicitly in ECParameters). + + + + Encode this {@link NewSessionTicket} to a {@link Stream}. + + @param output the {@link Stream} to encode to. + @throws IOException + + + Parse a {@link NewSessionTicket} from a {@link Stream}. + + @param input the {@link Stream} to parse from. + @return a {@link NewSessionTicket} object. + @throws IOException + + + RFC 3546 3.6 + + + @param responderIDList + an {@link IList} of {@link ResponderID}, specifying the list of trusted OCSP + responders. An empty list has the special meaning that the responders are + implicitly known to the server - e.g., by prior arrangement. + @param requestExtensions + OCSP request extensions. A null value means that there are no extensions. + + + @return an {@link IList} of {@link ResponderID} + + + @return OCSP request extensions + + + Encode this {@link OcspStatusRequest} to a {@link Stream}. + + @param output + the {@link Stream} to encode to. + @throws IOException + + + Parse a {@link OcspStatusRequest} from a {@link Stream}. + + @param input + the {@link Stream} to parse from. + @return an {@link OcspStatusRequest} object. + @throws IOException + + + RFC 5246 + + Note that the values here are implementation-specific and arbitrary. It is recommended not to + depend on the particular values (e.g. serialization). + + + + + + + An implementation of the TLS 1.0/1.1/1.2 record layer, allowing downgrade to SSLv3. + + + RFC 5246 E.1. "Earlier versions of the TLS specification were not fully clear on what the + record layer version number (TLSPlaintext.version) should contain when sending ClientHello + (i.e., before it is known which version of the protocol will be employed). Thus, TLS servers + compliant with this specification MUST accept any value {03,XX} as the record layer version + number for ClientHello." + + + @return {@link ConnectionEnd} + + + @return {@link CipherSuite} + + + @return {@link CompressionMethod} + + + @return {@link PRFAlgorithm} + + + Encode this {@link ServerName} to a {@link Stream}. + + @param output + the {@link Stream} to encode to. + @throws IOException + + + Parse a {@link ServerName} from a {@link Stream}. + + @param input + the {@link Stream} to parse from. + @return a {@link ServerName} object. + @throws IOException + + + @param serverNameList an {@link IList} of {@link ServerName}. + + + @return an {@link IList} of {@link ServerName}. + + + Encode this {@link ServerNameList} to a {@link Stream}. + + @param output + the {@link Stream} to encode to. + @throws IOException + + + Parse a {@link ServerNameList} from a {@link Stream}. + + @param input + the {@link Stream} to parse from. + @return a {@link ServerNameList} object. + @throws IOException + + + Encode this {@link ServerSRPParams} to an {@link OutputStream}. + + @param output + the {@link OutputStream} to encode to. + @throws IOException + + + Parse a {@link ServerSRPParams} from an {@link InputStream}. + + @param input + the {@link InputStream} to parse from. + @return a {@link ServerSRPParams} object. + @throws IOException + + + RFC 5246 7.4.1.4.1 (in RFC 2246, there were no specific values assigned) + + + RFC 5246 7.4.1.4.1 + + + @param hash {@link HashAlgorithm} + @param signature {@link SignatureAlgorithm} + + + @return {@link HashAlgorithm} + + + @return {@link SignatureAlgorithm} + + + Encode this {@link SignatureAndHashAlgorithm} to a {@link Stream}. + + @param output the {@link Stream} to encode to. + @throws IOException + + + Parse a {@link SignatureAndHashAlgorithm} from a {@link Stream}. + + @param input the {@link Stream} to parse from. + @return a {@link SignatureAndHashAlgorithm} object. + @throws IOException + + + An implementation of {@link TlsSRPIdentityManager} that simulates the existence of "unknown" identities + to obscure the fact that there is no verifier for them. + + + Create a {@link SimulatedTlsSRPIdentityManager} that implements the algorithm from RFC 5054 2.5.1.3 + + @param group the {@link SRP6GroupParameters} defining the group that SRP is operating in + @param seedKey the secret "seed key" referred to in RFC 5054 2.5.1.3 + @return an instance of {@link SimulatedTlsSRPIdentityManager} + + + HMAC implementation based on original internet draft for HMAC (RFC 2104) + + The difference is that padding is concatentated versus XORed with the key + + H(K + opad, H(K + ipad, text)) + + + Base constructor for one of the standard digest algorithms that the byteLength of + the algorithm is know for. Behaviour is undefined for digests other than MD5 or SHA1. + + @param digest the digest. + + + Reset the mac generator. + + + RFC 4680 + + + + + + + + + + + + + + + + + + + + + + Called by the protocol handler to report the server certificate. + + + This method is responsible for certificate verification and validation + + The server received + + + + + Return client credentials in response to server's certificate request + + + A containing server certificate request details + + + A to be used for client authentication + (or null for no client authentication) + + + + + + A generic TLS 1.0-1.2 / SSLv3 block cipher. This can be used for AES or 3DES for example. + + + + + + + + + + + + + + + + + + + + Called at the start of a new TLS session, before any other methods. + + + A + + + + Return the session this client wants to resume, if any. + Note that the peer's certificate chain for the session (if any) may need to be periodically revalidated. + + A representing the resumable session to be used for this connection, + or null to use a new session. + + + + + Return the to use for the TLSPlaintext.version field prior to + receiving the server version. NOTE: This method is not called for DTLS. + + + See RFC 5246 E.1.: "TLS clients that wish to negotiate with older servers MAY send any value + {03,XX} as the record layer version number. Typical values would be {03,00}, the lowest + version number supported by the client, and the value of ClientHello.client_version. No + single value will guarantee interoperability with all old servers, but this is a complex + topic beyond the scope of this document." + + The to use. + + + + Get the list of cipher suites that this client supports. + + + An array of values, each specifying a supported cipher suite. + + + + + Get the list of compression methods that this client supports. + + + An array of values, each specifying a supported compression method. + + + + + Get the (optional) table of client extensions to be included in (extended) client hello. + + + A (Int32 -> byte[]). May be null. + + + + + + + + + Notifies the client of the session_id sent in the ServerHello. + + An array of + + + + Report the cipher suite that was selected by the server. + + + The protocol handler validates this value against the offered cipher suites + + + + A + + + + + Report the compression method that was selected by the server. + + + The protocol handler validates this value against the offered compression methods + + + + A + + + + + Report the extensions from an extended server hello. + + + Will only be called if we returned a non-null result from . + + + A (Int32 -> byte[]) + + + + A list of + + + + + Return an implementation of to negotiate the key exchange + part of the protocol. + + + A + + + + + + Return an implementation of to handle authentication + part of the protocol. + + + + + A list of + + + + RFC 5077 3.3. NewSessionTicket Handshake Message + + This method will be called (only) when a NewSessionTicket handshake message is received. The + ticket is opaque to the client and clients MUST NOT examine the ticket under the assumption + that it complies with e.g. RFC 5077 4. Recommended Ticket Construction. + + The ticket + + + + Constructor for blocking mode. + @param stream The bi-directional stream of data to/from the server + @param secureRandom Random number generator for various cryptographic functions + + + Constructor for blocking mode. + @param input The stream of data from the server + @param output The stream of data to the server + @param secureRandom Random number generator for various cryptographic functions + + + Constructor for non-blocking mode.
+
+ When data is received, use {@link #offerInput(java.nio.ByteBuffer)} to + provide the received ciphertext, then use + {@link #readInput(byte[], int, int)} to read the corresponding cleartext.
+
+ Similarly, when data needs to be sent, use + {@link #offerOutput(byte[], int, int)} to provide the cleartext, then use + {@link #readOutput(byte[], int, int)} to get the corresponding + ciphertext. + + @param secureRandom + Random number generator for various cryptographic functions +
+ + Initiates a TLS handshake in the role of client.
+
+ In blocking mode, this will not return until the handshake is complete. + In non-blocking mode, use {@link TlsPeer#NotifyHandshakeComplete()} to + receive a callback when the handshake is complete. + + @param tlsClient The {@link TlsClient} to use for the handshake. + @throws IOException If in blocking mode and handshake was not successful. +
+ + + + + Used to get the resumable session, if any, used by this connection. Only available after the + handshake has successfully completed. + + @return A {@link TlsSession} representing the resumable session used by this connection, or + null if no resumable session available. + @see TlsPeer#NotifyHandshakeComplete() + + + Export keying material according to RFC 5705: "Keying Material Exporters for TLS". + + @param asciiLabel indicates which application will use the exported keys. + @param context_value allows the application using the exporter to mix its own data with the TLS PRF for + the exporter output. + @param length the number of bytes to generate + @return a pseudorandom bit string of 'length' bytes generated from the master_secret. + + + (D)TLS DH key exchange. + + + An interface for verifying that Diffie-Hellman parameters are acceptable. + + + Verify that the given DHParameters are acceptable. + The DHParameters to verify. + true if (and only if) the specified parameters are acceptable. + + + (D)TLS ECDHE key exchange (see RFC 4492). + + + (D)TLS ECDH key exchange (see RFC 4492). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A generic interface for key exchange implementations in (D)TLS. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A generic TLS MAC implementation, acting as an HMAC based on some underlying Digest. + + + + Generate a new instance of an TlsMac. + + @param context the TLS client context + @param digest The digest to use. + @param key A byte-array where the key for this MAC is located. + @param keyOff The number of bytes to skip, before the key starts in the buffer. + @param keyLen The length of the key. + + + @return the MAC write secret + + + @return The output length of this MAC. + + + Calculate the MAC for some given data. + + @param type The message type of the message. + @param message A byte-buffer containing the message. + @param offset The number of bytes to skip, before the message starts. + @param length The length of the message. + @return A new byte-buffer containing the MAC value. + + + + This exception will be thrown(only) when the connection is closed by the peer without sending a + close_notify warning alert. + + + If this happens, the TLS protocol cannot rule out truncation of the connection data (potentially + malicious). It may be possible to check for truncation via some property of a higher level protocol + built upon TLS, e.g.the Content-Length header for HTTPS. + + + + + A NULL CipherSuite, with optional MAC. + + + + + + + + + + + + + + + + + Specify the timeout, in milliseconds, to use for the complete handshake process. + + + Negative values are not allowed. A timeout of zero means an infinite timeout (i.e. the + handshake will never time out). NOTE: Currently only respected by DTLS protocols. + + + + + This implementation supports RFC 7627 and will always negotiate the extended_master_secret + extension where possible. + + + When connecting to a peer that does not offer/accept this extension, it is recommended to + abort the handshake. This option is provided for interoperability with legacy peers, + although some TLS features will be disabled in that case (see RFC 7627 5.4). + + + true if the handshake should be aborted when the peer does not negotiate the + extended_master_secret extension, or false to support legacy interoperability. + + + + + draft-mathewson-no-gmtunixtime-00 2. "If existing users of a TLS implementation may rely on + gmt_unix_time containing the current time, we recommend that implementors MAY provide the + ability to set gmt_unix_time as an option only, off by default." + + + true if the current time should be used in the gmt_unix_time field of + Random, or false if gmt_unix_time should contain a cryptographically + random value. + + + + + Report whether the server supports secure renegotiation + + + The protocol handler automatically processes the relevant extensions + + + A , true if the server supports secure renegotiation + + + + + + Return an implementation of to handle record compression. + + A + + + + + Return an implementation of to use for encryption/decryption. + + A + + + + This method will be called when an alert is raised by the protocol. + + + A human-readable message explaining what caused this alert. May be null. + The Exception that caused this alert to be raised. May be null. + + + This method will be called when an alert is received from the remote peer. + + + + + Notifies the peer that the handshake has been successfully completed. + + + + This method is called, when a change cipher spec message is received. + + @throws IOException If the message has an invalid content or the handshake is not in the correct + state. + + + Read data from the network. The method will return immediately, if there is still some data + left in the buffer, or block until some application data has been read from the network. + + @param buf The buffer where the data will be copied to. + @param offset The position where the data will be placed in the buffer. + @param len The maximum number of bytes to read. + @return The number of bytes read. + @throws IOException If something goes wrong during reading data. + + + Send some application data to the remote system. +

+ The method will handle fragmentation internally. + + @param buf The buffer with the data. + @param offset The position in the buffer where the data is placed. + @param len The length of the data. + @throws IOException If something goes wrong during sending. + + +

The secure bidirectional stream for this connection + Only allowed in blocking mode. +
+ + Should be called in non-blocking mode when the input data reaches EOF. + + + Equivalent to OfferInput(input, 0, input.length) + @see TlsProtocol#OfferInput(byte[], int, int) + @param input The input buffer to offer + @throws IOException If an error occurs while decrypting or processing a record + + + Offer input from an arbitrary source. Only allowed in non-blocking mode.
+
+ This method will decrypt and process all records that are fully available. + If only part of a record is available, the buffer will be retained until the + remainder of the record is offered.
+
+ If any records containing application data were processed, the decrypted data + can be obtained using {@link #readInput(byte[], int, int)}. If any records + containing protocol data were processed, a response may have been generated. + You should always check to see if there is any available output after calling + this method by calling {@link #getAvailableOutputBytes()}. + @param input The input buffer to offer + @param inputOff The offset within the input buffer that input begins + @param inputLen The number of bytes of input being offered + @throws IOException If an error occurs while decrypting or processing a record +
+ + Gets the amount of received application data. A call to {@link #readInput(byte[], int, int)} + is guaranteed to be able to return at least this much data.
+
+ Only allowed in non-blocking mode. + @return The number of bytes of available application data +
+ + Retrieves received application data. Use {@link #getAvailableInputBytes()} to check + how much application data is currently available. This method functions similarly to + {@link InputStream#read(byte[], int, int)}, except that it never blocks. If no data + is available, nothing will be copied and zero will be returned.
+
+ Only allowed in non-blocking mode. + @param buffer The buffer to hold the application data + @param offset The start offset in the buffer at which the data is written + @param length The maximum number of bytes to read + @return The total number of bytes copied to the buffer. May be less than the + length specified if the length was greater than the amount of available data. +
+ + Offer output from an arbitrary source. Only allowed in non-blocking mode.
+
+ After this method returns, the specified section of the buffer will have been + processed. Use {@link #readOutput(byte[], int, int)} to get the bytes to + transmit to the other peer.
+
+ This method must not be called until after the handshake is complete! Attempting + to call it before the handshake is complete will result in an exception. + @param buffer The buffer containing application data to encrypt + @param offset The offset at which to begin reading data + @param length The number of bytes of data to read + @throws IOException If an error occurs encrypting the data, or the handshake is not complete +
+ + Gets the amount of encrypted data available to be sent. A call to + {@link #readOutput(byte[], int, int)} is guaranteed to be able to return at + least this much data.
+
+ Only allowed in non-blocking mode. + @return The number of bytes of available encrypted data +
+ + Retrieves encrypted data to be sent. Use {@link #getAvailableOutputBytes()} to check + how much encrypted data is currently available. This method functions similarly to + {@link InputStream#read(byte[], int, int)}, except that it never blocks. If no data + is available, nothing will be copied and zero will be returned.
+
+ Only allowed in non-blocking mode. + @param buffer The buffer to hold the encrypted data + @param offset The start offset in the buffer at which the data is written + @param length The maximum number of bytes to read + @return The total number of bytes copied to the buffer. May be less than the + length specified if the length was greater than the amount of available data. +
+ + Closes this connection. + + @throws IOException If something goes wrong during closing. + + + Make sure the InputStream 'buf' now empty. Fail otherwise. + + @param buf The InputStream to check. + @throws IOException If 'buf' is not empty. + + + 'sender' only relevant to SSLv3 + + + Both streams can be the same object + + + (D)TLS PSK key exchange (RFC 4279). + + + (D)TLS and SSLv3 RSA key exchange. + + + + + + + + + + + + + + + + + + A (Int32 -> byte[]). Will never be null. + + + + + + + + + + + + + + Get the (optional) table of server extensions to be included in (extended) server hello. + + + A (Int32 -> byte[]). May be null. + + + + + + A (). May be null. + + + + + + + + + This method will be called (only) if the server included an extension of type + "status_request" with empty "extension_data" in the extended server hello. See RFC 3546 + 3.6. Certificate Status Request. If a non-null is returned, it + is sent to the client as a handshake message of type "certificate_status". + + A to be sent to the client (or null for none). + + + + + + + + + + () + + + + + Called by the protocol handler to report the client certificate, only if GetCertificateRequest + returned non-null. + + Note: this method is responsible for certificate verification and validation. + the effective client certificate (may be an empty chain). + + + + RFC 5077 3.3. NewSessionTicket Handshake Message. + + This method will be called (only) if a NewSessionTicket extension was sent by the server. See + RFC 5077 4. Recommended Ticket Construction for recommended format and protection. + + The ticket) + + + + Constructor for blocking mode. + @param stream The bi-directional stream of data to/from the client + @param output The stream of data to the client + @param secureRandom Random number generator for various cryptographic functions + + + Constructor for blocking mode. + @param input The stream of data from the client + @param output The stream of data to the client + @param secureRandom Random number generator for various cryptographic functions + + + Constructor for non-blocking mode.
+
+ When data is received, use {@link #offerInput(java.nio.ByteBuffer)} to + provide the received ciphertext, then use + {@link #readInput(byte[], int, int)} to read the corresponding cleartext.
+
+ Similarly, when data needs to be sent, use + {@link #offerOutput(byte[], int, int)} to provide the cleartext, then use + {@link #readOutput(byte[], int, int)} to get the corresponding + ciphertext. + + @param secureRandom + Random number generator for various cryptographic functions +
+ + Receives a TLS handshake in the role of server.
+
+ In blocking mode, this will not return until the handshake is complete. + In non-blocking mode, use {@link TlsPeer#notifyHandshakeComplete()} to + receive a callback when the handshake is complete. + + @param tlsServer + @throws IOException If in blocking mode and handshake was not successful. +
+ + + + + Check whether the given SRP group parameters are acceptable for use. + + @param group the {@link SRP6GroupParameters} to check + @return true if (and only if) the specified group parameters are acceptable + + + Lookup the {@link TlsSRPLoginParameters} corresponding to the specified identity. + + NOTE: To avoid "identity probing", unknown identities SHOULD be handled as recommended in RFC + 5054 2.5.1.3. {@link SimulatedTlsSRPIdentityManager} is provided for this purpose. + + @param identity + the SRP identity sent by the connecting client + @return the {@link TlsSRPLoginParameters} for the specified identity, or else 'simulated' + parameters if the identity is not recognized. A null value is also allowed, but not + recommended. + + + (D)TLS SRP key exchange (RFC 5054). + + + RFC 5764 DTLS Extension to Establish Keys for SRTP. + + + + + + + + + + + + Some helper functions for MicroTLS. + + + Add a 'signature_algorithms' extension to existing extensions. + + @param extensions A {@link Hashtable} to add the extension to. + @param supportedSignatureAlgorithms {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}. + @throws IOException + + + Get a 'signature_algorithms' extension from extensions. + + @param extensions A {@link Hashtable} to get the extension from, if it is present. + @return A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}, or null. + @throws IOException + + + Create a 'signature_algorithms' extension value. + + @param supportedSignatureAlgorithms A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}. + @return A byte array suitable for use as an extension value. + @throws IOException + + + Read 'signature_algorithms' extension data. + + @param extensionData The extension data. + @return A {@link Vector} containing at least 1 {@link SignatureAndHashAlgorithm}. + @throws IOException + + + RFC 6066 5. + + + Encode this {@link UrlAndHash} to a {@link Stream}. + + @param output the {@link Stream} to encode to. + @throws IOException + + + Parse a {@link UrlAndHash} from a {@link Stream}. + + @param context + the {@link TlsContext} of the current connection. + @param input + the {@link Stream} to parse from. + @return a {@link UrlAndHash} object. + @throws IOException + + + RFC 4681 + + + RFC 5764 4.1.1 + + + @param protectionProfiles see {@link SrtpProtectionProfile} for valid constants. + @param mki valid lengths from 0 to 255. + + + @return see {@link SrtpProtectionProfile} for valid constants. + + + @return valid lengths from 0 to 255. + + + Create an AlgorithmIdentifier for the passed in encryption algorithm. + + @param encryptionOID OID for the encryption algorithm + @param keySize key size in bits (-1 if unknown) + @param random SecureRandom to use for parameter generation. + @return a full AlgorithmIdentifier including parameters + @throws IllegalArgumentException if encryptionOID cannot be matched + + + Create a key generator for the passed in Object Identifier. + + @param algorithm the Object Identifier indicating the algorithn the generator is for. + @param random a source of random to initialise the generator with. + @return an initialised CipherKeyGenerator. + @throws IllegalArgumentException if the algorithm cannot be identified. + + + return a = a + b - b preserved. + + + unsigned comparison on two arrays - note the arrays may + start with leading zeros. + + + return z = x / y - done in place (z value preserved, x contains the + remainder) + + + return whether or not a BigInteger is probably prime with a + probability of 1 - (1/2)**certainty. +

From Knuth Vol 2, pg 395.

+
+ + Calculate the numbers u1, u2, and u3 such that: + + u1 * a + u2 * b = u3 + + where u3 is the greatest common divider of a and b. + a and b using the extended Euclid algorithm (refer p. 323 + of The Art of Computer Programming vol 2, 2nd ed). + This also seems to have the side effect of calculating + some form of multiplicative inverse. + + @param a First number to calculate gcd for + @param b Second number to calculate gcd for + @param u1Out the return object for the u1 value + @return The greatest common divisor of a and b + + + return w with w = x * x - w is assumed to have enough space. + + + return x with x = y * z - x is assumed to have enough space. + + + Calculate mQuote = -m^(-1) mod b with b = 2^32 (32 = word size) + + + Montgomery multiplication: a = x * y * R^(-1) mod m +
+ Based algorithm 14.36 of Handbook of Applied Cryptography. +
+
  • m, x, y should have length n
  • +
  • a should have length (n + 1)
  • +
  • b = 2^32, R = b^n
  • +
    + The result is put in x +
    + NOTE: the indices of x, y, m, a different in HAC and in Java +
    + + return x = x % y - done in place (y value preserved) + + + do a left shift - this returns a new array. + + + do a right shift - this does it in place. + + + do a right shift by one - this does it in place. + + + returns x = x - y - we assume x is >= y + + + Class representing a simple version of a big decimal. A + SimpleBigDecimal is basically a + {@link java.math.BigInteger BigInteger} with a few digits on the right of + the decimal point. The number of (binary) digits on the right of the decimal + point is called the scale of the SimpleBigDecimal. + Unlike in {@link java.math.BigDecimal BigDecimal}, the scale is not adjusted + automatically, but must be set manually. All SimpleBigDecimals + taking part in the same arithmetic operation must have equal scale. The + result of a multiplication of two SimpleBigDecimals returns a + SimpleBigDecimal with double scale. + + + Returns a SimpleBigDecimal representing the same numerical + value as value. + @param value The value of the SimpleBigDecimal to be + created. + @param scale The scale of the SimpleBigDecimal to be + created. + @return The such created SimpleBigDecimal. + + + Constructor for SimpleBigDecimal. The value of the + constructed SimpleBigDecimal Equals bigInt / + 2scale. + @param bigInt The bigInt value parameter. + @param scale The scale of the constructed SimpleBigDecimal. + + + Class holding methods for point multiplication based on the window + τ-adic nonadjacent form (WTNAF). The algorithms are based on the + paper "Improved Algorithms for Arithmetic on Anomalous Binary Curves" + by Jerome A. Solinas. The paper first appeared in the Proceedings of + Crypto 1997. + + + The window width of WTNAF. The standard value of 4 is slightly less + than optimal for running time, but keeps space requirements for + precomputation low. For typical curves, a value of 5 or 6 results in + a better running time. When changing this value, the + αu's must be computed differently, see + e.g. "Guide to Elliptic Curve Cryptography", Darrel Hankerson, + Alfred Menezes, Scott Vanstone, Springer-Verlag New York Inc., 2004, + p. 121-122 + + + 24 + + + The αu's for a=0 as an array + of ZTauElements. + + + The αu's for a=0 as an array + of TNAFs. + + + The αu's for a=1 as an array + of ZTauElements. + + + The αu's for a=1 as an array + of TNAFs. + + + Computes the norm of an element λ of + Z[τ]. + @param mu The parameter μ of the elliptic curve. + @param lambda The element λ of + Z[τ]. + @return The norm of λ. + + + Computes the norm of an element λ of + R[τ], where λ = u + vτ + and u and u are real numbers (elements of + R). + @param mu The parameter μ of the elliptic curve. + @param u The real part of the element λ of + R[τ]. + @param v The τ-adic part of the element + λ of R[τ]. + @return The norm of λ. + + + Rounds an element λ of R[τ] + to an element of Z[τ], such that their difference + has minimal norm. λ is given as + λ = λ0 + λ1τ. + @param lambda0 The component λ0. + @param lambda1 The component λ1. + @param mu The parameter μ of the elliptic curve. Must + equal 1 or -1. + @return The rounded element of Z[τ]. + @throws ArgumentException if lambda0 and + lambda1 do not have same scale. + + + Approximate division by n. For an integer + k, the value λ = s k / n is + computed to c bits of accuracy. + @param k The parameter k. + @param s The curve parameter s0 or + s1. + @param vm The Lucas Sequence element Vm. + @param a The parameter a of the elliptic curve. + @param m The bit length of the finite field + Fm. + @param c The number of bits of accuracy, i.e. the scale of the returned + SimpleBigDecimal. + @return The value λ = s k / n computed to + c bits of accuracy. + + + Computes the τ-adic NAF (non-adjacent form) of an + element λ of Z[τ]. + @param mu The parameter μ of the elliptic curve. + @param lambda The element λ of + Z[τ]. + @return The τ-adic NAF of λ. + + + Applies the operation τ() to an + AbstractF2mPoint. + @param p The AbstractF2mPoint to which τ() is applied. + @return τ(p) + + + Returns the parameter μ of the elliptic curve. + @param curve The elliptic curve from which to obtain μ. + The curve must be a Koblitz curve, i.e. a Equals + 0 or 1 and b Equals + 1. + @return μ of the elliptic curve. + @throws ArgumentException if the given ECCurve is not a Koblitz + curve. + + + Calculates the Lucas Sequence elements Uk-1 and + Uk or Vk-1 and + Vk. + @param mu The parameter μ of the elliptic curve. + @param k The index of the second element of the Lucas Sequence to be + returned. + @param doV If set to true, computes Vk-1 and + Vk, otherwise Uk-1 and + Uk. + @return An array with 2 elements, containing Uk-1 + and Uk or Vk-1 + and Vk. + + + Computes the auxiliary value tw. If the width is + 4, then for mu = 1, tw = 6 and for + mu = -1, tw = 10 + @param mu The parameter μ of the elliptic curve. + @param w The window width of the WTNAF. + @return the auxiliary value tw + + + Computes the auxiliary values s0 and + s1 used for partial modular reduction. + @param curve The elliptic curve for which to compute + s0 and s1. + @throws ArgumentException if curve is not a + Koblitz curve (Anomalous Binary Curve, ABC). + + + Partial modular reduction modulo + m - 1)/(τ - 1). + @param k The integer to be reduced. + @param m The bitlength of the underlying finite field. + @param a The parameter a of the elliptic curve. + @param s The auxiliary values s0 and + s1. + @param mu The parameter μ of the elliptic curve. + @param c The precision (number of bits of accuracy) of the partial + modular reduction. + @return ρ := k partmod (τm - 1)/(τ - 1) + + + Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint} + by a BigInteger using the reduced τ-adic + NAF (RTNAF) method. + @param p The AbstractF2mPoint to Multiply. + @param k The BigInteger by which to Multiply p. + @return k * p + + + Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint} + by an element λ of Z[τ] + using the τ-adic NAF (TNAF) method. + @param p The AbstractF2mPoint to Multiply. + @param lambda The element λ of + Z[τ]. + @return λ * p + + + Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint} + by an element λ of Z[τ] + using the τ-adic NAF (TNAF) method, given the TNAF + of λ. + @param p The AbstractF2mPoint to Multiply. + @param u The the TNAF of λ.. + @return λ * p + + + Computes the [τ]-adic window NAF of an element + λ of Z[τ]. + @param mu The parameter μ of the elliptic curve. + @param lambda The element λ of + Z[τ] of which to compute the + [τ]-adic NAF. + @param width The window width of the resulting WNAF. + @param pow2w 2width. + @param tw The auxiliary value tw. + @param alpha The αu's for the window width. + @return The [τ]-adic window NAF of + λ. + + + Does the precomputation for WTNAF multiplication. + @param p The ECPoint for which to do the precomputation. + @param a The parameter a of the elliptic curve. + @return The precomputation array for p. + + + Class representing an element of Z[τ]. Let + λ be an element of Z[τ]. Then + λ is given as λ = u + vτ. The + components u and v may be used directly, there + are no accessor methods. + Immutable class. + + + The "real" part of λ. + + + The "τ-adic" part of λ. + + + Constructor for an element λ of + Z[τ]. + @param u The "real" part of λ. + @param v The "τ-adic" part of + λ. + + + return a sqrt root - the routine verifies that the calculation returns the right value - if + none exists it returns null. + + + Create a point which encodes with point compression. + + @param curve the curve to use + @param x affine x co-ordinate + @param y affine y co-ordinate + + @deprecated Use ECCurve.CreatePoint to construct points + + + Create a point that encodes with or without point compresion. + + @param curve the curve to use + @param x affine x co-ordinate + @param y affine y co-ordinate + @param withCompression if true encode with point compression + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + return a sqrt root - the routine verifies that the calculation returns the right value - if + none exists it returns null. + + + Create a point which encodes with point compression. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + + @deprecated Use ECCurve.createPoint to construct points + + + Create a point that encodes with or without point compresion. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + @param withCompression + if true encode with point compression + + @deprecated per-point compression property will be removed, refer + {@link #getEncoded(bool)} + + + return a sqrt root - the routine verifies that the calculation returns the right value - if + none exists it returns null. + + + Create a point which encodes with point compression. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + + @deprecated Use ECCurve.createPoint to construct points + + + Create a point that encodes with or without point compresion. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + @param withCompression + if true encode with point compression + + @deprecated per-point compression property will be removed, refer + {@link #getEncoded(boolean)} + + + Create a point which encodes with point compression. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + + @deprecated Use ECCurve.CreatePoint to construct points + + + Create a point that encodes with or without point compresion. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + @param withCompression + if true encode with point compression + + @deprecated per-point compression property will be removed, refer + {@link #getEncoded(bool)} + + + return a sqrt root - the routine verifies that the calculation returns the right value - if + none exists it returns null. + + + Create a point which encodes with point compression. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + + @deprecated Use ECCurve.CreatePoint to construct points + + + Create a point that encodes with or without point compresion. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + @param withCompression + if true encode with point compression + + @deprecated per-point compression property will be removed, refer + {@link #getEncoded(bool)} + + + return a sqrt root - the routine verifies that the calculation returns the right value - if + none exists it returns null. + + + Create a point which encodes with point compression. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + + @deprecated Use ECCurve.CreatePoint to construct points + + + Create a point that encodes with or without point compresion. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + @param withCompression + if true encode with point compression + + @deprecated per-point compression property will be removed, refer + {@link #getEncoded(bool)} + + + return a sqrt root - the routine verifies that the calculation returns the right value - if + none exists it returns null. + + + Create a point which encodes with point compression. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + + @deprecated Use ECCurve.createPoint to construct points + + + Create a point that encodes with or without point compresion. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + @param withCompression + if true encode with point compression + + @deprecated per-point compression property will be removed, refer + {@link #getEncoded(bool)} + + + return a sqrt root - the routine verifies that the calculation returns the right value - if + none exists it returns null. + + + Create a point which encodes with point compression. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + + @deprecated Use ECCurve.createPoint to construct points + + + Create a point that encodes with or without point compresion. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + @param withCompression + if true encode with point compression + + @deprecated per-point compression property will be removed, refer + {@link #getEncoded(bool)} + + + return a sqrt root - the routine verifies that the calculation returns the right value - if + none exists it returns null. + + + Create a point which encodes with point compression. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + + @deprecated Use ECCurve.createPoint to construct points + + + Create a point that encodes with or without point compresion. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + @param withCompression + if true encode with point compression + + @deprecated per-point compression property will be removed, refer + {@link #getEncoded(bool)} + + + return a sqrt root - the routine verifies that the calculation returns the right value - if + none exists it returns null. + + + Create a point which encodes with point compression. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + + @deprecated Use ECCurve.createPoint to construct points + + + Create a point that encodes with or without point compresion. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + @param withCompression + if true encode with point compression + + @deprecated per-point compression property will be removed, refer + {@link #getEncoded(bool)} + + + return a sqrt root - the routine verifies that the calculation returns the right value - if + none exists it returns null. + + + Create a point which encodes with point compression. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + + @deprecated Use ECCurve.createPoint to construct points + + + Create a point that encodes with or without point compresion. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + @param withCompression + if true encode with point compression + + @deprecated per-point compression property will be removed, refer + {@link #getEncoded(bool)} + + + return a sqrt root - the routine verifies that the calculation returns the right value - if + none exists it returns null. + + + Create a point which encodes with point compression. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + + @deprecated Use ECCurve.createPoint to construct points + + + Create a point that encodes with or without point compresion. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + @param withCompression + if true encode with point compression + + @deprecated per-point compression property will be removed, refer + {@link #getEncoded(bool)} + + + return a sqrt root - the routine verifies that the calculation returns the right value - if + none exists it returns null. + + + Create a point which encodes with point compression. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + + @deprecated Use ECCurve.createPoint to construct points + + + Create a point that encodes with or without point compresion. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + @param withCompression + if true encode with point compression + + @deprecated per-point compression property will be removed, refer + {@link #getEncoded(bool)} + + + return a sqrt root - the routine verifies that the calculation returns the right value - if + none exists it returns null. + + + Create a point which encodes with point compression. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + + @deprecated Use ECCurve.createPoint to construct points + + + Create a point that encodes with or without point compresion. + + @param curve + the curve to use + @param x + affine x co-ordinate + @param y + affine y co-ordinate + @param withCompression + if true encode with point compression + + @deprecated per-point compression property will be removed, refer + {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + @deprecated Use ECCurve.createPoint to construct points + + + @deprecated per-point compression property will be removed, refer {@link #getEncoded(bool)} + + + Simple shift-and-add multiplication. Serves as reference implementation to verify (possibly + faster) implementations, and for very small scalars. CAUTION: This implementation is NOT + constant-time in any way. It is only intended to be used for diagnostics. + + @param p + The point to multiply. + @param k + The multiplier. + @return The result of the point multiplication kP. + + + Base class for an elliptic curve. + + + Compute a PreCompInfo for a point on this curve, under a given name. Used by + ECMultipliers to save the precomputation for this ECPoint for use + by subsequent multiplication. + + @param point + The ECPoint to store precomputations for. + @param name + A String used to index precomputations of different types. + @param callback + Called to calculate the PreCompInfo. + + + Normalization ensures that any projective coordinate is 1, and therefore that the x, y + coordinates reflect those of the equivalent point in an affine coordinate system. Where more + than one point is to be normalized, this method will generally be more efficient than + normalizing each point separately. + + @param points + An array of points that will be updated in place with their normalized versions, + where necessary + + + Normalization ensures that any projective coordinate is 1, and therefore that the x, y + coordinates reflect those of the equivalent point in an affine coordinate system. Where more + than one point is to be normalized, this method will generally be more efficient than + normalizing each point separately. An (optional) z-scaling factor can be applied; effectively + each z coordinate is scaled by this value prior to normalization (but only one + actual multiplication is needed). + + @param points + An array of points that will be updated in place with their normalized versions, + where necessary + @param off + The start of the range of points to normalize + @param len + The length of the range of points to normalize + @param iso + The (optional) z-scaling factor - can be null + + + Create a cache-safe lookup table for the specified sequence of points. All the points MUST + belong to this ECCurve instance, and MUST already be normalized. + + + Sets the default ECMultiplier, unless already set. + + We avoid locking for performance reasons, so there is no uniqueness guarantee. + + + Decode a point on this curve from its ASN.1 encoding. The different + encodings are taken account of, including point compression for + Fp (X9.62 s 4.2.1 pg 17). + @return The decoded point. + + + Elliptic curve over Fp + + + The auxiliary values s0 and + s1 used for partial modular reduction for + Koblitz curves. + + + Solves a quadratic equation z2 + z = beta(X9.62 + D.1.6) The other solution is z + 1. + + @param beta + The value to solve the quadratic equation for. + @return the solution for z2 + z = beta or + null if no solution exists. + + + @return the auxiliary values s0 and + s1 used for partial modular reduction for + Koblitz curves. + + + Returns true if this is a Koblitz curve (ABC curve). + @return true if this is a Koblitz curve (ABC curve), false otherwise + + + Elliptic curves over F2m. The Weierstrass equation is given by + y2 + xy = x3 + ax2 + b. + + + The exponent m of F2m. + + + TPB: The integer k where xm + + xk + 1 represents the reduction polynomial + f(z).
    + PPB: The integer k1 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z).
    +
    + + TPB: Always set to 0
    + PPB: The integer k2 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z).
    +
    + + TPB: Always set to 0
    + PPB: The integer k3 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z).
    +
    + + The point at infinity on this curve. + + + Constructor for Trinomial Polynomial Basis (TPB). + @param m The exponent m of + F2m. + @param k The integer k where xm + + xk + 1 represents the reduction + polynomial f(z). + @param a The coefficient a in the Weierstrass equation + for non-supersingular elliptic curves over + F2m. + @param b The coefficient b in the Weierstrass equation + for non-supersingular elliptic curves over + F2m. + + + Constructor for Trinomial Polynomial Basis (TPB). + @param m The exponent m of + F2m. + @param k The integer k where xm + + xk + 1 represents the reduction + polynomial f(z). + @param a The coefficient a in the Weierstrass equation + for non-supersingular elliptic curves over + F2m. + @param b The coefficient b in the Weierstrass equation + for non-supersingular elliptic curves over + F2m. + @param order The order of the main subgroup of the elliptic curve. + @param cofactor The cofactor of the elliptic curve, i.e. + #Ea(F2m) = h * n. + + + Constructor for Pentanomial Polynomial Basis (PPB). + @param m The exponent m of + F2m. + @param k1 The integer k1 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z). + @param k2 The integer k2 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z). + @param k3 The integer k3 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z). + @param a The coefficient a in the Weierstrass equation + for non-supersingular elliptic curves over + F2m. + @param b The coefficient b in the Weierstrass equation + for non-supersingular elliptic curves over + F2m. + + + Constructor for Pentanomial Polynomial Basis (PPB). + @param m The exponent m of + F2m. + @param k1 The integer k1 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z). + @param k2 The integer k2 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z). + @param k3 The integer k3 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z). + @param a The coefficient a in the Weierstrass equation + for non-supersingular elliptic curves over + F2m. + @param b The coefficient b in the Weierstrass equation + for non-supersingular elliptic curves over + F2m. + @param order The order of the main subgroup of the elliptic curve. + @param cofactor The cofactor of the elliptic curve, i.e. + #Ea(F2m) = h * n. + + + Return true if curve uses a Trinomial basis. + + @return true if curve Trinomial, false otherwise. + + + return the field name for this field. + + @return the string "Fp". + + + return a sqrt root - the routine verifies that the calculation + returns the right value - if none exists it returns null. + + + Class representing the Elements of the finite field + F2m in polynomial basis (PB) + representation. Both trinomial (Tpb) and pentanomial (Ppb) polynomial + basis representations are supported. Gaussian normal basis (GNB) + representation is not supported. + + + Indicates gaussian normal basis representation (GNB). Number chosen + according to X9.62. GNB is not implemented at present. + + + Indicates trinomial basis representation (Tpb). Number chosen + according to X9.62. + + + Indicates pentanomial basis representation (Ppb). Number chosen + according to X9.62. + + + Tpb or Ppb. + + + The exponent m of F2m. + + + The LongArray holding the bits. + + + Constructor for Ppb. + @param m The exponent m of + F2m. + @param k1 The integer k1 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z). + @param k2 The integer k2 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z). + @param k3 The integer k3 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z). + @param x The BigInteger representing the value of the field element. + + + Constructor for Tpb. + @param m The exponent m of + F2m. + @param k The integer k where xm + + xk + 1 represents the reduction + polynomial f(z). + @param x The BigInteger representing the value of the field element. + + + Checks, if the ECFieldElements a and b + are elements of the same field F2m + (having the same representation). + @param a field element. + @param b field element to be compared. + @throws ArgumentException if a and b + are not elements of the same field + F2m (having the same + representation). + + + @return the representation of the field + F2m, either of + {@link F2mFieldElement.Tpb} (trinomial + basis representation) or + {@link F2mFieldElement.Ppb} (pentanomial + basis representation). + + + @return the degree m of the reduction polynomial + f(z). + + + @return Tpb: The integer k where xm + + xk + 1 represents the reduction polynomial + f(z).
    + Ppb: The integer k1 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z).
    +
    + + @return Tpb: Always returns 0
    + Ppb: The integer k2 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z).
    +
    + + @return Tpb: Always set to 0
    + Ppb: The integer k3 where xm + + xk3 + xk2 + xk1 + 1 + represents the reduction polynomial f(z).
    +
    + + base class for points on elliptic curves. + + + Returns the affine x-coordinate after checking that this point is normalized. + + @return The affine x-coordinate of this point + @throws IllegalStateException if the point is not normalized + + + Returns the affine y-coordinate after checking that this point is normalized + + @return The affine y-coordinate of this point + @throws IllegalStateException if the point is not normalized + + + Returns the x-coordinate. + + Caution: depending on the curve's coordinate system, this may not be the same value as in an + affine coordinate system; use Normalize() to get a point where the coordinates have their + affine values, or use AffineXCoord if you expect the point to already have been normalized. + + @return the x-coordinate of this point + + + Returns the y-coordinate. + + Caution: depending on the curve's coordinate system, this may not be the same value as in an + affine coordinate system; use Normalize() to get a point where the coordinates have their + affine values, or use AffineYCoord if you expect the point to already have been normalized. + + @return the y-coordinate of this point + + + Normalization ensures that any projective coordinate is 1, and therefore that the x, y + coordinates reflect those of the equivalent point in an affine coordinate system. + + @return a new ECPoint instance representing the same point, but with normalized coordinates + + + return the field element encoded with point compression. (S 4.3.6) + + + Multiplies this ECPoint by the given number. + @param k The multiplicator. + @return k * this. + + + Elliptic curve points over Fp + + + Create a point which encodes without point compression. + + @param curve the curve to use + @param x affine x co-ordinate + @param y affine y co-ordinate + + + Create a point that encodes with or without point compression. + + @param curve the curve to use + @param x affine x co-ordinate + @param y affine y co-ordinate + @param withCompression if true encode with point compression + + + Elliptic curve points over F2m + + + @param curve base curve + @param x x point + @param y y point + + + @param curve base curve + @param x x point + @param y y point + @param withCompression true if encode with point compression. + + + Joye's double-add algorithm. + + + Interface for classes encapsulating a point multiplication algorithm + for ECPoints. + + + Multiplies the ECPoint p by k, i.e. + p is added k times to itself. + @param p The ECPoint to be multiplied. + @param k The factor by which p is multiplied. + @return p multiplied by k. + + + Class holding precomputation data for fixed-point multiplications. + + + Lookup table for the precomputed ECPoints used for a fixed point multiplication. + + + The width used for the precomputation. If a larger width precomputation + is already available this may be larger than was requested, so calling + code should refer to the actual width. + + + Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (right-to-left) using + mixed coordinates. + + + By default, addition will be done in Jacobian coordinates, and doubling will be done in + Modified Jacobian coordinates (independent of the original coordinate system of each point). + + + Montgomery ladder. + + + Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (left-to-right). + + + Class implementing the NAF (Non-Adjacent Form) multiplication algorithm (right-to-left). + + + Interface for classes storing precomputation data for multiplication + algorithms. Used as a Memento (see GOF patterns) for + WNafMultiplier. + + + Class implementing the WNAF (Window Non-Adjacent Form) multiplication + algorithm. + + + Multiplies this by an integer k using the + Window NAF method. + @param k The integer by which this is multiplied. + @return A new ECPoint which equals this + multiplied by k. + + + Class holding precomputation data for the WNAF (Window Non-Adjacent Form) + algorithm. + + + Array holding the precomputed ECPoints used for a Window + NAF multiplication. + + + Array holding the negations of the precomputed ECPoints used + for a Window NAF multiplication. + + + Holds an ECPoint representing Twice(this). Used for the + Window NAF multiplication to create or extend the precomputed values. + + + Computes the Window NAF (non-adjacent Form) of an integer. + @param width The width w of the Window NAF. The width is + defined as the minimal number w, such that for any + w consecutive digits in the resulting representation, at + most one is non-zero. + @param k The integer of which the Window NAF is computed. + @return The Window NAF of the given width, such that the following holds: + k = &sum;i=0l-1 ki2i + , where the ki denote the elements of the + returned byte[]. + + + Determine window width to use for a scalar multiplication of the given size. + + @param bits the bit-length of the scalar to multiply by + @return the window size to use + + + Determine window width to use for a scalar multiplication of the given size. + + @param bits the bit-length of the scalar to multiply by + @param maxWidth the maximum window width to return + @return the window size to use + + + Determine window width to use for a scalar multiplication of the given size. + + @param bits the bit-length of the scalar to multiply by + @param windowSizeCutoffs a monotonically increasing list of bit sizes at which to increment the window width + @return the window size to use + + + Determine window width to use for a scalar multiplication of the given size. + + @param bits the bit-length of the scalar to multiply by + @param windowSizeCutoffs a monotonically increasing list of bit sizes at which to increment the window width + @param maxWidth the maximum window width to return + @return the window size to use + + + Class implementing the WTNAF (Window + τ-adic Non-Adjacent Form) algorithm. + + + Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint} + by k using the reduced τ-adic NAF (RTNAF) + method. + @param p The AbstractF2mPoint to multiply. + @param k The integer by which to multiply k. + @return p multiplied by k. + + + Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint} + by an element λ of Z[τ] using + the τ-adic NAF (TNAF) method. + @param p The AbstractF2mPoint to multiply. + @param lambda The element λ of + Z[τ] of which to compute the + [τ]-adic NAF. + @return p multiplied by λ. + + + Multiplies a {@link org.bouncycastle.math.ec.AbstractF2mPoint AbstractF2mPoint} + by an element λ of Z[τ] + using the window τ-adic NAF (TNAF) method, given the + WTNAF of λ. + @param p The AbstractF2mPoint to multiply. + @param u The the WTNAF of λ.. + @return λ * p + + + Class holding precomputation data for the WTNAF (Window + τ-adic Non-Adjacent Form) algorithm. + + + Array holding the precomputed AbstractF2mPoints used for the + WTNAF multiplication in + {@link org.bouncycastle.math.ec.multiplier.WTauNafMultiplier.multiply() + WTauNafMultiplier.multiply()}. + + + 'Zeroless' Signed Digit Left-to-Right. + + + 'Zeroless' Signed Digit Right-to-Left. + + + Utility methods for generating primes and testing for primality. + + + Used to return the output from the + {@linkplain Primes#enhancedMRProbablePrimeTest(BigInteger, SecureRandom, int) Enhanced + Miller-Rabin Probabilistic Primality Test} + + + Used to return the output from the {@linkplain Primes#generateSTRandomPrime(Digest, int, byte[]) Shawe-Taylor Random_Prime Routine} + + + FIPS 186-4 C.6 Shawe-Taylor Random_Prime Routine + + Construct a provable prime number using a hash function. + + @param hash + the {@link Digest} instance to use (as "Hash()"). Cannot be null. + @param length + the length (in bits) of the prime to be generated. Must be at least 2. + @param inputSeed + the seed to be used for the generation of the requested prime. Cannot be null or + empty. + @return an {@link STOutput} instance containing the requested prime. + + + FIPS 186-4 C.3.2 Enhanced Miller-Rabin Probabilistic Primality Test + + Run several iterations of the Miller-Rabin algorithm with randomly-chosen bases. This is an + alternative to {@link #isMRProbablePrime(BigInteger, SecureRandom, int)} that provides more + information about a composite candidate, which may be useful when generating or validating + RSA moduli. + + @param candidate + the {@link BigInteger} instance to test for primality. + @param random + the source of randomness to use to choose bases. + @param iterations + the number of randomly-chosen bases to perform the test for. + @return an {@link MROutput} instance that can be further queried for details. + + + A fast check for small divisors, up to some implementation-specific limit. + + @param candidate + the {@link BigInteger} instance to test for division by small factors. + + @return true if the candidate is found to have any small factors, + false otherwise. + + + FIPS 186-4 C.3.1 Miller-Rabin Probabilistic Primality Test + + Run several iterations of the Miller-Rabin algorithm with randomly-chosen bases. + + @param candidate + the {@link BigInteger} instance to test for primality. + @param random + the source of randomness to use to choose bases. + @param iterations + the number of randomly-chosen bases to perform the test for. + @return false if any witness to compositeness is found amongst the chosen bases + (so candidate is definitely NOT prime), or else true + (indicating primality with some probability dependent on the number of iterations + that were performed). + + + FIPS 186-4 C.3.1 Miller-Rabin Probabilistic Primality Test (to a fixed base). + + Run a single iteration of the Miller-Rabin algorithm against the specified base. + + @param candidate + the {@link BigInteger} instance to test for primality. + @param baseValue + the base value to use for this iteration. + @return false if the specified base is a witness to compositeness (so + candidate is definitely NOT prime), or else true. + + + + + BasicOcspResponse ::= SEQUENCE { + tbsResponseData ResponseData, + signatureAlgorithm AlgorithmIdentifier, + signature BIT STRING, + certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL + } + + + + + The DER encoding of the tbsResponseData field. + In the event of an encoding error. + + + The certificates, if any, associated with the response. + In the event of an encoding error. + + + + Verify the signature against the tbsResponseData object we contain. + + + + The ASN.1 encoded representation of this object. + + + Generator for basic OCSP response objects. + + + basic constructor + + + construct with the responderID to be the SHA-1 keyHash of the passed in public key. + + + Add a response for a particular Certificate ID. + + @param certID certificate ID details + @param certStatus status of the certificate - null if okay + + + Add a response for a particular Certificate ID. + + @param certID certificate ID details + @param certStatus status of the certificate - null if okay + @param singleExtensions optional extensions + + + Add a response for a particular Certificate ID. + + @param certID certificate ID details + @param nextUpdate date when next update should be requested + @param certStatus status of the certificate - null if okay + @param singleExtensions optional extensions + + + Add a response for a particular Certificate ID. + + @param certID certificate ID details + @param thisUpdate date this response was valid on + @param nextUpdate date when next update should be requested + @param certStatus status of the certificate - null if okay + @param singleExtensions optional extensions + + + Set the extensions for the response. + + @param responseExtensions the extension object to carry. + + + + Generate the signed response using the passed in signature calculator. + + Implementation of signing calculator factory. + The certificate chain associated with the response signer. + "produced at" date. + + + + Return an IEnumerable of the signature names supported by the generator. + + @return an IEnumerable containing recognised names. + + + create from an issuer certificate and the serial number of the + certificate it signed. + @exception OcspException if any problems occur creating the id fields. + + + return the serial number for the certificate associated + with this request. + + + Create a new CertificateID for a new serial number derived from a previous one + calculated for the same CA certificate. + + @param original the previously calculated CertificateID for the CA. + @param newSerialNumber the serial number for the new certificate of interest. + + @return a new CertificateID for newSerialNumber + + +
    +             OcspRequest     ::=     SEQUENCE {
    +                   tbsRequest                  TBSRequest,
    +                   optionalSignature   [0]     EXPLICIT Signature OPTIONAL }
    +            
    +               TBSRequest      ::=     SEQUENCE {
    +                   version             [0]     EXPLICIT Version DEFAULT v1,
    +                   requestorName       [1]     EXPLICIT GeneralName OPTIONAL,
    +                   requestList                 SEQUENCE OF Request,
    +                   requestExtensions   [2]     EXPLICIT Extensions OPTIONAL }
    +            
    +               Signature       ::=     SEQUENCE {
    +                   signatureAlgorithm      AlgorithmIdentifier,
    +                   signature               BIT STRING,
    +                   certs               [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL}
    +            
    +               Version         ::=             INTEGER  {  v1(0) }
    +            
    +               Request         ::=     SEQUENCE {
    +                   reqCert                     CertID,
    +                   singleRequestExtensions     [0] EXPLICIT Extensions OPTIONAL }
    +            
    +               CertID          ::=     SEQUENCE {
    +                   hashAlgorithm       AlgorithmIdentifier,
    +                   issuerNameHash      OCTET STRING, -- Hash of Issuer's DN
    +                   issuerKeyHash       OCTET STRING, -- Hash of Issuers public key
    +                   serialNumber        CertificateSerialNumber }
    +             
    +
    + + Return the DER encoding of the tbsRequest field. + @return DER encoding of tbsRequest + @throws OcspException in the event of an encoding error. + + + return the object identifier representing the signature algorithm + + + If the request is signed return a possibly empty CertStore containing the certificates in the + request. If the request is not signed the method returns null. + + @return null if not signed, a CertStore otherwise + @throws OcspException + + + Return whether or not this request is signed. + + @return true if signed false otherwise. + + + Verify the signature against the TBSRequest object we contain. + + + return the ASN.1 encoded representation of this object. + + + Add a request for the given CertificateID. + + @param certId certificate ID of interest + + + Add a request with extensions + + @param certId certificate ID of interest + @param singleRequestExtensions the extensions to attach to the request + + + Set the requestor name to the passed in X509Principal + + @param requestorName a X509Principal representing the requestor name. + + + Generate an unsigned request + + @return the OcspReq + @throws OcspException + + + Return an IEnumerable of the signature names supported by the generator. + + @return an IEnumerable containing recognised names. + + + return the ASN.1 encoded representation of this object. + + + base generator for an OCSP response - at the moment this only supports the + generation of responses containing BasicOCSP responses. + + + note 4 is not used. + + + Carrier for a ResponderID. + + + wrapper for the RevokedInfo object + + + return the revocation reason. Note: this field is optional, test for it + with hasRevocationReason() first. + @exception InvalidOperationException if a reason is asked for and none is avaliable + + + Return the status object for the response - null indicates good. + + @return the status object for the response, null if it is good. + + + return the NextUpdate value - note: this is an optional field so may + be returned as null. + + @return nextUpdate, or null if not present. + + + wrapper for the UnknownInfo object + + + + Utility class for creating IBasicAgreement objects from their names/Oids + + + + + Cipher Utility class contains methods that can not be specifically grouped into other classes. + + + + + Returns a ObjectIdentifier for a give encoding. + + A string representation of the encoding. + A DerObjectIdentifier, null if the Oid is not available. + + + + Utility class for creating IDigest objects from their names/Oids + + + + + Returns a ObjectIdentifier for a given digest mechanism. + + A string representation of the digest meanism. + A DerObjectIdentifier, null if the Oid is not available. + + + + A class containing methods to interface the BouncyCastle world to the .NET Crypto world. + + + + + Create an System.Security.Cryptography.X509Certificate from an X509Certificate Structure. + + + A System.Security.Cryptography.X509Certificate. + + + + Utility class for creating HMac object from their names/Oids + + + + + + + + + + Returns a ObjectIdentifier for a give encoding. + + A string representation of the encoding. + A DerObjectIdentifier, null if the Oid is not available. + + + + Create and auto-seed an instance based on the given algorithm. + + Equivalent to GetInstance(algorithm, true) + e.g. "SHA256PRNG" + + + + Create an instance based on the given algorithm, with optional auto-seeding + + e.g. "SHA256PRNG" + If true, the instance will be auto-seeded. + + + + To replicate existing predictable output, replace with GetInstance("SHA1PRNG", false), followed by SetSeed(seed) + + + + Use the specified instance of IRandomGenerator as random source. + + This constructor performs no seeding of either the IRandomGenerator or the + constructed SecureRandom. It is the responsibility of the client to provide + proper seed material as necessary/appropriate for the given IRandomGenerator + implementation. + + The source to generate all random bytes from. + + + base constructor. + + + create a SecurityUtilityException with the given message. + + @param message the message to be carried with the exception. + + + + Signer Utility class contains methods that can not be specifically grouped into other classes. + + + + + Returns an ObjectIdentifier for a given encoding. + + A string representation of the encoding. + A DerObjectIdentifier, null if the OID is not available. + + + + Utility class for creating IWrapper objects from their names/Oids + + + + PEM generator for the original set of PEM objects used in Open SSL. + + + Class for reading OpenSSL PEM encoded streams containing + X509 certificates, PKCS8 encoded keys and PKCS7 objects. +

    + In the case of PKCS7 objects the reader will return a CMS ContentInfo object. Keys and + Certificates will be returned using the appropriate java.security type.

    +
    + + Create a new PemReader + + @param reader the Reader + + + Create a new PemReader with a password finder + + @param reader the Reader + @param pFinder the password finder + + + Reads in a X509Certificate. + + @return the X509Certificate + @throws IOException if an I/O error occured + + + Reads in a X509CRL. + + @return the X509Certificate + @throws IOException if an I/O error occured + + + Reads in a PKCS10 certification request. + + @return the certificate request. + @throws IOException if an I/O error occured + + + Reads in a X509 Attribute Certificate. + + @return the X509 Attribute Certificate + @throws IOException if an I/O error occured + + + Reads in a PKCS7 object. This returns a ContentInfo object suitable for use with the CMS + API. + + @return the X509Certificate + @throws IOException if an I/O error occured + + + Read a Key Pair + + + General purpose writer for OpenSSL PEM objects. + + + The TextWriter object to write the output to. + + + Constructor for an unencrypted private key PEM object. + + @param key private key to be encoded. + + + Constructor for an encrypted private key PEM object. + + @param key private key to be encoded + @param algorithm encryption algorithm to use + @param provider provider to use + @throws NoSuchAlgorithmException if algorithm/mode cannot be found + + + + A class for verifying and creating Pkcs10 Certification requests. + + + CertificationRequest ::= Sequence { + certificationRequestInfo CertificationRequestInfo, + signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }}, + signature BIT STRING + } + + CertificationRequestInfo ::= Sequence { + version Integer { v1(0) } (v1,...), + subject Name, + subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }}, + attributes [0] Attributes{{ CRIAttributes }} + } + + Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }} + + Attr { ATTRIBUTE:IOSet } ::= Sequence { + type ATTRIBUTE.&id({IOSet}), + values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type}) + } + + see + + + + Instantiate a Pkcs10CertificationRequest object with the necessary credentials. + + Name of Sig Alg. + X509Name of subject eg OU="My unit." O="My Organisatioin" C="au" + Public Key to be included in cert reqest. + ASN1Set of Attributes. + Matching Private key for nominated (above) public key to be used to sign the request. + + + + Instantiate a Pkcs10CertificationRequest object with the necessary credentials. + + The factory for signature calculators to sign the PKCS#10 request with. + X509Name of subject eg OU="My unit." O="My Organisatioin" C="au" + Public Key to be included in cert reqest. + ASN1Set of Attributes. + Ignored. + + + + Instantiate a Pkcs10CertificationRequest object with the necessary credentials. + + The factory for signature calculators to sign the PKCS#10 request with. + X509Name of subject eg OU="My unit." O="My Organisatioin" C="au" + Public Key to be included in cert reqest. + ASN1Set of Attributes. + + + + Get the public key. + + The public key. + + + + Verify Pkcs10 Cert Request is valid. + + true = valid. + + + + A class for creating and verifying Pkcs10 Certification requests (this is an extension on ). + The requests are made using delay signing. This is useful for situations where + the private key is in another environment and not directly accessible (e.g. HSM) + So the first step creates the request, then the signing is done outside this + object and the signature is then used to complete the request. + + + CertificationRequest ::= Sequence { + certificationRequestInfo CertificationRequestInfo, + signatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }}, + signature BIT STRING + } + + CertificationRequestInfo ::= Sequence { + version Integer { v1(0) } (v1,...), + subject Name, + subjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }}, + attributes [0] Attributes{{ CRIAttributes }} + } + + Attributes { ATTRIBUTE:IOSet } ::= Set OF Attr{{ IOSet }} + + Attr { ATTRIBUTE:IOSet } ::= Sequence { + type ATTRIBUTE.&id({IOSet}), + values Set SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type}) + } + + see + + + + Instantiate a Pkcs10CertificationRequest object with the necessary credentials. + + Name of Sig Alg. + X509Name of subject eg OU="My unit." O="My Organisatioin" C="au" + Public Key to be included in cert reqest. + ASN1Set of Attributes. + + After the object is constructed use the and finally the + SignRequest methods to finalize the request. + + + + simply return the cert entry for the private key + + + Utility class for reencoding PKCS#12 files to definite length. + + + Just re-encode the outer layer of the PKCS#12 file to definite length encoding. + + @param berPKCS12File - original PKCS#12 file + @return a byte array representing the DER encoding of the PFX structure + @throws IOException + + + Re-encode the PKCS#12 structure to definite length encoding at the inner layer + as well, recomputing the MAC accordingly. + + @param berPKCS12File - original PKCS12 file. + @param provider - provider to use for MAC calculation. + @return a byte array representing the DER encoding of the PFX structure. + @throws IOException on parsing, encoding errors. + + + + A holding class for a PKCS#8 encrypted private key info object that allows for its decryption. + + + + + Base constructor from a PKCS#8 EncryptedPrivateKeyInfo object. + + A PKCS#8 EncryptedPrivateKeyInfo object. + + + + Base constructor from a BER encoding of a PKCS#8 EncryptedPrivateKeyInfo object. + + A BER encoding of a PKCS#8 EncryptedPrivateKeyInfo objects. + + + + Returns the underlying ASN.1 structure inside this object. + + Return the EncryptedPrivateKeyInfo structure in this object. + + + + Returns a copy of the encrypted data in this structure. + + Return a copy of the encrypted data in this object. + + + + Return a binary ASN.1 encoding of the EncryptedPrivateKeyInfo structure in this object. + + A byte array containing the encoded object. + + + + Get a decryptor from the passed in provider and decrypt the encrypted private key info, returning the result. + + A provider to query for decryptors for the object. + The decrypted private key info structure. + + + + Create the encrypted private key info using the passed in encryptor. + + The encryptor to use. + An encrypted private key info containing the original private key info. + + + + Base exception for PKCS related issues. + + + + + Base exception for parsing related issues in the PKCS namespace. + + + + Create a PrivateKeyInfo representation of a private key with attributes. + + @param privateKey the key to be encoded into the info object. + @param attributes the set of attributes to be included. + @return the appropriate PrivateKeyInfo + @throws java.io.IOException on an error encoding the key + + + + Returns the revocationDate. + + + + + Returns the certStatus. + + + + Returns an immutable Set of X.509 attribute certificate + extensions that this PkixAttrCertChecker supports or + null if no extensions are supported. +

    + Each element of the set is a String representing the + Object Identifier (OID) of the X.509 extension that is supported. +

    +

    + All X.509 attribute certificate extensions that a + PkixAttrCertChecker might possibly be able to process + should be included in the set. +

    + + @return an immutable Set of X.509 extension OIDs (in + String format) supported by this + PkixAttrCertChecker, or null if no + extensions are supported +
    + + Performs checks on the specified attribute certificate. Every handled + extension is rmeoved from the unresolvedCritExts + collection. + + @param attrCert The attribute certificate to be checked. + @param certPath The certificate path which belongs to the attribute + certificate issuer public key certificate. + @param holderCertPath The certificate path which belongs to the holder + certificate. + @param unresolvedCritExts a Collection of OID strings + representing the current set of unresolved critical extensions + @throws CertPathValidatorException if the specified attribute certificate + does not pass the check. + + + Returns a clone of this object. + + @return a copy of this PkixAttrCertChecker + + + Build and validate a CertPath using the given parameter. + + @param params PKIXBuilderParameters object containing all information to + build the CertPath + + + CertPathValidatorSpi implementation for X.509 Attribute Certificates la RFC 3281. + + @see org.bouncycastle.x509.ExtendedPkixParameters + + + Validates an attribute certificate with the given certificate path. + +

    + params must be an instance of + ExtendedPkixParameters. +

    + The target constraints in the params must be an + X509AttrCertStoreSelector with at least the attribute + certificate criterion set. Obey that also target informations may be + necessary to correctly validate this attribute certificate. +

    + The attribute certificate issuer must be added to the trusted attribute + issuers with {@link ExtendedPkixParameters#setTrustedACIssuers(Set)}. +

    + @param certPath The certificate path which belongs to the attribute + certificate issuer public key certificate. + @param params The PKIX parameters. + @return A PKIXCertPathValidatorResult of the result of + validating the certPath. + @throws InvalidAlgorithmParameterException if params is + inappropriate for this validator. + @throws CertPathValidatorException if the verification fails. +
    + + + Summary description for PkixBuilderParameters. + + + + Returns an instance of PkixBuilderParameters. +

    + This method can be used to get a copy from other + PKIXBuilderParameters, PKIXParameters, + and ExtendedPKIXParameters instances. +

    + + @param pkixParams The PKIX parameters to create a copy of. + @return An PkixBuilderParameters instance. +
    + + + Excluded certificates are not used for building a certification path. + + the excluded certificates. + + + + Sets the excluded certificates which are not used for building a + certification path. If the ISet is null an + empty set is assumed. + + + The given set is cloned to protect it against subsequent modifications. + + The excluded certificates to set. + + + Can alse handle ExtendedPKIXBuilderParameters and + PKIXBuilderParameters. + + @param params Parameters to set. + @see org.bouncycastle.x509.ExtendedPKIXParameters#setParams(java.security.cert.PKIXParameters) + + + Makes a copy of this PKIXParameters object. Changes to the + copy will not affect the original and vice versa. + + @return a copy of this PKIXParameters object + + + An immutable sequence of certificates (a certification path).
    +
    + This is an abstract class that defines the methods common to all CertPaths. + Subclasses can handle different kinds of certificates (X.509, PGP, etc.).
    +
    + All CertPath objects have a type, a list of Certificates, and one or more + supported encodings. Because the CertPath class is immutable, a CertPath + cannot change in any externally visible way after being constructed. This + stipulation applies to all public fields and methods of this class and any + added or overridden by subclasses.
    +
    + The type is a string that identifies the type of Certificates in the + certification path. For each certificate cert in a certification path + certPath, cert.getType().equals(certPath.getType()) must be true.
    +
    + The list of Certificates is an ordered List of zero or more Certificates. + This List and all of the Certificates contained in it must be immutable.
    +
    + Each CertPath object must support one or more encodings so that the object + can be translated into a byte array for storage or transmission to other + parties. Preferably, these encodings should be well-documented standards + (such as PKCS#7). One of the encodings supported by a CertPath is considered + the default encoding. This encoding is used if no encoding is explicitly + requested (for the {@link #getEncoded()} method, for instance).
    +
    + All CertPath objects are also Serializable. CertPath objects are resolved + into an alternate {@link CertPathRep} object during serialization. This + allows a CertPath object to be serialized into an equivalent representation + regardless of its underlying implementation.
    +
    + CertPath objects can be created with a CertificateFactory or they can be + returned by other classes, such as a CertPathBuilder.
    +
    + By convention, X.509 CertPaths (consisting of X509Certificates), are ordered + starting with the target certificate and ending with a certificate issued by + the trust anchor. That is, the issuer of one certificate is the subject of + the following one. The certificate representing the + {@link TrustAnchor TrustAnchor} should not be included in the certification + path. Unvalidated X.509 CertPaths may not follow these conventions. PKIX + CertPathValidators will detect any departure from these conventions that + cause the certification path to be invalid and throw a + CertPathValidatorException.
    +
    + Concurrent Access
    +
    + All CertPath objects must be thread-safe. That is, multiple threads may + concurrently invoke the methods defined in this class on a single CertPath + object (or more than one) with no ill effects. This is also true for the List + returned by CertPath.getCertificates.
    +
    + Requiring CertPath objects to be immutable and thread-safe allows them to be + passed around to various pieces of code without worrying about coordinating + access. Providing this thread-safety is generally not difficult, since the + CertPath and List objects in question are immutable. + + @see CertificateFactory + @see CertPathBuilder + + CertPath implementation for X.509 certificates. + +
    + + @param certs + + + Creates a CertPath of the specified type. + This constructor is protected because most users should use + a CertificateFactory to create CertPaths. + @param type the standard name of the type of Certificatesin this path + + + + Creates a CertPath of the specified type. + This constructor is protected because most users should use + a CertificateFactory to create CertPaths. + + @param type the standard name of the type of Certificatesin this path + + + + Returns an iteration of the encodings supported by this + certification path, with the default encoding + first. Attempts to modify the returned Iterator via its + remove method result in an UnsupportedOperationException. + + @return an Iterator over the names of the supported encodings (as Strings) + + + + Compares this certification path for equality with the specified object. + Two CertPaths are equal if and only if their types are equal and their + certificate Lists (and by implication the Certificates in those Lists) + are equal. A CertPath is never equal to an object that is not a CertPath.
    +
    + This algorithm is implemented by this method. If it is overridden, the + behavior specified here must be maintained. + + @param other + the object to test for equality with this certification path + + @return true if the specified object is equal to this certification path, + false otherwise + + @see Object#hashCode() Object.hashCode() +
    + + Returns the encoded form of this certification path, using + the default encoding. + + @return the encoded bytes + @exception CertificateEncodingException if an encoding error occurs + + + + Returns the encoded form of this certification path, using + the specified encoding. + + @param encoding the name of the encoding to use + @return the encoded bytes + @exception CertificateEncodingException if an encoding error + occurs or the encoding requested is not supported + + + + + Returns the list of certificates in this certification + path. + + + + Return a DERObject containing the encoded certificate. + + @param cert the X509Certificate object to be encoded + + @return the DERObject + + + + Implements the PKIX CertPathBuilding algorithm for BouncyCastle. + + @see CertPathBuilderSpi + + + Build and validate a CertPath using the given parameter. + + @param params PKIXBuilderParameters object containing all information to + build the CertPath + + + + Summary description for PkixCertPathBuilderException. + + + + + Summary description for PkixCertPathBuilderResult. + + + + * Initializes the internal state of this PKIXCertPathChecker. + *

    + * The forward flag specifies the order that certificates + * will be passed to the {@link #check check} method (forward or reverse). A + * PKIXCertPathChecker must support reverse checking + * and may support forward checking. + *

    + * + * @param forward + * the order that certificates are presented to the + * check method. If true, + * certificates are presented from target to most-trusted CA + * (forward); if false, from most-trusted CA to + * target (reverse). + * @exception CertPathValidatorException + * if this PKIXCertPathChecker is unable to + * check certificates in the specified order; it should never + * be thrown if the forward flag is false since reverse + * checking must be supported +
    + + Indicates if forward checking is supported. Forward checking refers to + the ability of the PKIXCertPathChecker to perform its + checks when certificates are presented to the check method + in the forward direction (from target to most-trusted CA). + + @return true if forward checking is supported, + false otherwise + + + * Returns an immutable Set of X.509 certificate extensions + * that this PKIXCertPathChecker supports (i.e. recognizes, + * is able to process), or null if no extensions are + * supported. + *

    + * Each element of the set is a String representing the + * Object Identifier (OID) of the X.509 extension that is supported. The OID + * is represented by a set of nonnegative integers separated by periods. + *

    + * All X.509 certificate extensions that a PKIXCertPathChecker + * might possibly be able to process should be included in the set. + *

    + * + * @return an immutable Set of X.509 extension OIDs (in + * String format) supported by this + * PKIXCertPathChecker, or null if no + * extensions are supported +
    + + Performs the check(s) on the specified certificate using its internal + state and removes any critical extensions that it processes from the + specified collection of OID strings that represent the unresolved + critical extensions. The certificates are presented in the order + specified by the init method. + + @param cert + the Certificate to be checked + @param unresolvedCritExts + a Collection of OID strings representing the + current set of unresolved critical extensions + @exception CertPathValidatorException + if the specified certificate does not pass the check + + + Returns a clone of this object. Calls the Object.clone() + method. All subclasses which maintain state must support and override + this method, if necessary. + + @return a copy of this PKIXCertPathChecker + + + The Service Provider Interface (SPI) + for the {@link CertPathValidator CertPathValidator} class. All + CertPathValidator implementations must include a class (the + SPI class) that extends this class (CertPathValidatorSpi) + and implements all of its methods. In general, instances of this class + should only be accessed through the CertPathValidator class. + For details, see the Java Cryptography Architecture.
    +
    + Concurrent Access
    +
    + Instances of this class need not be protected against concurrent + access from multiple threads. Threads that need to access a single + CertPathValidatorSpi instance concurrently should synchronize + amongst themselves and provide the necessary locking before calling the + wrapping CertPathValidator object.
    +
    + However, implementations of CertPathValidatorSpi may still + encounter concurrency issues, since multiple threads each + manipulating a different CertPathValidatorSpi instance need not + synchronize. + + CertPathValidatorSpi implementation for X.509 Certificate validation a la RFC + 3280. + +
    + + An exception indicating one of a variety of problems encountered when + validating a certification path.
    +
    + A CertPathValidatorException provides support for wrapping + exceptions. The {@link #getCause getCause} method returns the throwable, + if any, that caused this exception to be thrown.
    +
    + A CertPathValidatorException may also include the + certification path that was being validated when the exception was thrown + and the index of the certificate in the certification path that caused the + exception to be thrown. Use the {@link #getCertPath getCertPath} and + {@link #getIndex getIndex} methods to retrieve this information.
    +
    + Concurrent Access
    +
    + Unless otherwise specified, the methods defined in this class are not + thread-safe. Multiple threads that need to access a single + object concurrently should synchronize amongst themselves and + provide the necessary locking. Multiple threads each manipulating + separate objects need not synchronize. + + @see CertPathValidator + +
    + + + Creates a PkixCertPathValidatorException with the given detail + message. A detail message is a String that describes this + particular exception. + + the detail message + + + + Creates a PkixCertPathValidatorException with the specified + detail message and cause. + + the detail message + the cause (which is saved for later retrieval by the + {@link #getCause getCause()} method). (A null + value is permitted, and indicates that the cause is + nonexistent or unknown.) + + + + Creates a PkixCertPathValidatorException with the specified + detail message, cause, certification path, and index. + + the detail message (or null if none) + the cause (or null if none) + the certification path that was in the process of being + validated when the error was encountered + the index of the certificate in the certification path that * + + + + Returns the detail message for this CertPathValidatorException. + + the detail message, or null if neither the message nor cause were specified + + + Returns the certification path that was being validated when the + exception was thrown. + + @return the CertPath that was being validated when the + exception was thrown (or null if not specified) + + + Returns the index of the certificate in the certification path that + caused the exception to be thrown. Note that the list of certificates in + a CertPath is zero based. If no index has been set, -1 is + returned. + + @return the index that has been set, or -1 if none has been set + + + + Summary description for PkixCertPathValidatorResult. + + + + + Summary description for PkixCertPathValidatorUtilities. + + + + + key usage bits + + + + + Search the given Set of TrustAnchor's for one that is the + issuer of the given X509 certificate. + + the X509 certificate + a Set of TrustAnchor's + the TrustAnchor object if found or + null if not. + + @exception + + + + Returns the issuer of an attribute certificate or certificate. + + The attribute certificate or certificate. + The issuer as X500Principal. + + + Return the next working key inheriting DSA parameters if necessary. +

    + This methods inherits DSA parameters from the indexed certificate or + previous certificates in the certificate chain to the returned + PublicKey. The list is searched upwards, meaning the end + certificate is at position 0 and previous certificates are following. +

    +

    + If the indexed certificate does not contain a DSA key this method simply + returns the public key. If the DSA key already contains DSA parameters + the key is also only returned. +

    + + @param certs The certification path. + @param index The index of the certificate which contains the public key + which should be extended with DSA parameters. + @return The public key of the certificate in list position + index extended with DSA parameters if applicable. + @throws Exception if DSA parameters cannot be inherited. +
    + + + Return a Collection of all certificates or attribute certificates found + in the X509Store's that are matching the certSelect criteriums. + + a {@link Selector} object that will be used to select + the certificates + a List containing only X509Store objects. These + are used to search for certificates. + a Collection of all found or + objects. + May be empty but never null. + + + + Add the CRL issuers from the cRLIssuer field of the distribution point or + from the certificate if not given to the issuer criterion of the + selector. +

    + The issuerPrincipals are a collection with a single + X500Principal for X509Certificates. For + {@link X509AttributeCertificate}s the issuer may contain more than one + X500Principal. +

    + + @param dp The distribution point. + @param issuerPrincipals The issuers of the certificate or attribute + certificate which contains the distribution point. + @param selector The CRL selector. + @param pkixParams The PKIX parameters containing the cert stores. + @throws Exception if an exception occurs while processing. + @throws ClassCastException if issuerPrincipals does not + contain only X500Principals. +
    + + Fetches complete CRLs according to RFC 3280. + + @param dp The distribution point for which the complete CRL + @param cert The X509Certificate or + {@link org.bouncycastle.x509.X509AttributeCertificate} for + which the CRL should be searched. + @param currentDate The date for which the delta CRLs must be valid. + @param paramsPKIX The extended PKIX parameters. + @return A Set of X509CRLs with complete + CRLs. + @throws Exception if an exception occurs while picking the CRLs + or no CRLs are found. + + + Fetches delta CRLs according to RFC 3280 section 5.2.4. + + @param currentDate The date for which the delta CRLs must be valid. + @param paramsPKIX The extended PKIX parameters. + @param completeCRL The complete CRL the delta CRL is for. + @return A Set of X509CRLs with delta CRLs. + @throws Exception if an exception occurs while picking the delta + CRLs. + + + Find the issuer certificates of a given certificate. + + @param cert + The certificate for which an issuer should be found. + @param pkixParams + @return A Collection object containing the issuer + X509Certificates. Never null. + + @exception Exception + if an error occurs. + + + + Extract the value of the given extension, if it exists. + + The extension object. + The object identifier to obtain. + Asn1Object + if the extension cannot be read. + + + + crl checking + Return a Collection of all CRLs found in the X509Store's that are + matching the crlSelect criteriums. + + a {@link X509CRLStoreSelector} object that will be used + to select the CRLs + a List containing only {@link org.bouncycastle.x509.X509Store + X509Store} objects. These are used to search for CRLs + a Collection of all found {@link X509CRL X509CRL} objects. May be + empty but never null. + + + + Returns the intersection of the permitted IP ranges in + permitted with ip. + + @param permitted A Set of permitted IP addresses with + their subnet mask as byte arrays. + @param ips The IP address with its subnet mask. + @return The Set of permitted IP ranges intersected with + ip. + + + Returns the union of the excluded IP ranges in excluded + with ip. + + @param excluded A Set of excluded IP addresses with their + subnet mask as byte arrays. + @param ip The IP address with its subnet mask. + @return The Set of excluded IP ranges unified with + ip as byte arrays. + + + Calculates the union if two IP ranges. + + @param ipWithSubmask1 The first IP address with its subnet mask. + @param ipWithSubmask2 The second IP address with its subnet mask. + @return A Set with the union of both addresses. + + + Calculates the interesction if two IP ranges. + + @param ipWithSubmask1 The first IP address with its subnet mask. + @param ipWithSubmask2 The second IP address with its subnet mask. + @return A Set with the single IP address with its subnet + mask as a byte array or an empty Set. + + + Concatenates the IP address with its subnet mask. + + @param ip The IP address. + @param subnetMask Its subnet mask. + @return The concatenated IP address with its subnet mask. + + + Splits the IP addresses and their subnet mask. + + @param ipWithSubmask1 The first IP address with the subnet mask. + @param ipWithSubmask2 The second IP address with the subnet mask. + @return An array with two elements. Each element contains the IP address + and the subnet mask in this order. + + + Based on the two IP addresses and their subnet masks the IP range is + computed for each IP address - subnet mask pair and returned as the + minimum IP address and the maximum address of the range. + + @param ip1 The first IP address. + @param subnetmask1 The subnet mask of the first IP address. + @param ip2 The second IP address. + @param subnetmask2 The subnet mask of the second IP address. + @return A array with two elements. The first/second element contains the + min and max IP address of the first/second IP address and its + subnet mask. + + + Checks if the IP address ip is constrained by + constraint. + + @param constraint The constraint. This is an IP address concatenated with + its subnetmask. + @param ip The IP address. + @return true if constrained, false + otherwise. + + + Checks if the IP ip is included in the permitted ISet + permitted. + + @param permitted A Set of permitted IP addresses with + their subnet mask as byte arrays. + @param ip The IP address. + @throws PkixNameConstraintValidatorException + if the IP is not permitted. + + + Checks if the IP ip is included in the excluded ISet + excluded. + + @param excluded A Set of excluded IP addresses with their + subnet mask as byte arrays. + @param ip The IP address. + @throws PkixNameConstraintValidatorException + if the IP is excluded. + + + The common part of email1 and email2 is + added to the union union. If email1 and + email2 have nothing in common they are added both. + + @param email1 Email address constraint 1. + @param email2 Email address constraint 2. + @param union The union. + + + The most restricting part from email1 and + email2 is added to the intersection intersect. + + @param email1 Email address constraint 1. + @param email2 Email address constraint 2. + @param intersect The intersection. + + + Checks if the given GeneralName is in the permitted ISet. + + @param name The GeneralName + @throws PkixNameConstraintValidatorException + If the name + + + Check if the given GeneralName is contained in the excluded ISet. + + @param name The GeneralName. + @throws PkixNameConstraintValidatorException + If the name is + excluded. + + + Updates the permitted ISet of these name constraints with the intersection + with the given subtree. + + @param permitted The permitted subtrees + + + Adds a subtree to the excluded ISet of these name constraints. + + @param subtree A subtree with an excluded GeneralName. + + + Returns the maximum IP address. + + @param ip1 The first IP address. + @param ip2 The second IP address. + @return The maximum IP address. + + + Returns the minimum IP address. + + @param ip1 The first IP address. + @param ip2 The second IP address. + @return The minimum IP address. + + + Compares IP address ip1 with ip2. If ip1 + is equal to ip2 0 is returned. If ip1 is bigger 1 is returned, -1 + otherwise. + + @param ip1 The first IP address. + @param ip2 The second IP address. + @return 0 if ip1 is equal to ip2, 1 if ip1 is bigger, -1 otherwise. + + + Returns the logical OR of the IP addresses ip1 and + ip2. + + @param ip1 The first IP address. + @param ip2 The second IP address. + @return The OR of ip1 and ip2. + + + Stringifies an IPv4 or v6 address with subnet mask. + + @param ip The IP with subnet mask. + @return The stringified IP address. + + + + Summary description for PkixParameters. + + + + This is the default PKIX validity model. Actually there are two variants + of this: The PKIX model and the modified PKIX model. The PKIX model + verifies that all involved certificates must have been valid at the + current time. The modified PKIX model verifies that all involved + certificates were valid at the signing time. Both are indirectly choosen + with the {@link PKIXParameters#setDate(java.util.Date)} method, so this + methods sets the Date when all certificates must have been + valid. + + + This model uses the following validity model. Each certificate must have + been valid at the moment where is was used. That means the end + certificate must have been valid at the time the signature was done. The + CA certificate which signed the end certificate must have been valid, + when the end certificate was signed. The CA (or Root CA) certificate must + have been valid, when the CA certificate was signed and so on. So the + {@link PKIXParameters#setDate(java.util.Date)} method sets the time, when + the end certificate must have been valid.

    It is used e.g. + in the German signature law. + + + Creates an instance of PKIXParameters with the specified Set of + most-trusted CAs. Each element of the set is a TrustAnchor.
    +
    + Note that the Set is copied to protect against subsequent modifications. + + @param trustAnchors + a Set of TrustAnchors + + @exception InvalidAlgorithmParameterException + if the specified Set is empty + (trustAnchors.isEmpty() == true) + @exception NullPointerException + if the specified Set is null + @exception ClassCastException + if any of the elements in the Set are not of type + java.security.cert.TrustAnchor +
    + + Returns the required constraints on the target certificate. The + constraints are returned as an instance of CertSelector. If + null, no constraints are defined.
    +
    + Note that the CertSelector returned is cloned to protect against + subsequent modifications. + + @return a CertSelector specifying the constraints on the target + certificate (or null) + + @see #setTargetCertConstraints(CertSelector) +
    + + Sets the required constraints on the target certificate. The constraints + are specified as an instance of CertSelector. If null, no constraints are + defined.
    +
    + Note that the CertSelector specified is cloned to protect against + subsequent modifications. + + @param selector + a CertSelector specifying the constraints on the target + certificate (or null) + + @see #getTargetCertConstraints() +
    + + Returns an immutable Set of initial policy identifiers (OID strings), + indicating that any one of these policies would be acceptable to the + certificate user for the purposes of certification path processing. The + default return value is an empty Set, which is + interpreted as meaning that any policy would be acceptable. + + @return an immutable Set of initial policy OIDs in String + format, or an empty Set (implying any policy is + acceptable). Never returns null. + + @see #setInitialPolicies(java.util.Set) + + + Sets the Set of initial policy identifiers (OID strings), + indicating that any one of these policies would be acceptable to the + certificate user for the purposes of certification path processing. By + default, any policy is acceptable (i.e. all policies), so a user that + wants to allow any policy as acceptable does not need to call this + method, or can call it with an empty Set (or + null).
    +
    + Note that the Set is copied to protect against subsequent modifications.
    +
    + + @param initialPolicies + a Set of initial policy OIDs in String format (or + null) + + @exception ClassCastException + if any of the elements in the set are not of type String + + @see #getInitialPolicies() +
    + + Sets a List of additional certification path checkers. If + the specified List contains an object that is not a PKIXCertPathChecker, + it is ignored.
    +
    + Each PKIXCertPathChecker specified implements additional + checks on a certificate. Typically, these are checks to process and + verify private extensions contained in certificates. Each + PKIXCertPathChecker should be instantiated with any + initialization parameters needed to execute the check.
    +
    + This method allows sophisticated applications to extend a PKIX + CertPathValidator or CertPathBuilder. Each + of the specified PKIXCertPathCheckers will be called, in turn, by a PKIX + CertPathValidator or CertPathBuilder for + each certificate processed or validated.
    +
    + Regardless of whether these additional PKIXCertPathCheckers are set, a + PKIX CertPathValidator or CertPathBuilder + must perform all of the required PKIX checks on each certificate. The one + exception to this rule is if the RevocationEnabled flag is set to false + (see the {@link #setRevocationEnabled(boolean) setRevocationEnabled} + method).
    +
    + Note that the List supplied here is copied and each PKIXCertPathChecker + in the list is cloned to protect against subsequent modifications. + + @param checkers + a List of PKIXCertPathCheckers. May be null, in which case no + additional checkers will be used. + @exception ClassCastException + if any of the elements in the list are not of type + java.security.cert.PKIXCertPathChecker + @see #getCertPathCheckers() +
    + + Returns the List of certification path checkers. Each PKIXCertPathChecker + in the returned IList is cloned to protect against subsequent modifications. + + @return an immutable List of PKIXCertPathCheckers (may be empty, but not + null) + + @see #setCertPathCheckers(java.util.List) + + + Adds a PKIXCertPathChecker to the list of certification + path checkers. See the {@link #setCertPathCheckers setCertPathCheckers} + method for more details. +

    + Note that the PKIXCertPathChecker is cloned to protect + against subsequent modifications.

    + + @param checker a PKIXCertPathChecker to add to the list of + checks. If null, the checker is ignored (not added to list). +
    + + Method to support Clone() under J2ME. + super.Clone() does not exist and fields are not copied. + + @param params Parameters to set. If this are + ExtendedPkixParameters they are copied to. + + + Whether delta CRLs should be used for checking the revocation status. + Defaults to false. + + + The validity model. + @see #CHAIN_VALIDITY_MODEL + @see #PKIX_VALIDITY_MODEL + + + Sets the Bouncy Castle Stores for finding CRLs, certificates, attribute + certificates or cross certificates. +

    + The IList is cloned. +

    + + @param stores A list of stores to use. + @see #getStores + @throws ClassCastException if an element of stores is not + a {@link Store}. +
    + + Adds a Bouncy Castle {@link Store} to find CRLs, certificates, attribute + certificates or cross certificates. +

    + This method should be used to add local stores, like collection based + X.509 stores, if available. Local stores should be considered first, + before trying to use additional (remote) locations, because they do not + need possible additional network traffic. +

    + If store is null it is ignored. +

    + + @param store The store to add. + @see #getStores +
    + + Adds an additional Bouncy Castle {@link Store} to find CRLs, certificates, + attribute certificates or cross certificates. +

    + You should not use this method. This method is used for adding additional + X.509 stores, which are used to add (remote) locations, e.g. LDAP, found + during X.509 object processing, e.g. in certificates or CRLs. This method + is used in PKIX certification path processing. +

    + If store is null it is ignored. +

    + + @param store The store to add. + @see #getStores() +
    + + Returns an IList of additional Bouncy Castle + Stores used for finding CRLs, certificates, attribute + certificates or cross certificates. + + @return an immutable IList of additional Bouncy Castle + Stores. Never null. + + @see #addAddionalStore(Store) + + + Returns an IList of Bouncy Castle + Stores used for finding CRLs, certificates, attribute + certificates or cross certificates. + + @return an immutable IList of Bouncy Castle + Stores. Never null. + + @see #setStores(IList) + + + Returns if additional {@link X509Store}s for locations like LDAP found + in certificates or CRLs should be used. + + @return Returns true if additional stores are used. + + + Sets if additional {@link X509Store}s for locations like LDAP found in + certificates or CRLs should be used. + + @param enabled true if additional stores are used. + + + Returns the required constraints on the target certificate or attribute + certificate. The constraints are returned as an instance of + IX509Selector. If null, no constraints are + defined. + +

    + The target certificate in a PKIX path may be a certificate or an + attribute certificate. +

    + Note that the IX509Selector returned is cloned to protect + against subsequent modifications. +

    + @return a IX509Selector specifying the constraints on the + target certificate or attribute certificate (or null) + @see #setTargetConstraints + @see X509CertStoreSelector + @see X509AttributeCertStoreSelector +
    + + Sets the required constraints on the target certificate or attribute + certificate. The constraints are specified as an instance of + IX509Selector. If null, no constraints are + defined. +

    + The target certificate in a PKIX path may be a certificate or an + attribute certificate. +

    + Note that the IX509Selector specified is cloned to protect + against subsequent modifications. +

    + + @param selector a IX509Selector specifying the constraints on + the target certificate or attribute certificate (or + null) + @see #getTargetConstraints + @see X509CertStoreSelector + @see X509AttributeCertStoreSelector +
    + + Returns the trusted attribute certificate issuers. If attribute + certificates is verified the trusted AC issuers must be set. +

    + The returned ISet consists of TrustAnchors. +

    + The returned ISet is immutable. Never null +

    + + @return Returns an immutable set of the trusted AC issuers. +
    + + Sets the trusted attribute certificate issuers. If attribute certificates + is verified the trusted AC issuers must be set. +

    + The trustedACIssuers must be a ISet of + TrustAnchor +

    + The given set is cloned. +

    + + @param trustedACIssuers The trusted AC issuers to set. Is never + null. + @throws ClassCastException if an element of stores is not + a TrustAnchor. +
    + + Returns the necessary attributes which must be contained in an attribute + certificate. +

    + The returned ISet is immutable and contains + Strings with the OIDs. +

    + + @return Returns the necessary AC attributes. +
    + + Sets the necessary which must be contained in an attribute certificate. +

    + The ISet must contain Strings with the + OIDs. +

    + The set is cloned. +

    + + @param necessaryACAttributes The necessary AC attributes to set. + @throws ClassCastException if an element of + necessaryACAttributes is not a + String. +
    + + Returns the attribute certificates which are not allowed. +

    + The returned ISet is immutable and contains + Strings with the OIDs. +

    + + @return Returns the prohibited AC attributes. Is never null. +
    + + Sets the attribute certificates which are not allowed. +

    + The ISet must contain Strings with the + OIDs. +

    + The set is cloned. +

    + + @param prohibitedACAttributes The prohibited AC attributes to set. + @throws ClassCastException if an element of + prohibitedACAttributes is not a + String. +
    + + Returns the attribute certificate checker. The returned set contains + {@link PKIXAttrCertChecker}s and is immutable. + + @return Returns the attribute certificate checker. Is never + null. + + + Sets the attribute certificate checkers. +

    + All elements in the ISet must a {@link PKIXAttrCertChecker}. +

    +

    + The given set is cloned. +

    + + @param attrCertCheckers The attribute certificate checkers to set. Is + never null. + @throws ClassCastException if an element of attrCertCheckers + is not a PKIXAttrCertChecker. +
    + + + Summary description for PkixPolicyNode. + + + + Constructors + + + + This class helps to handle CRL revocation reasons mask. Each CRL handles a + certain set of revocation reasons. + + + + + Constructs are reason mask with the reasons. + + The reasons. + + + + A reason mask with no reason. + + + + + A mask with all revocation reasons. + + + + Adds all reasons from the reasons mask to this mask. + + @param mask The reasons mask to add. + + + + Returns true if this reasons mask contains all possible + reasons. + + true if this reasons mask contains all possible reasons. + + + + + Intersects this mask with the given reasons mask. + + mask The mask to intersect with. + The intersection of this and teh given mask. + + + + Returns true if the passed reasons mask has new reasons. + + The reasons mask which should be tested for new reasons. + true if the passed reasons mask has new reasons. + + + + Returns the reasons in this mask. + + + + If the complete CRL includes an issuing distribution point (IDP) CRL + extension check the following: +

    + (i) If the distribution point name is present in the IDP CRL extension + and the distribution field is present in the DP, then verify that one of + the names in the IDP matches one of the names in the DP. If the + distribution point name is present in the IDP CRL extension and the + distribution field is omitted from the DP, then verify that one of the + names in the IDP matches one of the names in the cRLIssuer field of the + DP. +

    +

    + (ii) If the onlyContainsUserCerts boolean is asserted in the IDP CRL + extension, verify that the certificate does not include the basic + constraints extension with the cA boolean asserted. +

    +

    + (iii) If the onlyContainsCACerts boolean is asserted in the IDP CRL + extension, verify that the certificate includes the basic constraints + extension with the cA boolean asserted. +

    +

    + (iv) Verify that the onlyContainsAttributeCerts boolean is not asserted. +

    + + @param dp The distribution point. + @param cert The certificate. + @param crl The CRL. + @throws AnnotatedException if one of the conditions is not met or an error occurs. +
    + + If the DP includes cRLIssuer, then verify that the issuer field in the + complete CRL matches cRLIssuer in the DP and that the complete CRL + contains an + g distribution point extension with the indirectCRL + boolean asserted. Otherwise, verify that the CRL issuer matches the + certificate issuer. + + @param dp The distribution point. + @param cert The certificate ot attribute certificate. + @param crl The CRL for cert. + @throws AnnotatedException if one of the above conditions does not apply or an error + occurs. + + + Obtain and validate the certification path for the complete CRL issuer. + If a key usage extension is present in the CRL issuer's certificate, + verify that the cRLSign bit is set. + + @param crl CRL which contains revocation information for the certificate + cert. + @param cert The attribute certificate or certificate to check if it is + revoked. + @param defaultCRLSignCert The issuer certificate of the certificate cert. + @param defaultCRLSignKey The public key of the issuer certificate + defaultCRLSignCert. + @param paramsPKIX paramsPKIX PKIX parameters. + @param certPathCerts The certificates on the certification path. + @return A Set with all keys of possible CRL issuer + certificates. + @throws AnnotatedException if the CRL is not valid or the status cannot be checked or + some error occurs. + + + Checks a distribution point for revocation information for the + certificate cert. + + @param dp The distribution point to consider. + @param paramsPKIX PKIX parameters. + @param cert Certificate to check if it is revoked. + @param validDate The date when the certificate revocation status should be + checked. + @param defaultCRLSignCert The issuer certificate of the certificate cert. + @param defaultCRLSignKey The public key of the issuer certificate + defaultCRLSignCert. + @param certStatus The current certificate revocation status. + @param reasonMask The reasons mask which is already checked. + @param certPathCerts The certificates of the certification path. + @throws AnnotatedException if the certificate is revoked or the status cannot be checked + or some error occurs. + + + Checks a certificate if it is revoked. + + @param paramsPKIX PKIX parameters. + @param cert Certificate to check if it is revoked. + @param validDate The date when the certificate revocation status should be + checked. + @param sign The issuer certificate of the certificate cert. + @param workingPublicKey The public key of the issuer certificate sign. + @param certPathCerts The certificates of the certification path. + @throws AnnotatedException if the certificate is revoked or the status cannot be checked + or some error occurs. + + + If use-deltas is set, verify the issuer and scope of the delta CRL. + + @param deltaCRL The delta CRL. + @param completeCRL The complete CRL. + @param pkixParams The PKIX paramaters. + @throws AnnotatedException if an exception occurs. + + + Checks if an attribute certificate is revoked. + + @param attrCert Attribute certificate to check if it is revoked. + @param paramsPKIX PKIX parameters. + @param issuerCert The issuer certificate of the attribute certificate + attrCert. + @param validDate The date when the certificate revocation status should + be checked. + @param certPathCerts The certificates of the certification path to be + checked. + + @throws CertPathValidatorException if the certificate is revoked or the + status cannot be checked or some error occurs. + + + Searches for a holder public key certificate and verifies its + certification path. + + @param attrCert the attribute certificate. + @param pkixParams The PKIX parameters. + @return The certificate path of the holder certificate. + @throws Exception if +
      +
    • no public key certificate can be found although holder + information is given by an entity name or a base certificate + ID
    • +
    • support classes cannot be created
    • +
    • no certification path for the public key certificate can + be built
    • +
    +
    + + + Checks a distribution point for revocation information for the + certificate attrCert. + + @param dp The distribution point to consider. + @param attrCert The attribute certificate which should be checked. + @param paramsPKIX PKIX parameters. + @param validDate The date when the certificate revocation status should + be checked. + @param issuerCert Certificate to check if it is revoked. + @param reasonMask The reasons mask which is already checked. + @param certPathCerts The certificates of the certification path to be + checked. + @throws Exception if the certificate is revoked or the status + cannot be checked or some error occurs. + + + + A trust anchor or most-trusted Certification Authority (CA). + + This class represents a "most-trusted CA", which is used as a trust anchor + for validating X.509 certification paths. A most-trusted CA includes the + public key of the CA, the CA's name, and any constraints upon the set of + paths which may be validated using this key. These parameters can be + specified in the form of a trusted X509Certificate or as individual + parameters. + + + + + Creates an instance of TrustAnchor with the specified X509Certificate and + optional name constraints, which are intended to be used as additional + constraints when validating an X.509 certification path. + The name constraints are specified as a byte array. This byte array + should contain the DER encoded form of the name constraints, as they + would appear in the NameConstraints structure defined in RFC 2459 and + X.509. The ASN.1 definition of this structure appears below. + +
    +            	NameConstraints ::= SEQUENCE {
    +            		permittedSubtrees       [0]     GeneralSubtrees OPTIONAL,
    +            		excludedSubtrees        [1]     GeneralSubtrees OPTIONAL }
    +            	   
    +             GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
    +             
    +            		GeneralSubtree ::= SEQUENCE {
    +            		base                    GeneralName,
    +            		minimum         [0]     BaseDistance DEFAULT 0,
    +            		maximum         [1]     BaseDistance OPTIONAL }
    +            		
    +            		BaseDistance ::= INTEGER (0..MAX)
    +            
    +            		GeneralName ::= CHOICE {
    +            		otherName                       [0]     OtherName,
    +            		rfc822Name                      [1]     IA5String,
    +            		dNSName                         [2]     IA5String,
    +            		x400Address                     [3]     ORAddress,
    +            		directoryName                   [4]     Name,
    +            		ediPartyName                    [5]     EDIPartyName,
    +            		uniformResourceIdentifier       [6]     IA5String,
    +            		iPAddress                       [7]     OCTET STRING,
    +            		registeredID                    [8]     OBJECT IDENTIFIER}
    +            	
    + + Note that the name constraints byte array supplied is cloned to protect + against subsequent modifications. +
    + a trusted X509Certificate + a byte array containing the ASN.1 DER encoding of a + NameConstraints extension to be used for checking name + constraints. Only the value of the extension is included, not + the OID or criticality flag. Specify null to omit the + parameter. + if the specified X509Certificate is null +
    + + + Creates an instance of TrustAnchor where the + most-trusted CA is specified as an X500Principal and public key. + + +

    + Name constraints are an optional parameter, and are intended to be used + as additional constraints when validating an X.509 certification path. +

    + The name constraints are specified as a byte array. This byte array + contains the DER encoded form of the name constraints, as they + would appear in the NameConstraints structure defined in RFC 2459 + and X.509. The ASN.1 notation for this structure is supplied in the + documentation for the other constructors. +

    + Note that the name constraints byte array supplied here is cloned to + protect against subsequent modifications. +

    +
    + the name of the most-trusted CA as X509Name + the public key of the most-trusted CA + + a byte array containing the ASN.1 DER encoding of a NameConstraints extension to + be used for checking name constraints. Only the value of the extension is included, + not the OID or criticality flag. Specify null to omit the parameter. + + + if caPrincipal or pubKey is null + +
    + + + Creates an instance of TrustAnchor where the most-trusted + CA is specified as a distinguished name and public key. Name constraints + are an optional parameter, and are intended to be used as additional + constraints when validating an X.509 certification path. +
    + The name constraints are specified as a byte array. This byte array + contains the DER encoded form of the name constraints, as they would + appear in the NameConstraints structure defined in RFC 2459 and X.509. +
    + the X.500 distinguished name of the most-trusted CA in RFC + 2253 string format + the public key of the most-trusted CA + a byte array containing the ASN.1 DER encoding of a + NameConstraints extension to be used for checking name + constraints. Only the value of the extension is included, not + the OID or criticality flag. Specify null to omit the + parameter. + throws NullPointerException, IllegalArgumentException +
    + + + Returns the most-trusted CA certificate. + + + + + Returns the name of the most-trusted CA as an X509Name. + + + + + Returns the name of the most-trusted CA in RFC 2253 string format. + + + + + Returns the public key of the most-trusted CA. + + + + + Decode the name constraints and clone them if not null. + + + + + Returns a formatted string describing the TrustAnchor. + + a formatted string describing the TrustAnchor + + + Base class for an RFC 3161 Time Stamp Request. + + + Create a TimeStampRequest from the past in byte array. + + @param req byte array containing the request. + @throws IOException if the request is malformed. + + + Create a TimeStampRequest from the past in input stream. + + @param in input stream containing the request. + @throws IOException if the request is malformed. + + + Validate the timestamp request, checking the digest to see if it is of an + accepted type and whether it is of the correct length for the algorithm specified. + + @param algorithms a set of string OIDS giving accepted algorithms. + @param policies if non-null a set of policies we are willing to sign under. + @param extensions if non-null a set of extensions we are willing to accept. + @throws TspException if the request is invalid, or processing fails. + + + return the ASN.1 encoded representation of this object. + + + Generator for RFC 3161 Time Stamp Request objects. + + + add a given extension field for the standard extensions tag (tag 3) + @throws IOException + + + add a given extension field for the standard extensions tag + The value parameter becomes the contents of the octet string associated + with the extension. + + + add a given extension field for the standard extensions tag (tag 3) + @throws IOException + + + add a given extension field for the standard extensions tag + The value parameter becomes the contents of the octet string associated + with the extension. + + + Base class for an RFC 3161 Time Stamp Response object. + + + Create a TimeStampResponse from a byte array containing an ASN.1 encoding. + + @param resp the byte array containing the encoded response. + @throws TspException if the response is malformed. + @throws IOException if the byte array doesn't represent an ASN.1 encoding. + + + Create a TimeStampResponse from an input stream containing an ASN.1 encoding. + + @param input the input stream containing the encoded response. + @throws TspException if the response is malformed. + @throws IOException if the stream doesn't represent an ASN.1 encoding. + + + Check this response against to see if it a well formed response for + the passed in request. Validation will include checking the time stamp + token if the response status is GRANTED or GRANTED_WITH_MODS. + + @param request the request to be checked against + @throws TspException if the request can not match this response. + + + return the ASN.1 encoded representation of this object. + + + Generator for RFC 3161 Time Stamp Responses. + + + Return an appropriate TimeStampResponse. +

    + If genTime is null a timeNotAvailable error response will be returned. + + @param request the request this response is for. + @param serialNumber serial number for the response token. + @param genTime generation time for the response token. + @param provider provider to use for signature calculation. + @return + @throws NoSuchAlgorithmException + @throws NoSuchProviderException + @throws TSPException +

    +
    + + Generate a TimeStampResponse with chosen status and FailInfoField. + + @param status the PKIStatus to set. + @param failInfoField the FailInfoField to set. + @param statusString an optional string describing the failure. + @return a TimeStampResponse with a failInfoField and optional statusString + @throws TSPException in case the response could not be created + + + Validate the time stamp token. +

    + To be valid the token must be signed by the passed in certificate and + the certificate must be the one referred to by the SigningCertificate + attribute included in the hashed attributes of the token. The + certificate must also have the ExtendedKeyUsageExtension with only + KeyPurposeID.IdKPTimeStamping and have been valid at the time the + timestamp was created. +

    +

    + A successful call to validate means all the above are true. +

    +
    + + Return the underlying CmsSignedData object. + + @return the underlying CMS structure. + + + Return a ASN.1 encoded byte stream representing the encoded object. + + @throws IOException if encoding fails. + + + return the ASN.1 encoded representation of this object using the specified encoding. + + @param encoding the ASN.1 encoding format to use ("BER" or "DER"). + + + basic creation - only the default attributes will be included here. + + + create with a signer with extra signed/unsigned attributes. + + + @return the nonce value, null if there isn't one. + + + Recognised hash algorithms for the time stamp protocol. + + + Fetches the signature time-stamp attributes from a SignerInformation object. + Checks that the MessageImprint for each time-stamp matches the signature field. + (see RFC 3161 Appendix A). + + @param signerInfo a SignerInformation to search for time-stamps + @return a collection of TimeStampToken objects + @throws TSPValidationException + + + Validate the passed in certificate as being of the correct type to be used + for time stamping. To be valid it must have an ExtendedKeyUsage extension + which has a key purpose identifier of id-kp-timeStamping. + + @param cert the certificate of interest. + @throws TspValidationException if the certicate fails on one of the check points. + + + + Return the digest algorithm using one of the standard JCA string + representations rather than the algorithm identifier (if possible). + + + + Exception thrown if a TSP request or response fails to validate. +

    + If a failure code is associated with the exception it can be retrieved using + the getFailureCode() method.

    +
    + + Return the failure code associated with this exception - if one is set. + + @return the failure code if set, -1 otherwise. + + + General array utilities. + + + + Are two arrays equal. + + Left side. + Right side. + True if equal. + + + + A constant time equals comparison - does not terminate early if + test will fail. + + first array + second array + true if arrays equal, false otherwise. + + + Make a copy of a range of bytes from the passed in data array. The range can + extend beyond the end of the input array, in which case the return array will + be padded with zeroes. + + @param data the array from which the data is to be copied. + @param from the start index at which the copying should take place. + @param to the final index of the range (exclusive). + + @return a new byte array containing the range given. + + + BigInteger utilities. + + + Return the passed in value as an unsigned byte array. + + @param value the value to be converted. + @return a byte array without a leading zero byte if present in the signed encoding. + + + Return the passed in value as an unsigned byte array of the specified length, padded with + leading zeros as necessary. + @param length the fixed length of the result. + @param n the value to be converted. + @return a byte array padded to a fixed length with leading zeros. + + + Write the passed in value as unsigned bytes to the specified buffer range, padded with + leading zeros as necessary. + + @param value + the value to be converted. + @param buf + the buffer to which the value is written. + @param off + the start offset in array buf at which the data is written. + @param len + the fixed length of data written (possibly padded with leading zeros). + + + + Creates a Random BigInteger from the secure random of a given bit length. + + + + + + + Return a random BigInteger not less than 'min' and not greater than 'max' + + @param min the least value that may be generated + @param max the greatest value that may be generated + @param random the source of randomness + @return a random BigInteger value in the range [min,max] + + + + Return the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC) for a given DateTime value. + + A UTC DateTime value not before epoch. + Number of whole milliseconds after epoch. + 'dateTime' is before epoch. + + + + Create a DateTime value from the number of milliseconds since the Unix epoch (1 Jan., 1970 UTC). + + Number of milliseconds since the epoch. + A UTC DateTime value + + + + Return the current number of milliseconds since the Unix epoch (1 Jan., 1970 UTC). + + + + encode the input data producing a base 64 encoded byte array. + + @return a byte array containing the base 64 encoded data. + + + encode the input data producing a base 64 encoded byte array. + + @return a byte array containing the base 64 encoded data. + + + Encode the byte data to base 64 writing it to the given output stream. + + @return the number of bytes produced. + + + Encode the byte data to base 64 writing it to the given output stream. + + @return the number of bytes produced. + + + decode the base 64 encoded input data. It is assumed the input data is valid. + + @return a byte array representing the decoded data. + + + decode the base 64 encoded string data - whitespace will be ignored. + + @return a byte array representing the decoded data. + + + decode the base 64 encoded string data writing it to the given output stream, + whitespace characters will be ignored. + + @return the number of bytes produced. + + + encode the input data producing a base 64 output stream. + + @return the number of bytes produced. + + + decode the base 64 encoded byte data writing it to the given output stream, + whitespace characters will be ignored. + + @return the number of bytes produced. + + + decode the base 64 encoded string data writing it to the given output stream, + whitespace characters will be ignored. + + @return the number of bytes produced. + + + + A buffering class to allow translation from one format to another to + be done in discrete chunks. + + + + + Create a buffered Decoder. + + The translater to use. + The size of the buffer. + + + + Process one byte of data. + + Data in. + Byte array for the output. + The offset in the output byte array to start writing from. + The amount of output bytes. + + + + Process data from a byte array. + + The input data. + Start position within input data array. + Amount of data to process from input data array. + Array to store output. + Position in output array to start writing from. + The amount of output bytes. + + + + A class that allows encoding of data using a specific encoder to be processed in chunks. + + + + + Create. + + The translator to use. + Size of the chunks. + + + + Process one byte of data. + + The byte. + An array to store output in. + Offset within output array to start writing from. + + + + + Process data from a byte array. + + Input data Byte array containing data to be processed. + Start position within input data array. + Amount of input data to be processed. + Output data array. + Offset within output data array to start writing to. + The amount of data written. + + + + Class to decode and encode Hex. + + + + encode the input data producing a Hex encoded byte array. + + @return a byte array containing the Hex encoded data. + + + encode the input data producing a Hex encoded byte array. + + @return a byte array containing the Hex encoded data. + + + Hex encode the byte data writing it to the given output stream. + + @return the number of bytes produced. + + + Hex encode the byte data writing it to the given output stream. + + @return the number of bytes produced. + + + decode the Hex encoded input data. It is assumed the input data is valid. + + @return a byte array representing the decoded data. + + + decode the Hex encoded string data - whitespace will be ignored. + + @return a byte array representing the decoded data. + + + decode the Hex encoded string data writing it to the given output stream, + whitespace characters will be ignored. + + @return the number of bytes produced. + + + Decode the hexadecimal-encoded string strictly i.e. any non-hexadecimal characters will be + considered an error. + + @return a byte array representing the decoded data. + + + Decode the hexadecimal-encoded string strictly i.e. any non-hexadecimal characters will be + considered an error. + + @return a byte array representing the decoded data. + + + encode the input data producing a Hex output stream. + + @return the number of bytes produced. + + + decode the Hex encoded byte data writing it to the given output stream, + whitespace characters will be ignored. + + @return the number of bytes produced. + + + decode the Hex encoded string data writing it to the given output stream, + whitespace characters will be ignored. + + @return the number of bytes produced. + + + + A hex translator. + + + + + Return encoded block size. + + 2 + + + + Encode some data. + + Input data array. + Start position within input data array. + The amount of data to process. + The output data array. + The offset within the output data array to start writing from. + Amount of data encoded. + + + + Returns the decoded block size. + + 1 + + + + Decode data from a byte array. + + The input data array. + Start position within input data array. + The amounty of data to process. + The output data array. + The position within the output data array to start writing from. + The amount of data written. + + + Encode and decode byte arrays (typically from binary to 7-bit ASCII + encodings). + + + + Translator interface. + + + + Convert binary data to and from UrlBase64 encoding. This is identical to + Base64 encoding, except that the padding character is "." and the other + non-alphanumeric characters are "-" and "_" instead of "+" and "/". +

    + The purpose of UrlBase64 encoding is to provide a compact encoding of binary + data that is safe for use as an URL parameter. Base64 encoding does not + produce encoded values that are safe for use in URLs, since "/" can be + interpreted as a path delimiter; "+" is the encoded form of a space; and + "=" is used to separate a name from the corresponding value in an URL + parameter. +

    +
    + + Encode the input data producing a URL safe base 64 encoded byte array. + + @return a byte array containing the URL safe base 64 encoded data. + + + Encode the byte data writing it to the given output stream. + + @return the number of bytes produced. + + + Decode the URL safe base 64 encoded input data - white space will be ignored. + + @return a byte array representing the decoded data. + + + decode the URL safe base 64 encoded byte data writing it to the given output stream, + whitespace characters will be ignored. + + @return the number of bytes produced. + + + decode the URL safe base 64 encoded string data - whitespace will be ignored. + + @return a byte array representing the decoded data. + + + Decode the URL safe base 64 encoded string data writing it to the given output stream, + whitespace characters will be ignored. + + @return the number of bytes produced. + + + Convert binary data to and from UrlBase64 encoding. This is identical to + Base64 encoding, except that the padding character is "." and the other + non-alphanumeric characters are "-" and "_" instead of "+" and "/". +

    + The purpose of UrlBase64 encoding is to provide a compact encoding of binary + data that is safe for use as an URL parameter. Base64 encoding does not + produce encoded values that are safe for use in URLs, since "/" can be + interpreted as a path delimiter; "+" is the encoded form of a space; and + "=" is used to separate a name from the corresponding value in an URL + parameter. +

    +
    + + + Produce a copy of this object with its configuration and in its current state. + + + The returned object may be used simply to store the state, or may be used as a similar object + starting from the copied state. + + + + + Restore a copied object state into this object. + + + Implementations of this method should try to avoid or minimise memory allocation to perform the reset. + + an object originally {@link #copy() copied} from an object of the same type as this instance. + if the provided object is not of the correct type. + if the other parameter is in some other way invalid. + + + + A + + + + + + A + + + A + + + + + + A + + + + + A generic PEM writer, based on RFC 1421 + + + Base constructor. + + @param out output stream to use. + + + Return the number of bytes or characters required to contain the + passed in object if it is PEM encoded. + + @param obj pem object to be output + @return an estimate of the number of bytes + + + + Pipe all bytes from inStr to outStr, throwing StreamFlowException if greater + than limit bytes in inStr. + + + A + + + A + + + A + + The number of bytes actually transferred, if not greater than limit + + + + + + + + + + Exception to be thrown on a failure to reset an object implementing Memoable. +

    + The exception extends InvalidCastException to enable users to have a single handling case, + only introducing specific handling of this one if required. +

    +
    + + Basic Constructor. + + @param msg message to be associated with this exception. + + + Validate the given IPv4 or IPv6 address. + + @param address the IP address as a string. + + @return true if a valid address, false otherwise + + + Validate the given IPv4 or IPv6 address and netmask. + + @param address the IP address as a string. + + @return true if a valid address with netmask, false otherwise + + + Validate the given IPv4 address. + + @param address the IP address as a string. + + @return true if a valid IPv4 address, false otherwise + + + Validate the given IPv6 address. + + @param address the IP address as a string. + + @return true if a valid IPv4 address, false otherwise + + + General string utilities. + + + + Summary description for DeflaterOutputStream. + + + + + Summary description for DeflaterOutputStream. + + + + + The Holder object. +
    +            Holder ::= SEQUENCE {
    +            	baseCertificateID   [0] IssuerSerial OPTIONAL,
    +            		-- the issuer and serial number of
    +            		-- the holder's Public Key Certificate
    +            	entityName          [1] GeneralNames OPTIONAL,
    +            		-- the name of the claimant or role
    +            	objectDigestInfo    [2] ObjectDigestInfo OPTIONAL
    +            		-- used to directly authenticate the holder,
    +            		-- for example, an executable
    +            }
    +            
    +
    +
    + + Constructs a holder for v2 attribute certificates with a hash value for + some type of object. +

    + digestedObjectType can be one of the following: +

      +
    • 0 - publicKey - A hash of the public key of the holder must be + passed.
    • +
    • 1 - publicKeyCert - A hash of the public key certificate of the + holder must be passed.
    • +
    • 2 - otherObjectDigest - A hash of some other object type must be + passed. otherObjectTypeID must not be empty.
    • +
    +

    +

    This cannot be used if a v1 attribute certificate is used.

    + + @param digestedObjectType The digest object type. + @param digestAlgorithm The algorithm identifier for the hash. + @param otherObjectTypeID The object type ID if + digestedObjectType is + otherObjectDigest. + @param objectDigest The hash value. +
    + + Returns the digest object type if an object digest info is used. +

    +

      +
    • 0 - publicKey - A hash of the public key of the holder must be + passed.
    • +
    • 1 - publicKeyCert - A hash of the public key certificate of the + holder must be passed.
    • +
    • 2 - otherObjectDigest - A hash of some other object type must be + passed. otherObjectTypeID must not be empty.
    • +
    +

    + + @return The digest object type or -1 if no object digest info is set. +
    + + Returns the other object type ID if an object digest info is used. + + @return The other object type ID or null if no object + digest info is set. + + + Returns the hash if an object digest info is used. + + @return The hash or null if no object digest info is set. + + + Returns the digest algorithm ID if an object digest info is used. + + @return The digest algorithm ID or null if no object + digest info is set. + + + Return any principal objects inside the attribute certificate holder entity names field. + + @return an array of IPrincipal objects (usually X509Name), null if no entity names field is set. + + + Return the principals associated with the issuer attached to this holder + + @return an array of principals, null if no BaseCertificateID is set. + + + Return the serial number associated with the issuer attached to this holder. + + @return the certificate serial number, null if no BaseCertificateID is set. + + + Carrying class for an attribute certificate issuer. + + + Set the issuer directly with the ASN.1 structure. + + @param issuer The issuer + + + Return any principal objects inside the attribute certificate issuer object. + An array of IPrincipal objects (usually X509Principal). + + + A high level authority key identifier. + + + Constructor which will take the byte[] returned from getExtensionValue() + + @param encodedValue a DER octet encoded string with the extension structure in it. + @throws IOException on parsing errors. + + + Create an AuthorityKeyIdentifier using the passed in certificate's public + key, issuer and serial number. + + @param certificate the certificate providing the information. + @throws CertificateParsingException if there is a problem processing the certificate + + + Create an AuthorityKeyIdentifier using just the hash of the + public key. + + @param pubKey the key to generate the hash from. + @throws InvalidKeyException if there is a problem using the key. + + + A high level subject key identifier. + + + Constructor which will take the byte[] returned from getExtensionValue() + + @param encodedValue a DER octet encoded string with the extension structure in it. + @throws IOException on parsing errors. + + + Interface for an X.509 Attribute Certificate. + + + The version number for the certificate. + + + The serial number for the certificate. + + + The UTC DateTime before which the certificate is not valid. + + + The UTC DateTime after which the certificate is not valid. + + + The holder of the certificate. + + + The issuer details for the certificate. + + + Return the attributes contained in the attribute block in the certificate. + An array of attributes. + + + Return the attributes with the same type as the passed in oid. + The object identifier we wish to match. + An array of matched attributes, null if there is no match. + + + Return an ASN.1 encoded byte array representing the attribute certificate. + An ASN.1 encoded byte array. + If the certificate cannot be encoded. + + + + Get all critical extension values, by oid + + IDictionary with string (OID) keys and Asn1OctetString values + + + + Get all non-critical extension values, by oid + + IDictionary with string (OID) keys and Asn1OctetString values + + + + A utility class that will extract X509Principal objects from X.509 certificates. +

    + Use this in preference to trying to recreate a principal from a string, not all + DNs are what they should be, so it's best to leave them encoded where they + can be.

    +
    +
    + + Return the issuer of the given cert as an X509Principal. + + + Return the subject of the given cert as an X509Principal. + + + Return the issuer of the given CRL as an X509Principal. + + + This class is an Selector like implementation to select + attribute certificates from a given set of criteria. + + @see org.bouncycastle.x509.X509AttributeCertificate + @see org.bouncycastle.x509.X509Store + + + + Decides if the given attribute certificate should be selected. + + The attribute certificate to be checked. + true if the object matches this selector. + + + The attribute certificate which must be matched. + If null is given, any will do. + + + The criteria for validity + If null is given any will do. + + + The holder. + If null is given any will do. + + + The issuer. + If null is given any will do. + + + The serial number. + If null is given any will do. + + + Adds a target name criterion for the attribute certificate to the target + information extension criteria. The X509AttributeCertificate + must contain at least one of the specified target names. +

    + Each attribute certificate may contain a target information extension + limiting the servers where this attribute certificate can be used. If + this extension is not present, the attribute certificate is not targeted + and may be accepted by any server. +

    + + @param name The name as a GeneralName (not null) +
    + + Adds a target name criterion for the attribute certificate to the target + information extension criteria. The X509AttributeCertificate + must contain at least one of the specified target names. +

    + Each attribute certificate may contain a target information extension + limiting the servers where this attribute certificate can be used. If + this extension is not present, the attribute certificate is not targeted + and may be accepted by any server. +

    + + @param name a byte array containing the name in ASN.1 DER encoded form of a GeneralName + @throws IOException if a parsing error occurs. +
    + + Adds a collection with target names criteria. If null is + given any will do. +

    + The collection consists of either GeneralName objects or byte[] arrays representing + DER encoded GeneralName structures. +

    + + @param names A collection of target names. + @throws IOException if a parsing error occurs. + @see #AddTargetName(byte[]) + @see #AddTargetName(GeneralName) +
    + + Gets the target names. The collection consists of Lists + made up of an Integer in the first entry and a DER encoded + byte array or a String in the second entry. +

    The returned collection is immutable.

    + + @return The collection of target names + @see #setTargetNames(Collection) +
    + + Adds a target group criterion for the attribute certificate to the target + information extension criteria. The X509AttributeCertificate + must contain at least one of the specified target groups. +

    + Each attribute certificate may contain a target information extension + limiting the servers where this attribute certificate can be used. If + this extension is not present, the attribute certificate is not targeted + and may be accepted by any server. +

    + + @param group The group as GeneralName form (not null) +
    + + Adds a target group criterion for the attribute certificate to the target + information extension criteria. The X509AttributeCertificate + must contain at least one of the specified target groups. +

    + Each attribute certificate may contain a target information extension + limiting the servers where this attribute certificate can be used. If + this extension is not present, the attribute certificate is not targeted + and may be accepted by any server. +

    + + @param name a byte array containing the group in ASN.1 DER encoded form of a GeneralName + @throws IOException if a parsing error occurs. +
    + + Adds a collection with target groups criteria. If null is + given any will do. +

    + The collection consists of GeneralName objects or byte[] + representing DER encoded GeneralNames. +

    + + @param names A collection of target groups. + @throws IOException if a parsing error occurs. + @see #AddTargetGroup(byte[]) + @see #AddTargetGroup(GeneralName) +
    + + Gets the target groups. The collection consists of Lists + made up of an Integer in the first entry and a DER encoded + byte array or a String in the second entry. +

    The returned collection is immutable.

    + + @return The collection of target groups. + @see #setTargetGroups(Collection) +
    + + + This class is an IX509Selector implementation to select + certificate pairs, which are e.g. used for cross certificates. The set of + criteria is given from two X509CertStoreSelector objects, + each of which, if present, must match the respective component of a pair. + + + + The certificate pair which is used for testing on equality. + + + The certificate selector for the forward part. + + + The certificate selector for the reverse part. + + + + Decides if the given certificate pair should be selected. If + obj is not a X509CertificatePair, this method + returns false. + + The X509CertificatePair to be tested. + true if the object matches this selector. + + + + An ISet of DerObjectIdentifier objects. + + + + A simple collection backed store. + + + Basic constructor. + + @param collection - initial contents for the store, this is copied. + + + Return the matches in the collection for the passed in selector. + + @param selector the selector to match against. + @return a possibly empty collection of matching objects. + + + This class contains a collection for collection based X509Stores. + + + + Constructor. +

    + The collection is copied. +

    +
    + The collection containing X.509 object types. + If collection is null. +
    + + Returns a copy of the ICollection. + + + Returns a formatted string describing the parameters. + + + + An ICollection of X509Name objects + + + + The attribute certificate being checked. This is not a criterion. + Rather, it is optional information that may help a {@link X509Store} find + CRLs that would be relevant when checking revocation for the specified + attribute certificate. If null is specified, then no such + optional information is provided. + + @param attrCert the IX509AttributeCertificate being checked (or + null) + @see #getAttrCertificateChecking() + + + If true only complete CRLs are returned. Defaults to + false. + + @return true if only complete CRLs are returned. + + + Returns if this selector must match CRLs with the delta CRL indicator + extension set. Defaults to false. + + @return Returns true if only CRLs with the delta CRL + indicator extension are selected. + + + The issuing distribution point. +

    + The issuing distribution point extension is a CRL extension which + identifies the scope and the distribution point of a CRL. The scope + contains among others information about revocation reasons contained in + the CRL. Delta CRLs and complete CRLs must have matching issuing + distribution points.

    +

    + The byte array is cloned to protect against subsequent modifications.

    +

    + You must also enable or disable this criteria with + {@link #setIssuingDistributionPointEnabled(bool)}.

    + + @param issuingDistributionPoint The issuing distribution point to set. + This is the DER encoded OCTET STRING extension value. + @see #getIssuingDistributionPoint() +
    + + Whether the issuing distribution point criteria should be applied. + Defaults to false. +

    + You may also set the issuing distribution point criteria if not a missing + issuing distribution point should be assumed.

    + + @return Returns if the issuing distribution point check is enabled. +
    + + The maximum base CRL number. Defaults to null. + + @return Returns the maximum base CRL number. + @see #setMaxBaseCRLNumber(BigInteger) + + + + A factory to produce Public Key Info Objects. + + + + + Create a Subject Public Key Info object for a given public key. + + One of ElGammalPublicKeyParameters, DSAPublicKeyParameter, DHPublicKeyParameters, RsaKeyParameters or ECPublicKeyParameters + A subject public key info object. + Throw exception if object provided is not one of the above. + + + + Create loading data from byte array. + + + + + + Create loading data from byte array. + + + + + Generates a certificate object and initializes it with the data + read from the input stream inStream. + + + Returns a (possibly empty) collection view of the certificates + read from the given input stream inStream. + + + Class for carrying the values in an X.509 Attribute. + + + @param at an object representing an attribute. + + + Create an X.509 Attribute with the type given by the passed in oid and + the value represented by an ASN.1 Set containing value. + + @param oid type of the attribute + @param value value object to go into the atribute's value set. + + + Create an X.59 Attribute with the type given by the passed in oid and the + value represented by an ASN.1 Set containing the objects in value. + + @param oid type of the attribute + @param value vector of values to go in the attribute's value set. + + + + An Object representing an X509 Certificate. + Has static methods for loading Certificates encoded in many forms that return X509Certificate Objects. + + + + + Return true if the current time is within the start and end times nominated on the certificate. + + true id certificate is valid for the current time. + + + + Return true if the nominated time is within the start and end times nominated on the certificate. + + The time to test validity against. + True if certificate is valid for nominated time. + + + + Checks if the current date is within certificate's validity period. + + + + + Checks if the given date is within certificate's validity period. + + if the certificate is expired by given date + if the certificate is not yet valid on given date + + + + Return the certificate's version. + + An integer whose value Equals the version of the cerficate. + + + + Return a BigInteger containing the serial number. + + The Serial number. + + + + Get the Issuer Distinguished Name. (Who signed the certificate.) + + And X509Object containing name and value pairs. + + + + Get the subject of this certificate. + + An X509Name object containing name and value pairs. + + + + The time that this certificate is valid from. + + A DateTime object representing that time in the local time zone. + + + + The time that this certificate is valid up to. + + A DateTime object representing that time in the local time zone. + + + + Return the Der encoded TbsCertificate data. + This is the certificate component less the signature. + To Get the whole certificate call the GetEncoded() member. + + A byte array containing the Der encoded Certificate component. + + + + The signature. + + A byte array containg the signature of the certificate. + + + + A meaningful version of the Signature Algorithm. (EG SHA1WITHRSA) + + A sting representing the signature algorithm. + + + + Get the Signature Algorithms Object ID. + + A string containg a '.' separated object id. + + + + Get the signature algorithms parameters. (EG DSA Parameters) + + A byte array containing the Der encoded version of the parameters or null if there are none. + + + + Get the issuers UID. + + A DerBitString. + + + + Get the subjects UID. + + A DerBitString. + + + + Get a key usage guidlines. + + + + + Get the public key of the subject of the certificate. + + The public key parameters. + + + + Return a Der encoded version of this certificate. + + A byte array. + + + + Verify the certificate's signature using the nominated public key. + + An appropriate public key parameter object, RsaPublicKeyParameters, DsaPublicKeyParameters or ECDsaPublicKeyParameters + True if the signature is valid. + If key submitted is not of the above nominated types. + + + + Verify the certificate's signature using a verifier created using the passed in verifier provider. + + An appropriate provider for verifying the certificate's signature. + True if the signature is valid. + If verifier provider is not appropriate or the certificate algorithm is invalid. + + + + This class contains a cross certificate pair. Cross certificates pairs may + contain two cross signed certificates from two CAs. A certificate from the + other CA to this CA is contained in the forward certificate, the certificate + from this CA to the other CA is contained in the reverse certificate. + + + + Constructor + Certificate from the other CA to this CA. + Certificate from this CA to the other CA. + + + Constructor from a ASN.1 CertificatePair structure. + The CertificatePair ASN.1 object. + + + Returns the certificate from the other CA to this CA. + + + Returns the certificate from this CA to the other CA. + + + class for dealing with X509 certificates. +

    + At the moment this will deal with "-----BEGIN CERTIFICATE-----" to "-----END CERTIFICATE-----" + base 64 encoded certs, as well as the BER binaries of certificates and some classes of PKCS#7 + objects.

    +
    + + + Create loading data from byte array. + + + + + + Create loading data from byte array. + + + + + Generates a certificate object and initializes it with the data + read from the input stream inStream. + + + Returns a (possibly empty) collection view of the certificates + read from the given input stream inStream. + + + + Create loading data from byte array. + + + + + + Create loading data from byte array. + + + + + The following extensions are listed in RFC 2459 as relevant to CRLs + + Authority Key Identifier + Issuer Alternative Name + CRL Number + Delta CRL Indicator (critical) + Issuing Distribution Point (critical) + + + + Verify the CRL's signature using a verifier created using the passed in verifier provider. + + An appropriate provider for verifying the CRL's signature. + True if the signature is valid. + If verifier provider is not appropriate or the CRL algorithm is invalid. + + + Returns a string representation of this CRL. + + @return a string representation of this CRL. + + + Checks whether the given certificate is on this CRL. + + @param cert the certificate to check for. + @return true if the given certificate is on this CRL, + false otherwise. + + + The following extensions are listed in RFC 2459 as relevant to CRL Entries + + ReasonCode Hode Instruction Code Invalidity Date Certificate Issuer + (critical) + + + Constructor for CRLEntries of indirect CRLs. If isIndirect + is false {@link #getCertificateIssuer()} will always + return null, previousCertificateIssuer is + ignored. If this isIndirect is specified and this CrlEntry + has no certificate issuer CRL entry extension + previousCertificateIssuer is returned by + {@link #getCertificateIssuer()}. + + @param c + TbsCertificateList.CrlEntry object. + @param isIndirect + true if the corresponding CRL is a indirect + CRL. + @param previousCertificateIssuer + Certificate issuer of the previous CrlEntry. + + + + Create loading data from byte array. + + + + + + Create loading data from byte array. + + + + + Generates a certificate revocation list (CRL) object and initializes + it with the data read from the input stream inStream. + + + Returns a (possibly empty) collection view of the CRLs read from + the given input stream inStream. + + The inStream may contain a sequence of DER-encoded CRLs, or + a PKCS#7 CRL set. This is a PKCS#7 SignedData object, with the + only significant field being crls. In particular the signature + and the contents are ignored. + + + + Get non critical extensions. + + A set of non critical extension oids. + + + + Get any critical extensions. + + A sorted list of critical entension. + + + + Get the value of a given extension. + + The object ID of the extension. + An Asn1OctetString object if that extension is found or null if not. + + + A holding class for constructing an X509 Key Usage extension. + +
    +                id-ce-keyUsage OBJECT IDENTIFIER ::=  { id-ce 15 }
    +            
    +                KeyUsage ::= BIT STRING {
    +                     digitalSignature        (0),
    +                     nonRepudiation          (1),
    +                     keyEncipherment         (2),
    +                     dataEncipherment        (3),
    +                     keyAgreement            (4),
    +                     keyCertSign             (5),
    +                     cRLSign                 (6),
    +                     encipherOnly            (7),
    +                     decipherOnly            (8) }
    +             
    +
    + + Basic constructor. + + @param usage - the bitwise OR of the Key Usage flags giving the + allowed uses for the key. + e.g. (X509KeyUsage.keyEncipherment | X509KeyUsage.dataEncipherment) + + + Return the digest algorithm using one of the standard JCA string + representations rather than the algorithm identifier (if possible). + + + + Class to Generate X509V1 Certificates. + + + + + Default Constructor. + + + + + Reset the generator. + + + + + Set the certificate's serial number. + + Make serial numbers long, if you have no serial number policy make sure the number is at least 16 bytes of secure random data. + You will be surprised how ugly a serial number collision can get. + The serial number. + + + + Set the issuer distinguished name. + The issuer is the entity whose private key is used to sign the certificate. + + The issuers DN. + + + + Set the date that this certificate is to be valid from. + + + + + + Set the date after which this certificate will no longer be valid. + + + + + + Set the subject distinguished name. + The subject describes the entity associated with the public key. + + + + + + Set the public key that this certificate identifies. + + + + + + Set the signature algorithm that will be used to sign this certificate. + This can be either a name or an OID, names are treated as case insensitive. + + string representation of the algorithm name + + + + Generate a new X509Certificate. + + The private key of the issuer used to sign this certificate. + An X509Certificate. + + + + Generate a new X509Certificate specifying a SecureRandom instance that you would like to use. + + The private key of the issuer used to sign this certificate. + The Secure Random you want to use. + An X509Certificate. + + + + Generate a new X509Certificate using the passed in SignatureCalculator. + + A signature calculator factory with the necessary algorithm details. + An X509Certificate. + + + + Allows enumeration of the signature names supported by the generator. + + + + An implementation of a version 2 X.509 Attribute Certificate. + + + + Verify the certificate's signature using a verifier created using the passed in verifier provider. + + An appropriate provider for verifying the certificate's signature. + True if the signature is valid. + If verifier provider is not appropriate or the certificate algorithm is invalid. + + + Class to produce an X.509 Version 2 AttributeCertificate. + + + Reset the generator + + + Set the Holder of this Attribute Certificate. + + + Set the issuer. + + + Set the serial number for the certificate. + + + + Set the signature algorithm. This can be either a name or an OID, names + are treated as case insensitive. + + The algorithm name. + + + Add an attribute. + + + Add a given extension field for the standard extensions tag. + + + + Add a given extension field for the standard extensions tag. + The value parameter becomes the contents of the octet string associated + with the extension. + + + + + Generate an X509 certificate, based on the current issuer and subject. + + + + + Generate an X509 certificate, based on the current issuer and subject, + using the supplied source of randomness, if required. + + + + + Generate a new X.509 Attribute Certificate using the passed in SignatureCalculator. + + A signature calculator factory with the necessary algorithm details. + An IX509AttributeCertificate. + + + + Allows enumeration of the signature names supported by the generator. + + + + class to produce an X.509 Version 2 CRL. + + + reset the generator + + + Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the + certificate. + + + Reason being as indicated by CrlReason, i.e. CrlReason.KeyCompromise + or 0 if CrlReason is not to be used + + + + Add a CRL entry with an Invalidity Date extension as well as a CrlReason extension. + Reason being as indicated by CrlReason, i.e. CrlReason.KeyCompromise + or 0 if CrlReason is not to be used + + + + Add a CRL entry with extensions. + + + + Add the CRLEntry objects contained in a previous CRL. + + @param other the X509Crl to source the other entries from. + + + + Set the signature algorithm that will be used to sign this CRL. + + + + + add a given extension field for the standard extensions tag (tag 0) + + + add a given extension field for the standard extensions tag (tag 0) + + + add a given extension field for the standard extensions tag (tag 0) + + + add a given extension field for the standard extensions tag (tag 0) + + + + Generate an X.509 CRL, based on the current issuer and subject. + + The private key of the issuer that is signing this certificate. + An X509Crl. + + + + Generate an X.509 CRL, based on the current issuer and subject using the specified secure random. + + The private key of the issuer that is signing this certificate. + Your Secure Random instance. + An X509Crl. + + + + Generate a new X509Crl using the passed in SignatureCalculator. + + A signature calculator factory with the necessary algorithm details. + An X509Crl. + + + + Allows enumeration of the signature names supported by the generator. + + + + + A class to Generate Version 3 X509Certificates. + + + + + Reset the Generator. + + + + + Set the certificate's serial number. + + Make serial numbers long, if you have no serial number policy make sure the number is at least 16 bytes of secure random data. + You will be surprised how ugly a serial number collision can Get. + The serial number. + + + + Set the distinguished name of the issuer. + The issuer is the entity which is signing the certificate. + + The issuer's DN. + + + + Set the date that this certificate is to be valid from. + + + + + + Set the date after which this certificate will no longer be valid. + + + + + + Set the DN of the entity that this certificate is about. + + + + + + Set the public key that this certificate identifies. + + + + + + Set the signature algorithm that will be used to sign this certificate. + + + + + + Set the subject unique ID - note: it is very rare that it is correct to do this. + + + + + + Set the issuer unique ID - note: it is very rare that it is correct to do this. + + + + + + Add a given extension field for the standard extensions tag (tag 3). + + string containing a dotted decimal Object Identifier. + Is it critical. + The value. + + + + Add an extension to this certificate. + + Its Object Identifier. + Is it critical. + The value. + + + + Add an extension using a string with a dotted decimal OID. + + string containing a dotted decimal Object Identifier. + Is it critical. + byte[] containing the value of this extension. + + + + Add an extension to this certificate. + + Its Object Identifier. + Is it critical. + byte[] containing the value of this extension. + + + + Add a given extension field for the standard extensions tag (tag 3), + copying the extension value from another certificate. + + + + add a given extension field for the standard extensions tag (tag 3) + copying the extension value from another certificate. + @throws CertificateParsingException if the extension cannot be extracted. + + + + Generate an X509Certificate. + + The private key of the issuer that is signing this certificate. + An X509Certificate. + + + + Generate an X509Certificate using your own SecureRandom. + + The private key of the issuer that is signing this certificate. + You Secure Random instance. + An X509Certificate. + + + + Generate a new X509Certificate using the passed in SignatureCalculator. + + A signature calculator factory with the necessary algorithm details. + An X509Certificate. + + + + Allows enumeration of the signature names supported by the generator. + + + + Base class for both the compress and decompress classes. + Holds common arrays, and static data. + + @author
    Keiron Liddle + + + An input stream that decompresses from the BZip2 format (with the file + header chars) to be read as any other stream. + + @author Keiron Liddle + + NB: note this class has been modified to read the leading BZ from the + start of the BZIP2 stream to make it compatible with other PGP programs. + + + An output stream that compresses into the BZip2 format (with the file + header chars) into another stream. + + @author Keiron Liddle + + TODO: Update to BZip2 1.0.1 + NB: note this class has been modified to add a leading BZ to the + start of the BZIP2 stream to make it compatible with other PGP programs. + + + + modified by Oliver Merkel, 010128 + + + + A simple class the hold and calculate the CRC for sanity checking + of the data. + + @author Keiron Liddle + + + + Return a salted hash based on PBKDF2 for the UTF-8 encoding of the argument text. + + Provided key text + Base64 encoded string representing the salt + + +
    +
    diff --git a/DAL/bin/Debug/DAL.dll b/DAL/bin/Debug/DAL.dll new file mode 100644 index 0000000..bef604b Binary files /dev/null and b/DAL/bin/Debug/DAL.dll differ diff --git a/DAL/bin/Debug/DAL.pdb b/DAL/bin/Debug/DAL.pdb new file mode 100644 index 0000000..50d0928 Binary files /dev/null and b/DAL/bin/Debug/DAL.pdb differ diff --git a/DAL/bin/Debug/ICSharpCode.SharpZipLib.dll b/DAL/bin/Debug/ICSharpCode.SharpZipLib.dll new file mode 100644 index 0000000..4dc2759 Binary files /dev/null and b/DAL/bin/Debug/ICSharpCode.SharpZipLib.dll differ diff --git a/DAL/bin/Debug/ICSharpCode.SharpZipLib.pdb b/DAL/bin/Debug/ICSharpCode.SharpZipLib.pdb new file mode 100644 index 0000000..dd2cee6 Binary files /dev/null and b/DAL/bin/Debug/ICSharpCode.SharpZipLib.pdb differ diff --git a/DAL/bin/Debug/ICSharpCode.SharpZipLib.xml b/DAL/bin/Debug/ICSharpCode.SharpZipLib.xml new file mode 100644 index 0000000..ada193d --- /dev/null +++ b/DAL/bin/Debug/ICSharpCode.SharpZipLib.xml @@ -0,0 +1,10977 @@ + + + + ICSharpCode.SharpZipLib + + + + + An example class to demonstrate compression and decompression of BZip2 streams. + + + + + Decompress the input writing + uncompressed data to the output stream + + The readable stream containing data to decompress. + The output stream to receive the decompressed data. + Both streams are closed on completion if true. + + + + Compress the input stream sending + result data to output stream + + The readable stream to compress. + The output stream to receive the compressed data. + Both streams are closed on completion if true. + Block size acts as compression level (1 to 9) with 1 giving + the lowest compression and 9 the highest. + + + + Defines internal values for both compression and decompression + + + + + Random numbers used to randomise repetitive blocks + + + + + When multiplied by compression parameter (1-9) gives the block size for compression + 9 gives the best compression but uses the most memory. + + + + + Backend constant + + + + + Backend constant + + + + + Backend constant + + + + + Backend constant + + + + + Backend constant + + + + + Backend constant + + + + + Backend constant + + + + + Backend constant + + + + + Backend constant + + + + + BZip2Exception represents exceptions specific to BZip2 classes and code. + + + + + Initialise a new instance of . + + + + + Initialise a new instance of with its message string. + + A that describes the error. + + + + Initialise a new instance of . + + A that describes the error. + The that caused this exception. + + + + Initializes a new instance of the BZip2Exception class with serialized data. + + + The System.Runtime.Serialization.SerializationInfo that holds the serialized + object data about the exception being thrown. + + + The System.Runtime.Serialization.StreamingContext that contains contextual information + about the source or destination. + + + + + An input stream that decompresses files in the BZip2 format + + + + + Construct instance for reading from stream + + Data source + + + + Get/set flag indicating ownership of underlying stream. + When the flag is true will close the underlying stream also. + + + + + Gets a value indicating if the stream supports reading + + + + + Gets a value indicating whether the current stream supports seeking. + + + + + Gets a value indicating whether the current stream supports writing. + This property always returns false + + + + + Gets the length in bytes of the stream. + + + + + Gets the current position of the stream. + Setting the position is not supported and will throw a NotSupportException. + + Any attempt to set the position. + + + + Flushes the stream. + + + + + Set the streams position. This operation is not supported and will throw a NotSupportedException + + A byte offset relative to the parameter. + A value of type indicating the reference point used to obtain the new position. + The new position of the stream. + Any access + + + + Sets the length of this stream to the given value. + This operation is not supported and will throw a NotSupportedExceptionortedException + + The new length for the stream. + Any access + + + + Writes a block of bytes to this stream using data from a buffer. + This operation is not supported and will throw a NotSupportedException + + The buffer to source data from. + The offset to start obtaining data from. + The number of bytes of data to write. + Any access + + + + Writes a byte to the current position in the file stream. + This operation is not supported and will throw a NotSupportedException + + The value to write. + Any access + + + + Read a sequence of bytes and advances the read position by one byte. + + Array of bytes to store values in + Offset in array to begin storing data + The maximum number of bytes to read + The total number of bytes read into the buffer. This might be less + than the number of bytes requested if that number of bytes are not + currently available or zero if the end of the stream is reached. + + + + + Closes the stream, releasing any associated resources. + + + + + Read a byte from stream advancing position + + byte read or -1 on end of stream + + + + An output stream that compresses into the BZip2 format + including file header chars into another stream. + + + + + Construct a default output stream with maximum block size + + The stream to write BZip data onto. + + + + Initialise a new instance of the + for the specified stream, using the given blocksize. + + The stream to write compressed data to. + The block size to use. + + Valid block sizes are in the range 1..9, with 1 giving + the lowest compression and 9 the highest. + + + + + Ensures that resources are freed and other cleanup operations + are performed when the garbage collector reclaims the BZip2OutputStream. + + + + + Gets or sets a flag indicating ownership of underlying stream. + When the flag is true will close the underlying stream also. + + The default value is true. + + + + Gets a value indicating whether the current stream supports reading + + + + + Gets a value indicating whether the current stream supports seeking + + + + + Gets a value indicating whether the current stream supports writing + + + + + Gets the length in bytes of the stream + + + + + Gets or sets the current position of this stream. + + + + + Sets the current position of this stream to the given value. + + The point relative to the offset from which to being seeking. + The reference point from which to begin seeking. + The new position in the stream. + + + + Sets the length of this stream to the given value. + + The new stream length. + + + + Read a byte from the stream advancing the position. + + The byte read cast to an int; -1 if end of stream. + + + + Read a block of bytes + + The buffer to read into. + The offset in the buffer to start storing data at. + The maximum number of bytes to read. + The total number of bytes read. This might be less than the number of bytes + requested if that number of bytes are not currently available, or zero + if the end of the stream is reached. + + + + Write a block of bytes to the stream + + The buffer containing data to write. + The offset of the first byte to write. + The number of bytes to write. + + + + Write a byte to the stream. + + The byte to write to the stream. + + + + Get the number of bytes written to output. + + + + + Get the number of bytes written to the output. + + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Flush output buffers + + + + + Computes Adler32 checksum for a stream of data. An Adler32 + checksum is not as reliable as a CRC32 checksum, but a lot faster to + compute. + + The specification for Adler32 may be found in RFC 1950. + ZLIB Compressed Data Format Specification version 3.3) + + + From that document: + + "ADLER32 (Adler-32 checksum) + This contains a checksum value of the uncompressed data + (excluding any dictionary data) computed according to Adler-32 + algorithm. This algorithm is a 32-bit extension and improvement + of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073 + standard. + + Adler-32 is composed of two sums accumulated per byte: s1 is + the sum of all bytes, s2 is the sum of all s1 values. Both sums + are done modulo 65521. s1 is initialized to 1, s2 to zero. The + Adler-32 checksum is stored as s2*65536 + s1 in most- + significant-byte first (network) order." + + "8.2. The Adler-32 algorithm + + The Adler-32 algorithm is much faster than the CRC32 algorithm yet + still provides an extremely low probability of undetected errors. + + The modulo on unsigned long accumulators can be delayed for 5552 + bytes, so the modulo operation time is negligible. If the bytes + are a, b, c, the second sum is 3a + 2b + c + 3, and so is position + and order sensitive, unlike the first sum, which is just a + checksum. That 65521 is prime is important to avoid a possible + large class of two-byte errors that leave the check unchanged. + (The Fletcher checksum uses 255, which is not prime and which also + makes the Fletcher check insensitive to single byte changes 0 - + 255.) + + The sum s1 is initialized to 1 instead of zero to make the length + of the sequence part of s2, so that the length does not have to be + checked separately. (Any sequence of zeroes has a Fletcher + checksum of zero.)" + + + + + + + largest prime smaller than 65536 + + + + + The CRC data checksum so far. + + + + + Initialise a default instance of + + + + + Resets the Adler32 data checksum as if no update was ever called. + + + + + Returns the Adler32 data checksum computed so far. + + + + + Updates the checksum with the byte b. + + + The data value to add. The high byte of the int is ignored. + + + + + Updates the Adler32 data checksum with the bytes taken from + a block of data. + + Contains the data to update the checksum with. + + + + Update Adler32 data checksum based on a portion of a block of data + + + The chunk of data to add + + + + + CRC-32 with unreversed data and reversed output + + + Generate a table for a byte-wise 32-bit CRC calculation on the polynomial: + x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x^1+x^0. + + Polynomials over GF(2) are represented in binary, one bit per coefficient, + with the lowest powers in the most significant bit. Then adding polynomials + is just exclusive-or, and multiplying a polynomial by x is a right shift by + one. If we call the above polynomial p, and represent a byte as the + polynomial q, also with the lowest power in the most significant bit (so the + byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, + where a mod b means the remainder after dividing a by b. + + This calculation is done using the shift-register method of multiplying and + taking the remainder. The register is initialized to zero, and for each + incoming bit, x^32 is added mod p to the register if the bit is a one (where + x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by + x (which is shifting right by one and adding x^32 mod p if the bit shifted + out is a one). We start with the highest power (least significant bit) of + q and repeat for all eight bits of q. + + This implementation uses sixteen lookup tables stored in one linear array + to implement the slicing-by-16 algorithm, a variant of the slicing-by-8 + algorithm described in this Intel white paper: + + https://web.archive.org/web/20120722193753/http://download.intel.com/technology/comms/perfnet/download/slicing-by-8.pdf + + The first lookup table is simply the CRC of all possible eight bit values. + Each successive lookup table is derived from the original table generated + by Sarwate's algorithm. Slicing a 16-bit input and XORing the outputs + together will produce the same output as a byte-by-byte CRC loop with + fewer arithmetic and bit manipulation operations, at the cost of increased + memory consumed by the lookup tables. (Slicing-by-16 requires a 16KB table, + which is still small enough to fit in most processors' L1 cache.) + + + + + The CRC data checksum so far. + + + + + Initialise a default instance of + + + + + Resets the CRC data checksum as if no update was ever called. + + + + + Returns the CRC data checksum computed so far. + + Reversed Out = true + + + + Updates the checksum with the int bval. + + + the byte is taken as the lower 8 bits of bval + + Reversed Data = false + + + + Updates the CRC data checksum with the bytes taken from + a block of data. + + Contains the data to update the CRC with. + + + + Update CRC data checksum based on a portion of a block of data + + + The chunk of data to add + + + + + Internal helper function for updating a block of data using slicing. + + The array containing the data to add + Range start for (inclusive) + The number of bytes to checksum starting from + + + + A non-inlined function for updating data that doesn't fit in a 16-byte + block. We don't expect to enter this function most of the time, and when + we do we're not here for long, so disabling inlining here improves + performance overall. + + The array containing the data to add + Range start for (inclusive) + Range end for (exclusive) + + + + CRC-32 with reversed data and unreversed output + + + Generate a table for a byte-wise 32-bit CRC calculation on the polynomial: + x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x^1+x^0. + + Polynomials over GF(2) are represented in binary, one bit per coefficient, + with the lowest powers in the most significant bit. Then adding polynomials + is just exclusive-or, and multiplying a polynomial by x is a right shift by + one. If we call the above polynomial p, and represent a byte as the + polynomial q, also with the lowest power in the most significant bit (so the + byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p, + where a mod b means the remainder after dividing a by b. + + This calculation is done using the shift-register method of multiplying and + taking the remainder. The register is initialized to zero, and for each + incoming bit, x^32 is added mod p to the register if the bit is a one (where + x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by + x (which is shifting right by one and adding x^32 mod p if the bit shifted + out is a one). We start with the highest power (least significant bit) of + q and repeat for all eight bits of q. + + This implementation uses sixteen lookup tables stored in one linear array + to implement the slicing-by-16 algorithm, a variant of the slicing-by-8 + algorithm described in this Intel white paper: + + https://web.archive.org/web/20120722193753/http://download.intel.com/technology/comms/perfnet/download/slicing-by-8.pdf + + The first lookup table is simply the CRC of all possible eight bit values. + Each successive lookup table is derived from the original table generated + by Sarwate's algorithm. Slicing a 16-bit input and XORing the outputs + together will produce the same output as a byte-by-byte CRC loop with + fewer arithmetic and bit manipulation operations, at the cost of increased + memory consumed by the lookup tables. (Slicing-by-16 requires a 16KB table, + which is still small enough to fit in most processors' L1 cache.) + + + + + The CRC data checksum so far. + + + + + Initialise a default instance of + + + + + Resets the CRC data checksum as if no update was ever called. + + + + + Returns the CRC data checksum computed so far. + + Reversed Out = false + + + + Updates the checksum with the int bval. + + + the byte is taken as the lower 8 bits of bval + + Reversed Data = true + + + + Updates the CRC data checksum with the bytes taken from + a block of data. + + Contains the data to update the CRC with. + + + + Update CRC data checksum based on a portion of a block of data + + + The chunk of data to add + + + + + Internal helper function for updating a block of data using slicing. + + The array containing the data to add + Range start for (inclusive) + The number of bytes to checksum starting from + + + + A non-inlined function for updating data that doesn't fit in a 16-byte + block. We don't expect to enter this function most of the time, and when + we do we're not here for long, so disabling inlining here improves + performance overall. + + The array containing the data to add + Range start for (inclusive) + Range end for (exclusive) + + + + The number of slicing lookup tables to generate. + + + + + Generates multiple CRC lookup tables for a given polynomial, stored + in a linear array of uints. The first block (i.e. the first 256 + elements) is the same as the byte-by-byte CRC lookup table. + + The generating CRC polynomial + Whether the polynomial is in reversed bit order + A linear array of 256 * elements + + This table could also be generated as a rectangular array, but the + JIT compiler generates slower code than if we use a linear array. + Known issue, see: https://github.com/dotnet/runtime/issues/30275 + + + + + Mixes the first four bytes of input with + using normal ordering before calling . + + Array of data to checksum + Offset to start reading from + The table to use for slicing-by-16 lookup + Checksum state before this update call + A new unfinalized checksum value + + + Assumes input[offset]..input[offset + 15] are valid array indexes. + For performance reasons, this must be checked by the caller. + + + + + Mixes the first four bytes of input with + using reflected ordering before calling . + + Array of data to checksum + Offset to start reading from + The table to use for slicing-by-16 lookup + Checksum state before this update call + A new unfinalized checksum value + + + Assumes input[offset]..input[offset + 15] are valid array indexes. + For performance reasons, this must be checked by the caller. + + + + + A shared method for updating an unfinalized CRC checksum using slicing-by-16. + + Array of data to checksum + Offset to start reading from + The table to use for slicing-by-16 lookup + First byte of input after mixing with the old CRC + Second byte of input after mixing with the old CRC + Third byte of input after mixing with the old CRC + Fourth byte of input after mixing with the old CRC + A new unfinalized checksum value + + + Even though the first four bytes of input are fed in as arguments, + should be the same value passed to this + function's caller (either or + ). This method will get inlined + into both functions, so using the same offset produces faster code. + + + Because most processors running C# have some kind of instruction-level + parallelism, the order of XOR operations can affect performance. This + ordering assumes that the assembly code generated by the just-in-time + compiler will emit a bunch of arithmetic operations for checking array + bounds. Then it opportunistically XORs a1 and a2 to keep the processor + busy while those other parts of the pipeline handle the range check + calculations. + + + + + + Interface to compute a data checksum used by checked input/output streams. + A data checksum can be updated by one byte or with a byte array. After each + update the value of the current checksum can be returned by calling + getValue. The complete checksum object can also be reset + so it can be used again with new data. + + + + + Resets the data checksum as if no update was ever called. + + + + + Returns the data checksum computed so far. + + + + + Adds one byte to the data checksum. + + + the data value to add. The high byte of the int is ignored. + + + + + Updates the data checksum with the bytes taken from the array. + + + buffer an array of bytes + + + + + Adds the byte array to the data checksum. + + + The chunk of data to add + + + + + Event arguments for scanning. + + + + + Initialise a new instance of + + The file or directory name. + + + + The file or directory name for this event. + + + + + Get set a value indicating if scanning should continue or not. + + + + + Event arguments during processing of a single file or directory. + + + + + Initialise a new instance of + + The file or directory name if known. + The number of bytes processed so far + The total number of bytes to process, 0 if not known + + + + The name for this event if known. + + + + + Get set a value indicating whether scanning should continue or not. + + + + + Get a percentage representing how much of the has been processed + + 0.0 to 100.0 percent; 0 if target is not known. + + + + The number of bytes processed so far + + + + + The number of bytes to process. + + Target may be 0 or negative if the value isnt known. + + + + Event arguments for directories. + + + + + Initialize an instance of . + + The name for this directory. + Flag value indicating if any matching files are contained in this directory. + + + + Get a value indicating if the directory contains any matching files or not. + + + + + Arguments passed when scan failures are detected. + + + + + Initialise a new instance of + + The name to apply. + The exception to use. + + + + The applicable name. + + + + + The applicable exception. + + + + + Get / set a value indicating whether scanning should continue. + + + + + Delegate invoked before starting to process a file. + + The source of the event + The event arguments. + + + + Delegate invoked during processing of a file or directory + + The source of the event + The event arguments. + + + + Delegate invoked when a file has been completely processed. + + The source of the event + The event arguments. + + + + Delegate invoked when a directory failure is detected. + + The source of the event + The event arguments. + + + + Delegate invoked when a file failure is detected. + + The source of the event + The event arguments. + + + + FileSystemScanner provides facilities scanning of files and directories. + + + + + Initialise a new instance of + + The file filter to apply when scanning. + + + + Initialise a new instance of + + The file filter to apply. + The directory filter to apply. + + + + Initialise a new instance of + + The file filter to apply. + + + + Initialise a new instance of + + The file filter to apply. + The directory filter to apply. + + + + Delegate to invoke when a directory is processed. + + + + + Delegate to invoke when a file is processed. + + + + + Delegate to invoke when processing for a file has finished. + + + + + Delegate to invoke when a directory failure is detected. + + + + + Delegate to invoke when a file failure is detected. + + + + + Raise the DirectoryFailure event. + + The directory name. + The exception detected. + + + + Raise the FileFailure event. + + The file name. + The exception detected. + + + + Raise the ProcessFile event. + + The file name. + + + + Raise the complete file event + + The file name + + + + Raise the ProcessDirectory event. + + The directory name. + Flag indicating if the directory has matching files. + + + + Scan a directory. + + The base directory to scan. + True to recurse subdirectories, false to scan a single directory. + + + + The file filter currently in use. + + + + + The directory filter currently in use. + + + + + Flag indicating if scanning should continue running. + + + + + INameTransform defines how file system names are transformed for use with archives, or vice versa. + + + + + Given a file name determine the transformed value. + + The name to transform. + The transformed file name. + + + + Given a directory name determine the transformed value. + + The name to transform. + The transformed directory name + + + + InvalidNameException is thrown for invalid names such as directory traversal paths and names with invalid characters + + + + + Initializes a new instance of the InvalidNameException class with a default error message. + + + + + Initializes a new instance of the InvalidNameException class with a specified error message. + + A message describing the exception. + + + + Initializes a new instance of the InvalidNameException class with a specified + error message and a reference to the inner exception that is the cause of this exception. + + A message describing the exception. + The inner exception + + + + Initializes a new instance of the InvalidNameException class with serialized data. + + + The System.Runtime.Serialization.SerializationInfo that holds the serialized + object data about the exception being thrown. + + + The System.Runtime.Serialization.StreamingContext that contains contextual information + about the source or destination. + + + + + Scanning filters support filtering of names. + + + + + Test a name to see if it 'matches' the filter. + + The name to test. + Returns true if the name matches the filter, false if it does not match. + + + + NameFilter is a string matching class which allows for both positive and negative + matching. + A filter is a sequence of independant regular expressions separated by semi-colons ';'. + To include a semi-colon it may be quoted as in \;. Each expression can be prefixed by a plus '+' sign or + a minus '-' sign to denote the expression is intended to include or exclude names. + If neither a plus or minus sign is found include is the default. + A given name is tested for inclusion before checking exclusions. Only names matching an include spec + and not matching an exclude spec are deemed to match the filter. + An empty filter matches any name. + + The following expression includes all name ending in '.dat' with the exception of 'dummy.dat' + "+\.dat$;-^dummy\.dat$" + + + + + Construct an instance based on the filter expression passed + + The filter expression. + + + + Test a string to see if it is a valid regular expression. + + The expression to test. + True if expression is a valid false otherwise. + + + + Test an expression to see if it is valid as a filter. + + The filter expression to test. + True if the expression is valid, false otherwise. + + + + Split a string into its component pieces + + The original string + Returns an array of values containing the individual filter elements. + + + + Convert this filter to its string equivalent. + + The string equivalent for this filter. + + + + Test a value to see if it is included by the filter. + + The value to test. + True if the value is included, false otherwise. + + + + Test a value to see if it is excluded by the filter. + + The value to test. + True if the value is excluded, false otherwise. + + + + Test a value to see if it matches the filter. + + The value to test. + True if the value matches, false otherwise. + + + + Compile this filter. + + + + + PathFilter filters directories and files using a form of regular expressions + by full path name. + See NameFilter for more detail on filtering. + + + + + Initialise a new instance of . + + The filter expression to apply. + + + + Test a name to see if it matches the filter. + + The name to test. + True if the name matches, false otherwise. + is used to get the full path before matching. + + + + ExtendedPathFilter filters based on name, file size, and the last write time of the file. + + Provides an example of how to customise filtering. + + + + Initialise a new instance of ExtendedPathFilter. + + The filter to apply. + The minimum file size to include. + The maximum file size to include. + + + + Initialise a new instance of ExtendedPathFilter. + + The filter to apply. + The minimum to include. + The maximum to include. + + + + Initialise a new instance of ExtendedPathFilter. + + The filter to apply. + The minimum file size to include. + The maximum file size to include. + The minimum to include. + The maximum to include. + + + + Test a filename to see if it matches the filter. + + The filename to test. + True if the filter matches, false otherwise. + The doesnt exist + + + + Get/set the minimum size/length for a file that will match this filter. + + The default value is zero. + value is less than zero; greater than + + + + Get/set the maximum size/length for a file that will match this filter. + + The default value is + value is less than zero or less than + + + + Get/set the minimum value that will match for this filter. + + Files with a LastWrite time less than this value are excluded by the filter. + + + + Get/set the maximum value that will match for this filter. + + Files with a LastWrite time greater than this value are excluded by the filter. + + + + NameAndSizeFilter filters based on name and file size. + + A sample showing how filters might be extended. + + + + Initialise a new instance of NameAndSizeFilter. + + The filter to apply. + The minimum file size to include. + The maximum file size to include. + + + + Test a filename to see if it matches the filter. + + The filename to test. + True if the filter matches, false otherwise. + + + + Get/set the minimum size for a file that will match this filter. + + + + + Get/set the maximum size for a file that will match this filter. + + + + + PathUtils provides simple utilities for handling paths. + + + + + Remove any path root present in the path + + A containing path information. + The path with the root removed if it was present; path otherwise. + + + + Returns a random file name in the users temporary directory, or in directory of if specified + + If specified, used as the base file name for the temporary file + Returns a temporary file name + + + + Provides simple " utilities. + + + + + Read from a ensuring all the required data is read. + + The stream to read. + The buffer to fill. + + + + + Read from a " ensuring all the required data is read. + + The stream to read data from. + The buffer to store data in. + The offset at which to begin storing data. + The number of bytes of data to store. + Required parameter is null + and or are invalid. + End of stream is encountered before all the data has been read. + + + + Read as much data as possible from a ", up to the requested number of bytes + + The stream to read data from. + The buffer to store data in. + The offset at which to begin storing data. + The number of bytes of data to store. + Required parameter is null + and or are invalid. + + + + Copy the contents of one to another. + + The stream to source data from. + The stream to write data to. + The buffer to use during copying. + + + + Copy the contents of one to another. + + The stream to source data from. + The stream to write data to. + The buffer to use during copying. + The progress handler delegate to use. + The minimum between progress updates. + The source for this event. + The name to use with the event. + This form is specialised for use within #Zip to support events during archive operations. + + + + Copy the contents of one to another. + + The stream to source data from. + The stream to write data to. + The buffer to use during copying. + The progress handler delegate to use. + The minimum between progress updates. + The source for this event. + The name to use with the event. + A predetermined fixed target value to use with progress updates. + If the value is negative the target is calculated by looking at the stream. + This form is specialised for use within #Zip to support events during archive operations. + + + + Initialise an instance of + + + + + SharpZipBaseException is the base exception class for SharpZipLib. + All library exceptions are derived from this. + + NOTE: Not all exceptions thrown will be derived from this class. + A variety of other exceptions are possible for example + + + + Initializes a new instance of the SharpZipBaseException class. + + + + + Initializes a new instance of the SharpZipBaseException class with a specified error message. + + A message describing the exception. + + + + Initializes a new instance of the SharpZipBaseException class with a specified + error message and a reference to the inner exception that is the cause of this exception. + + A message describing the exception. + The inner exception + + + + Initializes a new instance of the SharpZipBaseException class with serialized data. + + + The System.Runtime.Serialization.SerializationInfo that holds the serialized + object data about the exception being thrown. + + + The System.Runtime.Serialization.StreamingContext that contains contextual information + about the source or destination. + + + + + Indicates that an error occurred during decoding of a input stream due to corrupt + data or (unintentional) library incompatibility. + + + + + Initializes a new instance of the StreamDecodingException with a generic message + + + + + Initializes a new instance of the StreamDecodingException class with a specified error message. + + A message describing the exception. + + + + Initializes a new instance of the StreamDecodingException class with a specified + error message and a reference to the inner exception that is the cause of this exception. + + A message describing the exception. + The inner exception + + + + Initializes a new instance of the StreamDecodingException class with serialized data. + + + The System.Runtime.Serialization.SerializationInfo that holds the serialized + object data about the exception being thrown. + + + The System.Runtime.Serialization.StreamingContext that contains contextual information + about the source or destination. + + + + + Indicates that the input stream could not decoded due to known library incompability or missing features + + + + + Initializes a new instance of the StreamUnsupportedException with a generic message + + + + + Initializes a new instance of the StreamUnsupportedException class with a specified error message. + + A message describing the exception. + + + + Initializes a new instance of the StreamUnsupportedException class with a specified + error message and a reference to the inner exception that is the cause of this exception. + + A message describing the exception. + The inner exception + + + + Initializes a new instance of the StreamUnsupportedException class with serialized data. + + + The System.Runtime.Serialization.SerializationInfo that holds the serialized + object data about the exception being thrown. + + + The System.Runtime.Serialization.StreamingContext that contains contextual information + about the source or destination. + + + + + Indicates that the input stream could not decoded due to the stream ending before enough data had been provided + + + + + Initializes a new instance of the UnexpectedEndOfStreamException with a generic message + + + + + Initializes a new instance of the UnexpectedEndOfStreamException class with a specified error message. + + A message describing the exception. + + + + Initializes a new instance of the UnexpectedEndOfStreamException class with a specified + error message and a reference to the inner exception that is the cause of this exception. + + A message describing the exception. + The inner exception + + + + Initializes a new instance of the UnexpectedEndOfStreamException class with serialized data. + + + The System.Runtime.Serialization.SerializationInfo that holds the serialized + object data about the exception being thrown. + + + The System.Runtime.Serialization.StreamingContext that contains contextual information + about the source or destination. + + + + + Indicates that a value was outside of the expected range when decoding an input stream + + + + + Initializes a new instance of the ValueOutOfRangeException class naming the causing variable + + Name of the variable, use: nameof() + + + + Initializes a new instance of the ValueOutOfRangeException class naming the causing variable, + it's current value and expected range. + + Name of the variable, use: nameof() + The invalid value + Expected maximum value + Expected minimum value + + + + Initializes a new instance of the ValueOutOfRangeException class naming the causing variable, + it's current value and expected range. + + Name of the variable, use: nameof() + The invalid value + Expected maximum value + Expected minimum value + + + + Initializes a new instance of the ValueOutOfRangeException class with serialized data. + + + The System.Runtime.Serialization.SerializationInfo that holds the serialized + object data about the exception being thrown. + + + The System.Runtime.Serialization.StreamingContext that contains contextual information + about the source or destination. + + + + + PkzipClassic embodies the classic or original encryption facilities used in Pkzip archives. + While it has been superceded by more recent and more powerful algorithms, its still in use and + is viable for preventing casual snooping + + + + + Generates new encryption keys based on given seed + + The seed value to initialise keys with. + A new key value. + + + + PkzipClassicCryptoBase provides the low level facilities for encryption + and decryption using the PkzipClassic algorithm. + + + + + Transform a single byte + + + The transformed value + + + + + Set the key schedule for encryption/decryption. + + The data use to set the keys from. + + + + Update encryption keys + + + + + Reset the internal state. + + + + + PkzipClassic CryptoTransform for encryption. + + + + + Initialise a new instance of + + The key block to use. + + + + Transforms the specified region of the specified byte array. + + The input for which to compute the transform. + The offset into the byte array from which to begin using data. + The number of bytes in the byte array to use as data. + The computed transform. + + + + Transforms the specified region of the input byte array and copies + the resulting transform to the specified region of the output byte array. + + The input for which to compute the transform. + The offset into the input byte array from which to begin using data. + The number of bytes in the input byte array to use as data. + The output to which to write the transform. + The offset into the output byte array from which to begin writing data. + The number of bytes written. + + + + Gets a value indicating whether the current transform can be reused. + + + + + Gets the size of the input data blocks in bytes. + + + + + Gets the size of the output data blocks in bytes. + + + + + Gets a value indicating whether multiple blocks can be transformed. + + + + + Cleanup internal state. + + + + + PkzipClassic CryptoTransform for decryption. + + + + + Initialise a new instance of . + + The key block to decrypt with. + + + + Transforms the specified region of the specified byte array. + + The input for which to compute the transform. + The offset into the byte array from which to begin using data. + The number of bytes in the byte array to use as data. + The computed transform. + + + + Transforms the specified region of the input byte array and copies + the resulting transform to the specified region of the output byte array. + + The input for which to compute the transform. + The offset into the input byte array from which to begin using data. + The number of bytes in the input byte array to use as data. + The output to which to write the transform. + The offset into the output byte array from which to begin writing data. + The number of bytes written. + + + + Gets a value indicating whether the current transform can be reused. + + + + + Gets the size of the input data blocks in bytes. + + + + + Gets the size of the output data blocks in bytes. + + + + + Gets a value indicating whether multiple blocks can be transformed. + + + + + Cleanup internal state. + + + + + Defines a wrapper object to access the Pkzip algorithm. + This class cannot be inherited. + + + + + Get / set the applicable block size in bits. + + The only valid block size is 8. + + + + Get an array of legal key sizes. + + + + + Generate an initial vector. + + + + + Get an array of legal block sizes. + + + + + Get / set the key value applicable. + + + + + Generate a new random key. + + + + + Create an encryptor. + + The key to use for this encryptor. + Initialisation vector for the new encryptor. + Returns a new PkzipClassic encryptor + + + + Create a decryptor. + + Keys to use for this new decryptor. + Initialisation vector for the new decryptor. + Returns a new decryptor. + + + + Encrypts and decrypts AES ZIP + + + Based on information from http://www.winzip.com/aes_info.htm + and http://www.gladman.me.uk/cryptography_technology/fileencrypt/ + + + + + Constructor + + The stream on which to perform the cryptographic transformation. + Instance of ZipAESTransform + Read or Write + + + + Reads a sequence of bytes from the current CryptoStream into buffer, + and advances the position within the stream by the number of bytes read. + + + + + + + + Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + An array of bytes. This method copies count bytes from buffer to the current stream. + The byte offset in buffer at which to begin copying bytes to the current stream. + The number of bytes to be written to the current stream. + + + + Transforms stream using AES in CTR mode + + + + + Constructor. + + Password string + Random bytes, length depends on encryption strength. + 128 bits = 8 bytes, 192 bits = 12 bytes, 256 bits = 16 bytes. + The encryption strength, in bytes eg 16 for 128 bits. + True when creating a zip, false when reading. For the AuthCode. + + + + + Implement the ICryptoTransform method. + + + + + Returns the 2 byte password verifier + + + + + Returns the 10 byte AUTH CODE to be checked or appended immediately following the AES data stream. + + + + + Not implemented. + + + + + Gets the size of the input data blocks in bytes. + + + + + Gets the size of the output data blocks in bytes. + + + + + Gets a value indicating whether multiple blocks can be transformed. + + + + + Gets a value indicating whether the current transform can be reused. + + + + + Cleanup internal state. + + + + + An example class to demonstrate compression and decompression of GZip streams. + + + + + Decompress the input writing + uncompressed data to the output stream + + The readable stream containing data to decompress. + The output stream to receive the decompressed data. + Both streams are closed on completion if true. + Input or output stream is null + + + + Compress the input stream sending + result data to output stream + + The readable stream to compress. + The output stream to receive the compressed data. + Both streams are closed on completion if true. + Deflate buffer size, minimum 512 + Deflate compression level, 0-9 + Input or output stream is null + Buffer Size is smaller than 512 + Compression level outside 0-9 + + + + This class contains constants used for gzip. + + + + + First GZip identification byte + + + + + Second GZip identification byte + + + + + Deflate compression method + + + + + Get the GZip specified encoding (CP-1252 if supported, otherwise ASCII) + + + + + GZip header flags + + + + + Text flag hinting that the file is in ASCII + + + + + CRC flag indicating that a CRC16 preceeds the data + + + + + Extra flag indicating that extra fields are present + + + + + Filename flag indicating that the original filename is present + + + + + Flag bit mask indicating that a comment is present + + + + + GZipException represents exceptions specific to GZip classes and code. + + + + + Initialise a new instance of . + + + + + Initialise a new instance of with its message string. + + A that describes the error. + + + + Initialise a new instance of . + + A that describes the error. + The that caused this exception. + + + + Initializes a new instance of the GZipException class with serialized data. + + + The System.Runtime.Serialization.SerializationInfo that holds the serialized + object data about the exception being thrown. + + + The System.Runtime.Serialization.StreamingContext that contains contextual information + about the source or destination. + + + + + This filter stream is used to decompress a "GZIP" format stream. + The "GZIP" format is described baseInputStream RFC 1952. + + author of the original java version : John Leuner + + This sample shows how to unzip a gzipped file + + using System; + using System.IO; + + using ICSharpCode.SharpZipLib.Core; + using ICSharpCode.SharpZipLib.GZip; + + class MainClass + { + public static void Main(string[] args) + { + using (Stream inStream = new GZipInputStream(File.OpenRead(args[0]))) + using (FileStream outStream = File.Create(Path.GetFileNameWithoutExtension(args[0]))) { + byte[] buffer = new byte[4096]; + StreamUtils.Copy(inStream, outStream, buffer); + } + } + } + + + + + + CRC-32 value for uncompressed data + + + + + Flag to indicate if we've read the GZIP header yet for the current member (block of compressed data). + This is tracked per-block as the file is parsed. + + + + + Flag to indicate if at least one block in a stream with concatenated blocks was read successfully. + This allows us to exit gracefully if downstream data is not in gzip format. + + + + + Creates a GZipInputStream with the default buffer size + + + The stream to read compressed data from (baseInputStream GZIP format) + + + + + Creates a GZIPInputStream with the specified buffer size + + + The stream to read compressed data from (baseInputStream GZIP format) + + + Size of the buffer to use + + + + + Reads uncompressed data into an array of bytes + + + The buffer to read uncompressed data into + + + The offset indicating where the data should be placed + + + The number of uncompressed bytes to be read + + Returns the number of bytes actually read. + + + + Retrieves the filename header field for the block last read + + + + + + This filter stream is used to compress a stream into a "GZIP" stream. + The "GZIP" format is described in RFC 1952. + + author of the original java version : John Leuner + + This sample shows how to gzip a file + + using System; + using System.IO; + + using ICSharpCode.SharpZipLib.GZip; + using ICSharpCode.SharpZipLib.Core; + + class MainClass + { + public static void Main(string[] args) + { + using (Stream s = new GZipOutputStream(File.Create(args[0] + ".gz"))) + using (FileStream fs = File.OpenRead(args[0])) { + byte[] writeData = new byte[4096]; + Streamutils.Copy(s, fs, writeData); + } + } + } + } + + + + + + CRC-32 value for uncompressed data + + + + + Creates a GzipOutputStream with the default buffer size + + + The stream to read data (to be compressed) from + + + + + Creates a GZipOutputStream with the specified buffer size + + + The stream to read data (to be compressed) from + + + Size of the buffer to use + + + + + Sets the active compression level (0-9). The new level will be activated + immediately. + + The compression level to set. + + Level specified is not supported. + + + + + + Get the current compression level. + + The current compression level. + + + + Original filename + + + + + Write given buffer to output updating crc + + Buffer to write + Offset of first byte in buf to write + Number of bytes to write + + + + Writes remaining compressed output data to the output stream + and closes it. + + + + + Flushes the stream by ensuring the header is written, and then calling Flush + on the deflater. + + + + + Finish compression and write any footer information required to stream + + + + + This class contains constants used for LZW + + + + + Magic number found at start of LZW header: 0x1f 0x9d + + + + + Maximum number of bits per code + + + + + Mask for 'number of compression bits' + + + + + Indicates the presence of a fourth header byte + + + + + Reserved bits + + + + + Block compression: if table is full and compression rate is dropping, + clear the dictionary. + + + + + LZW file header size (in bytes) + + + + + Initial number of bits per code + + + + + LzwException represents exceptions specific to LZW classes and code. + + + + + Initialise a new instance of . + + + + + Initialise a new instance of with its message string. + + A that describes the error. + + + + Initialise a new instance of . + + A that describes the error. + The that caused this exception. + + + + Initializes a new instance of the LzwException class with serialized data. + + + The System.Runtime.Serialization.SerializationInfo that holds the serialized + object data about the exception being thrown. + + + The System.Runtime.Serialization.StreamingContext that contains contextual information + about the source or destination. + + + + + This filter stream is used to decompress a LZW format stream. + Specifically, a stream that uses the LZC compression method. + This file format is usually associated with the .Z file extension. + + See http://en.wikipedia.org/wiki/Compress + See http://wiki.wxwidgets.org/Development:_Z_File_Format + + The file header consists of 3 (or optionally 4) bytes. The first two bytes + contain the magic marker "0x1f 0x9d", followed by a byte of flags. + + Based on Java code by Ronald Tschalar, which in turn was based on the unlzw.c + code in the gzip package. + + This sample shows how to unzip a compressed file + + using System; + using System.IO; + + using ICSharpCode.SharpZipLib.Core; + using ICSharpCode.SharpZipLib.LZW; + + class MainClass + { + public static void Main(string[] args) + { + using (Stream inStream = new LzwInputStream(File.OpenRead(args[0]))) + using (FileStream outStream = File.Create(Path.GetFileNameWithoutExtension(args[0]))) { + byte[] buffer = new byte[4096]; + StreamUtils.Copy(inStream, outStream, buffer); + // OR + inStream.Read(buffer, 0, buffer.Length); + // now do something with the buffer + } + } + } + + + + + + Gets or sets a flag indicating ownership of underlying stream. + When the flag is true will close the underlying stream also. + + The default value is true. + + + + Creates a LzwInputStream + + + The stream to read compressed data from (baseInputStream LZW format) + + + + + See + + + + + + Reads decompressed data into the provided buffer byte array + + + The array to read and decompress data into + + + The offset indicating where the data should be placed + + + The number of bytes to decompress + + The number of bytes read. Zero signals the end of stream + + + + Moves the unread data in the buffer to the beginning and resets + the pointers. + + + + + + + Gets a value indicating whether the current stream supports reading + + + + + Gets a value of false indicating seeking is not supported for this stream. + + + + + Gets a value of false indicating that this stream is not writeable. + + + + + A value representing the length of the stream in bytes. + + + + + The current position within the stream. + Throws a NotSupportedException when attempting to set the position + + Attempting to set the position + + + + Flushes the baseInputStream + + + + + Sets the position within the current stream + Always throws a NotSupportedException + + The relative offset to seek to. + The defining where to seek from. + The new position in the stream. + Any access + + + + Set the length of the current stream + Always throws a NotSupportedException + + The new length value for the stream. + Any access + + + + Writes a sequence of bytes to stream and advances the current position + This method always throws a NotSupportedException + + The buffer containing data to write. + The offset of the first byte to write. + The number of bytes to write. + Any access + + + + Writes one byte to the current stream and advances the current position + Always throws a NotSupportedException + + The byte to write. + Any access + + + + Closes the input stream. When + is true the underlying stream is also closed. + + + + + Flag indicating wether this instance has been closed or not. + + + + + This exception is used to indicate that there is a problem + with a TAR archive header. + + + + + Initialise a new instance of the InvalidHeaderException class. + + + + + Initialises a new instance of the InvalidHeaderException class with a specified message. + + Message describing the exception cause. + + + + Initialise a new instance of InvalidHeaderException + + Message describing the problem. + The exception that is the cause of the current exception. + + + + Initializes a new instance of the InvalidHeaderException class with serialized data. + + + The System.Runtime.Serialization.SerializationInfo that holds the serialized + object data about the exception being thrown. + + + The System.Runtime.Serialization.StreamingContext that contains contextual information + about the source or destination. + + + + + Used to advise clients of 'events' while processing archives + + + + + The TarArchive class implements the concept of a + 'Tape Archive'. A tar archive is a series of entries, each of + which represents a file system object. Each entry in + the archive consists of a header block followed by 0 or more data blocks. + Directory entries consist only of the header block, and are followed by entries + for the directory's contents. File entries consist of a + header followed by the number of blocks needed to + contain the file's contents. All entries are written on + block boundaries. Blocks are 512 bytes long. + + TarArchives are instantiated in either read or write mode, + based upon whether they are instantiated with an InputStream + or an OutputStream. Once instantiated TarArchives read/write + mode can not be changed. + + There is currently no support for random access to tar archives. + However, it seems that subclassing TarArchive, and using the + TarBuffer.CurrentRecord and TarBuffer.CurrentBlock + properties, this would be rather trivial. + + + + + Client hook allowing detailed information to be reported during processing + + + + + Raises the ProgressMessage event + + The TarEntry for this event + message for this event. Null is no message + + + + Constructor for a default . + + + + + Initialise a TarArchive for input. + + The to use for input. + + + + Initialise a TarArchive for output. + + The to use for output. + + + + The InputStream based constructors create a TarArchive for the + purposes of extracting or listing a tar archive. Thus, use + these constructors when you wish to extract files from or list + the contents of an existing tar archive. + + The stream to retrieve archive data from. + Returns a new suitable for reading from. + + + + The InputStream based constructors create a TarArchive for the + purposes of extracting or listing a tar archive. Thus, use + these constructors when you wish to extract files from or list + the contents of an existing tar archive. + + The stream to retrieve archive data from. + The used for the Name fields, or null for ASCII only + Returns a new suitable for reading from. + + + + Create TarArchive for reading setting block factor + + A stream containing the tar archive contents + The blocking factor to apply + Returns a suitable for reading. + + + + Create TarArchive for reading setting block factor + + A stream containing the tar archive contents + The blocking factor to apply + The used for the Name fields, or null for ASCII only + Returns a suitable for reading. + + + + Create a TarArchive for writing to, using the default blocking factor + + The to write to + The used for the Name fields, or null for ASCII only + Returns a suitable for writing. + + + + Create a TarArchive for writing to, using the default blocking factor + + The to write to + Returns a suitable for writing. + + + + Create a tar archive for writing. + + The stream to write to + The blocking factor to use for buffering. + Returns a suitable for writing. + + + + Create a tar archive for writing. + + The stream to write to + The blocking factor to use for buffering. + The used for the Name fields, or null for ASCII only + Returns a suitable for writing. + + + + Set the flag that determines whether existing files are + kept, or overwritten during extraction. + + + If true, do not overwrite existing files. + + + + + Get/set the ascii file translation flag. If ascii file translation + is true, then the file is checked to see if it a binary file or not. + If the flag is true and the test indicates it is ascii text + file, it will be translated. The translation converts the local + operating system's concept of line ends into the UNIX line end, + '\n', which is the defacto standard for a TAR archive. This makes + text files compatible with UNIX. + + + + + Set the ascii file translation flag. + + + If true, translate ascii text files. + + + + + PathPrefix is added to entry names as they are written if the value is not null. + A slash character is appended after PathPrefix + + + + + RootPath is removed from entry names if it is found at the + beginning of the name. + + + + + Set user and group information that will be used to fill in the + tar archive's entry headers. This information is based on that available + for the linux operating system, which is not always available on other + operating systems. TarArchive allows the programmer to specify values + to be used in their place. + is set to true by this call. + + + The user id to use in the headers. + + + The user name to use in the headers. + + + The group id to use in the headers. + + + The group name to use in the headers. + + + + + Get or set a value indicating if overrides defined by SetUserInfo should be applied. + + If overrides are not applied then the values as set in each header will be used. + + + + Get the archive user id. + See ApplyUserInfoOverrides for detail + on how to allow setting values on a per entry basis. + + + The current user id. + + + + + Get the archive user name. + See ApplyUserInfoOverrides for detail + on how to allow setting values on a per entry basis. + + + The current user name. + + + + + Get the archive group id. + See ApplyUserInfoOverrides for detail + on how to allow setting values on a per entry basis. + + + The current group id. + + + + + Get the archive group name. + See ApplyUserInfoOverrides for detail + on how to allow setting values on a per entry basis. + + + The current group name. + + + + + Get the archive's record size. Tar archives are composed of + a series of RECORDS each containing a number of BLOCKS. + This allowed tar archives to match the IO characteristics of + the physical device being used. Archives are expected + to be properly "blocked". + + + The record size this archive is using. + + + + + Sets the IsStreamOwner property on the underlying stream. + Set this to false to prevent the Close of the TarArchive from closing the stream. + + + + + Close the archive. + + + + + Perform the "list" command for the archive contents. + + NOTE That this method uses the progress event to actually list + the contents. If the progress display event is not set, nothing will be listed! + + + + + Perform the "extract" command and extract the contents of the archive. + + + The destination directory into which to extract. + + + + + Perform the "extract" command and extract the contents of the archive. + + + The destination directory into which to extract. + + Allow parent directory traversal in file paths (e.g. ../file) + + + + Extract an entry from the archive. This method assumes that the + tarIn stream has been properly set with a call to GetNextEntry(). + + + The destination directory into which to extract. + + + The TarEntry returned by tarIn.GetNextEntry(). + + Allow parent directory traversal in file paths (e.g. ../file) + + + + Write an entry to the archive. This method will call the putNextEntry + and then write the contents of the entry, and finally call closeEntry() + for entries that are files. For directories, it will call putNextEntry(), + and then, if the recurse flag is true, process each entry that is a + child of the directory. + + + The TarEntry representing the entry to write to the archive. + + + If true, process the children of directory entries. + + + + + Write an entry to the archive. This method will call the putNextEntry + and then write the contents of the entry, and finally call closeEntry() + for entries that are files. For directories, it will call putNextEntry(), + and then, if the recurse flag is true, process each entry that is a + child of the directory. + + + The TarEntry representing the entry to write to the archive. + + + If true, process the children of directory entries. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Releases the unmanaged resources used by the FileStream and optionally releases the managed resources. + + true to release both managed and unmanaged resources; + false to release only unmanaged resources. + + + + Closes the archive and releases any associated resources. + + + + + Ensures that resources are freed and other cleanup operations are performed + when the garbage collector reclaims the . + + + + + The TarBuffer class implements the tar archive concept + of a buffered input stream. This concept goes back to the + days of blocked tape drives and special io devices. In the + C# universe, the only real function that this class + performs is to ensure that files have the correct "record" + size, or other tars will complain. +

    + You should never have a need to access this class directly. + TarBuffers are created by Tar IO Streams. +

    +
    +
    + + + The size of a block in a tar archive in bytes. + + This is 512 bytes. + + + + The number of blocks in a default record. + + + The default value is 20 blocks per record. + + + + + The size in bytes of a default record. + + + The default size is 10KB. + + + + + Get the record size for this buffer + + The record size in bytes. + This is equal to the multiplied by the + + + + Get the TAR Buffer's record size. + + The record size in bytes. + This is equal to the multiplied by the + + + + Get the Blocking factor for the buffer + + This is the number of blocks in each record. + + + + Get the TAR Buffer's block factor + + The block factor; the number of blocks per record. + + + + Construct a default TarBuffer + + + + + Create TarBuffer for reading with default BlockFactor + + Stream to buffer + A new suitable for input. + + + + Construct TarBuffer for reading inputStream setting BlockFactor + + Stream to buffer + Blocking factor to apply + A new suitable for input. + + + + Construct TarBuffer for writing with default BlockFactor + + output stream for buffer + A new suitable for output. + + + + Construct TarBuffer for writing Tar output to streams. + + Output stream to write to. + Blocking factor to apply + A new suitable for output. + + + + Initialization common to all constructors. + + + + + Determine if an archive block indicates End of Archive. End of + archive is indicated by a block that consists entirely of null bytes. + All remaining blocks for the record should also be null's + However some older tars only do a couple of null blocks (Old GNU tar for one) + and also partial records + + The data block to check. + Returns true if the block is an EOF block; false otherwise. + + + + Determine if an archive block indicates the End of an Archive has been reached. + End of archive is indicated by a block that consists entirely of null bytes. + All remaining blocks for the record should also be null's + However some older tars only do a couple of null blocks (Old GNU tar for one) + and also partial records + + The data block to check. + Returns true if the block is an EOF block; false otherwise. + + + + Skip over a block on the input stream. + + + + + Read a block from the input stream. + + + The block of data read. + + + + + Read a record from data stream. + + + false if End-Of-File, else true. + + + + + Get the current block number, within the current record, zero based. + + Block numbers are zero based values + + + + + Gets or sets a flag indicating ownership of underlying stream. + When the flag is true will close the underlying stream also. + + The default value is true. + + + + Get the current block number, within the current record, zero based. + + + The current zero based block number. + + + The absolute block number = (record number * block factor) + block number. + + + + + Get the current record number. + + + The current zero based record number. + + + + + Get the current record number. + + + The current zero based record number. + + + + + Write a block of data to the archive. + + + The data to write to the archive. + + + + + Write an archive record to the archive, where the record may be + inside of a larger array buffer. The buffer must be "offset plus + record size" long. + + + The buffer containing the record data to write. + + + The offset of the record data within buffer. + + + + + Write a TarBuffer record to the archive. + + + + + WriteFinalRecord writes the current record buffer to output any unwritten data is present. + + Any trailing bytes are set to zero which is by definition correct behaviour + for the end of a tar stream. + + + + Close the TarBuffer. If this is an output buffer, also flush the + current block before closing. + + + + + This class represents an entry in a Tar archive. It consists + of the entry's header, as well as the entry's File. Entries + can be instantiated in one of three ways, depending on how + they are to be used. +

    + TarEntries that are created from the header bytes read from + an archive are instantiated with the TarEntry( byte[] ) + constructor. These entries will be used when extracting from + or listing the contents of an archive. These entries have their + header filled in using the header bytes. They also set the File + to null, since they reference an archive entry not a file.

    +

    + TarEntries that are created from files that are to be written + into an archive are instantiated with the CreateEntryFromFile(string) + pseudo constructor. These entries have their header filled in using + the File's information. They also keep a reference to the File + for convenience when writing entries.

    +

    + Finally, TarEntries can be constructed from nothing but a name. + This allows the programmer to construct the entry by hand, for + instance when only an InputStream is available for writing to + the archive, and the header information is constructed from + other information. In this case the header fields are set to + defaults and the File is set to null.

    + +
    +
    + + + Initialise a default instance of . + + + + + Construct an entry from an archive's header bytes. File is set + to null. + + + The header bytes from a tar archive entry. + + + + + Construct an entry from an archive's header bytes. File is set + to null. + + + The header bytes from a tar archive entry. + + + The used for the Name fields, or null for ASCII only + + + + + Construct a TarEntry using the header provided + + Header details for entry + + + + Clone this tar entry. + + Returns a clone of this entry. + + + + Construct an entry with only a name. + This allows the programmer to construct the entry's header "by hand". + + The name to use for the entry + Returns the newly created + + + + Construct an entry for a file. File is set to file, and the + header is constructed from information from the file. + + The file name that the entry represents. + Returns the newly created + + + + Determine if the two entries are equal. Equality is determined + by the header names being equal. + + The to compare with the current Object. + + True if the entries are equal; false if not. + + + + + Derive a Hash value for the current + + A Hash code for the current + + + + Determine if the given entry is a descendant of this entry. + Descendancy is determined by the name of the descendant + starting with this entry's name. + + + Entry to be checked as a descendent of this. + + + True if entry is a descendant of this. + + + + + Get this entry's header. + + + This entry's TarHeader. + + + + + Get/Set this entry's name. + + + + + Get/set this entry's user id. + + + + + Get/set this entry's group id. + + + + + Get/set this entry's user name. + + + + + Get/set this entry's group name. + + + + + Convenience method to set this entry's group and user ids. + + + This entry's new user id. + + + This entry's new group id. + + + + + Convenience method to set this entry's group and user names. + + + This entry's new user name. + + + This entry's new group name. + + + + + Get/Set the modification time for this entry + + + + + Get this entry's file. + + + This entry's file. + + + + + Get/set this entry's recorded file size. + + + + + Return true if this entry represents a directory, false otherwise + + + True if this entry is a directory. + + + + + Fill in a TarHeader with information from a File. + + + The TarHeader to fill in. + + + The file from which to get the header information. + + + + + Get entries for all files present in this entries directory. + If this entry doesnt represent a directory zero entries are returned. + + + An array of TarEntry's for this entry's children. + + + + + Write an entry's header information to a header buffer. + + + The tar entry header buffer to fill in. + + + + + Write an entry's header information to a header buffer. + + + The tar entry header buffer to fill in. + + + The used for the Name fields, or null for ASCII only + + + + + Convenience method that will modify an entry's name directly + in place in an entry header buffer byte array. + + + The buffer containing the entry header to modify. + + + The new name to place into the header buffer. + + + + + Convenience method that will modify an entry's name directly + in place in an entry header buffer byte array. + + + The buffer containing the entry header to modify. + + + The new name to place into the header buffer. + + + The used for the Name fields, or null for ASCII only + + + + + Fill in a TarHeader given only the entry's name. + + + The TarHeader to fill in. + + + The tar entry name. + + + + + The name of the file this entry represents or null if the entry is not based on a file. + + + + + The entry's header information. + + + + + TarException represents exceptions specific to Tar classes and code. + + + + + Initialise a new instance of . + + + + + Initialise a new instance of with its message string. + + A that describes the error. + + + + Initialise a new instance of . + + A that describes the error. + The that caused this exception. + + + + Initializes a new instance of the TarException class with serialized data. + + + The System.Runtime.Serialization.SerializationInfo that holds the serialized + object data about the exception being thrown. + + + The System.Runtime.Serialization.StreamingContext that contains contextual information + about the source or destination. + + + + + Reads the extended header of a Tar stream + + + + + Creates a new . + + + + + Read bytes from + + + + + + + Returns the parsed headers as key-value strings + + + + + This class encapsulates the Tar Entry Header used in Tar Archives. + The class also holds a number of tar constants, used mostly in headers. + + + The tar format and its POSIX successor PAX have a long history which makes for compatability + issues when creating and reading files. + + This is further complicated by a large number of programs with variations on formats + One common issue is the handling of names longer than 100 characters. + GNU style long names are currently supported. + + This is the ustar (Posix 1003.1) header. + + struct header + { + char t_name[100]; // 0 Filename + char t_mode[8]; // 100 Permissions + char t_uid[8]; // 108 Numerical User ID + char t_gid[8]; // 116 Numerical Group ID + char t_size[12]; // 124 Filesize + char t_mtime[12]; // 136 st_mtime + char t_chksum[8]; // 148 Checksum + char t_typeflag; // 156 Type of File + char t_linkname[100]; // 157 Target of Links + char t_magic[6]; // 257 "ustar" or other... + char t_version[2]; // 263 Version fixed to 00 + char t_uname[32]; // 265 User Name + char t_gname[32]; // 297 Group Name + char t_devmajor[8]; // 329 Major for devices + char t_devminor[8]; // 337 Minor for devices + char t_prefix[155]; // 345 Prefix for t_name + char t_mfill[12]; // 500 Filler up to 512 + }; + + + + + The length of the name field in a header buffer. + + + + + The length of the mode field in a header buffer. + + + + + The length of the user id field in a header buffer. + + + + + The length of the group id field in a header buffer. + + + + + The length of the checksum field in a header buffer. + + + + + Offset of checksum in a header buffer. + + + + + The length of the size field in a header buffer. + + + + + The length of the magic field in a header buffer. + + + + + The length of the version field in a header buffer. + + + + + The length of the modification time field in a header buffer. + + + + + The length of the user name field in a header buffer. + + + + + The length of the group name field in a header buffer. + + + + + The length of the devices field in a header buffer. + + + + + The length of the name prefix field in a header buffer. + + + + + The "old way" of indicating a normal file. + + + + + Normal file type. + + + + + Link file type. + + + + + Symbolic link file type. + + + + + Character device file type. + + + + + Block device file type. + + + + + Directory file type. + + + + + FIFO (pipe) file type. + + + + + Contiguous file type. + + + + + Posix.1 2001 global extended header + + + + + Posix.1 2001 extended header + + + + + Solaris access control list file type + + + + + GNU dir dump file type + This is a dir entry that contains the names of files that were in the + dir at the time the dump was made + + + + + Solaris Extended Attribute File + + + + + Inode (metadata only) no file content + + + + + Identifies the next file on the tape as having a long link name + + + + + Identifies the next file on the tape as having a long name + + + + + Continuation of a file that began on another volume + + + + + For storing filenames that dont fit in the main header (old GNU) + + + + + GNU Sparse file + + + + + GNU Tape/volume header ignore on extraction + + + + + The magic tag representing a POSIX tar archive. (would be written with a trailing NULL) + + + + + The magic tag representing an old GNU tar archive where version is included in magic and overwrites it + + + + + Initialise a default TarHeader instance + + + + + Get/set the name for this tar entry. + + Thrown when attempting to set the property to null. + + + + Get the name of this entry. + + The entry's name. + + + + Get/set the entry's Unix style permission mode. + + + + + The entry's user id. + + + This is only directly relevant to unix systems. + The default is zero. + + + + + Get/set the entry's group id. + + + This is only directly relevant to linux/unix systems. + The default value is zero. + + + + + Get/set the entry's size. + + Thrown when setting the size to less than zero. + + + + Get/set the entry's modification time. + + + The modification time is only accurate to within a second. + + Thrown when setting the date time to less than 1/1/1970. + + + + Get the entry's checksum. This is only valid/updated after writing or reading an entry. + + + + + Get value of true if the header checksum is valid, false otherwise. + + + + + Get/set the entry's type flag. + + + + + The entry's link name. + + Thrown when attempting to set LinkName to null. + + + + Get/set the entry's magic tag. + + Thrown when attempting to set Magic to null. + + + + The entry's version. + + Thrown when attempting to set Version to null. + + + + The entry's user name. + + + + + Get/set the entry's group name. + + + This is only directly relevant to unix systems. + + + + + Get/set the entry's major device number. + + + + + Get/set the entry's minor device number. + + + + + Create a new that is a copy of the current instance. + + A new that is a copy of the current instance. + + + + Parse TarHeader information from a header buffer. + + + The tar entry header buffer to get information from. + + + The used for the Name field, or null for ASCII only + + + + + Parse TarHeader information from a header buffer. + + + The tar entry header buffer to get information from. + + + + + 'Write' header information to buffer provided, updating the check sum. + + output buffer for header information + + + + 'Write' header information to buffer provided, updating the check sum. + + output buffer for header information + The used for the Name field, or null for ASCII only + + + + Get a hash code for the current object. + + A hash code for the current object. + + + + Determines if this instance is equal to the specified object. + + The object to compare with. + true if the objects are equal, false otherwise. + + + + Set defaults for values used when constructing a TarHeader instance. + + Value to apply as a default for userId. + Value to apply as a default for userName. + Value to apply as a default for groupId. + Value to apply as a default for groupName. + + + + Parse an octal string from a header buffer. + + The header buffer from which to parse. + The offset into the buffer from which to parse. + The number of header bytes to parse. + The long equivalent of the octal string. + + + + Parse a name from a header buffer. + + + The header buffer from which to parse. + + + The offset into the buffer from which to parse. + + + The number of header bytes to parse. + + + The name parsed. + + + + + Parse a name from a header buffer. + + + The header buffer from which to parse. + + + The offset into the buffer from which to parse. + + + The number of header bytes to parse. + + + name encoding, or null for ASCII only + + + The name parsed. + + + + + Add name to the buffer as a collection of bytes + + The name to add + The offset of the first character + The buffer to add to + The index of the first byte to add + The number of characters/bytes to add + The next free index in the + + + + Add name to the buffer as a collection of bytes + + The name to add + The offset of the first character + The buffer to add to + The index of the first byte to add + The number of characters/bytes to add + The next free index in the + + + + Add name to the buffer as a collection of bytes + + The name to add + The offset of the first character + The buffer to add to + The index of the first byte to add + The number of characters/bytes to add + name encoding, or null for ASCII only + The next free index in the + + + + Add an entry name to the buffer + + + The name to add + + + The buffer to add to + + + The offset into the buffer from which to start adding + + + The number of header bytes to add + + + The index of the next free byte in the buffer + + TODO: what should be default behavior?(omit upper byte or UTF8?) + + + + Add an entry name to the buffer + + + The name to add + + + The buffer to add to + + + The offset into the buffer from which to start adding + + + The number of header bytes to add + + + + + The index of the next free byte in the buffer + + + + + Add an entry name to the buffer + + The name to add + The buffer to add to + The offset into the buffer from which to start adding + The number of header bytes to add + The index of the next free byte in the buffer + TODO: what should be default behavior?(omit upper byte or UTF8?) + + + + Add an entry name to the buffer + + The name to add + The buffer to add to + The offset into the buffer from which to start adding + The number of header bytes to add + + The index of the next free byte in the buffer + + + + Add a string to a buffer as a collection of ascii bytes. + + The string to add + The offset of the first character to add. + The buffer to add to. + The offset to start adding at. + The number of ascii characters to add. + The next free index in the buffer. + + + + Add a string to a buffer as a collection of ascii bytes. + + The string to add + The offset of the first character to add. + The buffer to add to. + The offset to start adding at. + The number of ascii characters to add. + String encoding, or null for ASCII only + The next free index in the buffer. + + + + Put an octal representation of a value into a buffer + + + the value to be converted to octal + + + buffer to store the octal string + + + The offset into the buffer where the value starts + + + The length of the octal string to create + + + The offset of the character next byte after the octal string + + + + + Put an octal or binary representation of a value into a buffer + + Value to be convert to octal + The buffer to update + The offset into the buffer to store the value + The length of the octal string. Must be 12. + Index of next byte + + + + Add the checksum integer to header buffer. + + + The header buffer to set the checksum for + The offset into the buffer for the checksum + The number of header bytes to update. + It's formatted differently from the other fields: it has 6 digits, a + null, then a space -- rather than digits, a space, then a null. + The final space is already there, from checksumming + + The modified buffer offset + + + + Compute the checksum for a tar entry header. + The checksum field must be all spaces prior to this happening + + The tar entry's header buffer. + The computed checksum. + + + + Make a checksum for a tar entry ignoring the checksum contents. + + The tar entry's header buffer. + The checksum for the buffer + + + + The TarInputStream reads a UNIX tar archive as an InputStream. + methods are provided to position at each successive entry in + the archive, and the read each entry as a normal input stream + using read(). + + + + + Construct a TarInputStream with default block factor + + stream to source data from + + + + Construct a TarInputStream with default block factor + + stream to source data from + The used for the Name fields, or null for ASCII only + + + + Construct a TarInputStream with user specified block factor + + stream to source data from + block factor to apply to archive + + + + Construct a TarInputStream with user specified block factor + + stream to source data from + block factor to apply to archive + The used for the Name fields, or null for ASCII only + + + + Gets or sets a flag indicating ownership of underlying stream. + When the flag is true will close the underlying stream also. + + The default value is true. + + + + Gets a value indicating whether the current stream supports reading + + + + + Gets a value indicating whether the current stream supports seeking + This property always returns false. + + + + + Gets a value indicating if the stream supports writing. + This property always returns false. + + + + + The length in bytes of the stream + + + + + Gets or sets the position within the stream. + Setting the Position is not supported and throws a NotSupportedExceptionNotSupportedException + + Any attempt to set position + + + + Flushes the baseInputStream + + + + + Set the streams position. This operation is not supported and will throw a NotSupportedException + + The offset relative to the origin to seek to. + The to start seeking from. + The new position in the stream. + Any access + + + + Sets the length of the stream + This operation is not supported and will throw a NotSupportedException + + The new stream length. + Any access + + + + Writes a block of bytes to this stream using data from a buffer. + This operation is not supported and will throw a NotSupportedException + + The buffer containing bytes to write. + The offset in the buffer of the frist byte to write. + The number of bytes to write. + Any access + + + + Writes a byte to the current position in the file stream. + This operation is not supported and will throw a NotSupportedException + + The byte value to write. + Any access + + + + Reads a byte from the current tar archive entry. + + A byte cast to an int; -1 if the at the end of the stream. + + + + Reads bytes from the current tar archive entry. + + This method is aware of the boundaries of the current + entry in the archive and will deal with them appropriately + + + The buffer into which to place bytes read. + + + The offset at which to place bytes read. + + + The number of bytes to read. + + + The number of bytes read, or 0 at end of stream/EOF. + + + + + Closes this stream. Calls the TarBuffer's close() method. + The underlying stream is closed by the TarBuffer. + + + + + Set the entry factory for this instance. + + The factory for creating new entries + + + + Get the record size being used by this stream's TarBuffer. + + + + + Get the record size being used by this stream's TarBuffer. + + + TarBuffer record size. + + + + + Get the available data that can be read from the current + entry in the archive. This does not indicate how much data + is left in the entire archive, only in the current entry. + This value is determined from the entry's size header field + and the amount of data already read from the current entry. + + + The number of available bytes for the current entry. + + + + + Skip bytes in the input buffer. This skips bytes in the + current entry's data, not the entire archive, and will + stop at the end of the current entry's data if the number + to skip extends beyond that point. + + + The number of bytes to skip. + + + + + Return a value of true if marking is supported; false otherwise. + + Currently marking is not supported, the return value is always false. + + + + Since we do not support marking just yet, we do nothing. + + + The limit to mark. + + + + + Since we do not support marking just yet, we do nothing. + + + + + Get the next entry in this tar archive. This will skip + over any remaining data in the current entry, if there + is one, and place the input stream at the header of the + next entry, and read the header and instantiate a new + TarEntry from the header bytes and return that entry. + If there are no more entries in the archive, null will + be returned to indicate that the end of the archive has + been reached. + + + The next TarEntry in the archive, or null. + + + + + Copies the contents of the current tar archive entry directly into + an output stream. + + + The OutputStream into which to write the entry's data. + + + + + This interface is provided, along with the method , to allow + the programmer to have their own subclass instantiated for the + entries return from . + + + + + Create an entry based on name alone + + + Name of the new EntryPointNotFoundException to create + + created TarEntry or descendant class + + + + Create an instance based on an actual file + + + Name of file to represent in the entry + + + Created TarEntry or descendant class + + + + + Create a tar entry based on the header information passed + + + Buffer containing header information to create an entry from. + + + Created TarEntry or descendant class + + + + + Standard entry factory class creating instances of the class TarEntry + + + + + Construct standard entry factory class with ASCII name encoding + + + + + Construct standard entry factory with name encoding + + The used for the Name fields, or null for ASCII only + + + + Create a based on named + + The name to use for the entry + A new + + + + Create a tar entry with details obtained from file + + The name of the file to retrieve details from. + A new + + + + Create an entry based on details in header + + The buffer containing entry details. + A new + + + + Flag set when last block has been read + + + + + Size of this entry as recorded in header + + + + + Number of bytes read for this entry so far + + + + + Buffer used with calls to Read() + + + + + Working buffer + + + + + Current entry being read + + + + + Factory used to create TarEntry or descendant class instance + + + + + Stream used as the source of input data. + + + + + The TarOutputStream writes a UNIX tar archive as an OutputStream. + Methods are provided to put entries, and then write their contents + by writing to this stream using write(). + + public + + + + Construct TarOutputStream using default block factor + + stream to write to + + + + Construct TarOutputStream using default block factor + + stream to write to + The used for the Name fields, or null for ASCII only + + + + Construct TarOutputStream with user specified block factor + + stream to write to + blocking factor + + + + Construct TarOutputStream with user specified block factor + + stream to write to + blocking factor + The used for the Name fields, or null for ASCII only + + + + Gets or sets a flag indicating ownership of underlying stream. + When the flag is true will close the underlying stream also. + + The default value is true. + + + + true if the stream supports reading; otherwise, false. + + + + + true if the stream supports seeking; otherwise, false. + + + + + true if stream supports writing; otherwise, false. + + + + + length of stream in bytes + + + + + gets or sets the position within the current stream. + + + + + set the position within the current stream + + The offset relative to the to seek to + The to seek from. + The new position in the stream. + + + + Set the length of the current stream + + The new stream length. + + + + Read a byte from the stream and advance the position within the stream + by one byte or returns -1 if at the end of the stream. + + The byte value or -1 if at end of stream + + + + read bytes from the current stream and advance the position within the + stream by the number of bytes read. + + The buffer to store read bytes in. + The index into the buffer to being storing bytes at. + The desired number of bytes to read. + The total number of bytes read, or zero if at the end of the stream. + The number of bytes may be less than the count + requested if data is not available. + + + + All buffered data is written to destination + + + + + Ends the TAR archive without closing the underlying OutputStream. + The result is that the EOF block of nulls is written. + + + + + Ends the TAR archive and closes the underlying OutputStream. + + This means that Finish() is called followed by calling the + TarBuffer's Close(). + + + + Get the record size being used by this stream's TarBuffer. + + + + + Get the record size being used by this stream's TarBuffer. + + + The TarBuffer record size. + + + + + Get a value indicating whether an entry is open, requiring more data to be written. + + + + + Put an entry on the output stream. This writes the entry's + header and positions the output stream for writing + the contents of the entry. Once this method is called, the + stream is ready for calls to write() to write the entry's + contents. Once the contents are written, closeEntry() + MUST be called to ensure that all buffered data + is completely written to the output stream. + + + The TarEntry to be written to the archive. + + + + + Close an entry. This method MUST be called for all file + entries that contain data. The reason is that we must + buffer data written to the stream in order to satisfy + the buffer's block based writes. Thus, there may be + data fragments still being assembled that must be written + to the output stream before this entry is closed and the + next entry written. + + + + + Writes a byte to the current tar archive entry. + This method simply calls Write(byte[], int, int). + + + The byte to be written. + + + + + Writes bytes to the current tar archive entry. This method + is aware of the current entry and will throw an exception if + you attempt to write bytes past the length specified for the + current entry. The method is also (painfully) aware of the + record buffering required by TarBuffer, and manages buffers + that are not a multiple of recordsize in length, including + assembling records from small buffers. + + + The buffer to write to the archive. + + + The offset in the buffer from which to get bytes. + + + The number of bytes to write. + + + + + Write an EOF (end of archive) block to the tar archive. + The end of the archive is indicated by two blocks consisting entirely of zero bytes. + + + + + bytes written for this entry so far + + + + + current 'Assembly' buffer length + + + + + Flag indicating whether this instance has been closed or not. + + + + + Size for the current entry + + + + + single block working buffer + + + + + 'Assembly' buffer used to assemble data before writing + + + + + TarBuffer used to provide correct blocking factor + + + + + the destination stream for the archive contents + + + + + name encoding + + + + + This is the Deflater class. The deflater class compresses input + with the deflate algorithm described in RFC 1951. It has several + compression levels and three different strategies described below. + + This class is not thread safe. This is inherent in the API, due + to the split of deflate and setInput. + + author of the original java version : Jochen Hoenicke + + + + + The best and slowest compression level. This tries to find very + long and distant string repetitions. + + + + + The worst but fastest compression level. + + + + + The default compression level. + + + + + This level won't compress at all but output uncompressed blocks. + + + + + The compression method. This is the only method supported so far. + There is no need to use this constant at all. + + + + + Compression Level as an enum for safer use + + + + + The best and slowest compression level. This tries to find very + long and distant string repetitions. + + + + + The worst but fastest compression level. + + + + + The default compression level. + + + + + This level won't compress at all but output uncompressed blocks. + + + + + The compression method. This is the only method supported so far. + There is no need to use this constant at all. + + + + + Creates a new deflater with default compression level. + + + + + Creates a new deflater with given compression level. + + + the compression level, a value between NO_COMPRESSION + and BEST_COMPRESSION, or DEFAULT_COMPRESSION. + + if lvl is out of range. + + + + Creates a new deflater with given compression level. + + + the compression level, a value between NO_COMPRESSION + and BEST_COMPRESSION. + + + true, if we should suppress the Zlib/RFC1950 header at the + beginning and the adler checksum at the end of the output. This is + useful for the GZIP/PKZIP formats. + + if lvl is out of range. + + + + Resets the deflater. The deflater acts afterwards as if it was + just created with the same compression level and strategy as it + had before. + + + + + Gets the current adler checksum of the data that was processed so far. + + + + + Gets the number of input bytes processed so far. + + + + + Gets the number of output bytes so far. + + + + + Flushes the current input block. Further calls to deflate() will + produce enough output to inflate everything in the current input + block. This is not part of Sun's JDK so I have made it package + private. It is used by DeflaterOutputStream to implement + flush(). + + + + + Finishes the deflater with the current input block. It is an error + to give more input after this method was called. This method must + be called to force all bytes to be flushed. + + + + + Returns true if the stream was finished and no more output bytes + are available. + + + + + Returns true, if the input buffer is empty. + You should then call setInput(). + NOTE: This method can also return true when the stream + was finished. + + + + + Sets the data which should be compressed next. This should be only + called when needsInput indicates that more input is needed. + If you call setInput when needsInput() returns false, the + previous input that is still pending will be thrown away. + The given byte array should not be changed, before needsInput() returns + true again. + This call is equivalent to setInput(input, 0, input.length). + + + the buffer containing the input data. + + + if the buffer was finished() or ended(). + + + + + Sets the data which should be compressed next. This should be + only called when needsInput indicates that more input is needed. + The given byte array should not be changed, before needsInput() returns + true again. + + + the buffer containing the input data. + + + the start of the data. + + + the number of data bytes of input. + + + if the buffer was Finish()ed or if previous input is still pending. + + + + + Sets the compression level. There is no guarantee of the exact + position of the change, but if you call this when needsInput is + true the change of compression level will occur somewhere near + before the end of the so far given input. + + + the new compression level. + + + + + Get current compression level + + Returns the current compression level + + + + Sets the compression strategy. Strategy is one of + DEFAULT_STRATEGY, HUFFMAN_ONLY and FILTERED. For the exact + position where the strategy is changed, the same as for + SetLevel() applies. + + + The new compression strategy. + + + + + Deflates the current input block with to the given array. + + + The buffer where compressed data is stored + + + The number of compressed bytes added to the output, or 0 if either + IsNeedingInput() or IsFinished returns true or length is zero. + + + + + Deflates the current input block to the given array. + + + Buffer to store the compressed data. + + + Offset into the output array. + + + The maximum number of bytes that may be stored. + + + The number of compressed bytes added to the output, or 0 if either + needsInput() or finished() returns true or length is zero. + + + If Finish() was previously called. + + + If offset or length don't match the array length. + + + + + Sets the dictionary which should be used in the deflate process. + This call is equivalent to setDictionary(dict, 0, dict.Length). + + + the dictionary. + + + if SetInput () or Deflate () were already called or another dictionary was already set. + + + + + Sets the dictionary which should be used in the deflate process. + The dictionary is a byte array containing strings that are + likely to occur in the data which should be compressed. The + dictionary is not stored in the compressed output, only a + checksum. To decompress the output you need to supply the same + dictionary again. + + + The dictionary data + + + The index where dictionary information commences. + + + The number of bytes in the dictionary. + + + If SetInput () or Deflate() were already called or another dictionary was already set. + + + + + Compression level. + + + + + If true no Zlib/RFC1950 headers or footers are generated + + + + + The current state. + + + + + The total bytes of output written. + + + + + The pending output. + + + + + The deflater engine. + + + + + This class contains constants used for deflation. + + + + + Set to true to enable debugging + + + + + Written to Zip file to identify a stored block + + + + + Identifies static tree in Zip file + + + + + Identifies dynamic tree in Zip file + + + + + Header flag indicating a preset dictionary for deflation + + + + + Sets internal buffer sizes for Huffman encoding + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Internal compression engine constant + + + + + Strategies for deflater + + + + + The default strategy + + + + + This strategy will only allow longer string repetitions. It is + useful for random data with a small character set. + + + + + This strategy will not look for string repetitions at all. It + only encodes with Huffman trees (which means, that more common + characters get a smaller encoding. + + + + + Low level compression engine for deflate algorithm which uses a 32K sliding window + with secondary compression from Huffman/Shannon-Fano codes. + + + + + Construct instance with pending buffer + Adler calculation will be performed + + + Pending buffer to use + + + + + Construct instance with pending buffer + + + Pending buffer to use + + + If no adler calculation should be performed + + + + + Deflate drives actual compression of data + + True to flush input buffers + Finish deflation with the current input. + Returns true if progress has been made. + + + + Sets input data to be deflated. Should only be called when NeedsInput() + returns true + + The buffer containing input data. + The offset of the first byte of data. + The number of bytes of data to use as input. + + + + Determines if more input is needed. + + Return true if input is needed via SetInput + + + + Set compression dictionary + + The buffer containing the dictionary data + The offset in the buffer for the first byte of data + The length of the dictionary data. + + + + Reset internal state + + + + + Reset Adler checksum + + + + + Get current value of Adler checksum + + + + + Total data processed + + + + + Get/set the deflate strategy + + + + + Set the deflate level (0-9) + + The value to set the level to. + + + + Fill the window + + + + + Inserts the current string in the head hash and returns the previous + value for this hash. + + The previous hash value + + + + Find the best (longest) string in the window matching the + string starting at strstart. + + Preconditions: + + strstart + DeflaterConstants.MAX_MATCH <= window.length. + + + True if a match greater than the minimum length is found + + + + Hashtable, hashing three characters to an index for window, so + that window[index]..window[index+2] have this hash code. + Note that the array should really be unsigned short, so you need + to and the values with 0xffff. + + + + + prev[index & WMASK] points to the previous index that has the + same hash code as the string starting at index. This way + entries with the same hash code are in a linked list. + Note that the array should really be unsigned short, so you need + to and the values with 0xffff. + + + + + Points to the current character in the window. + + + + + lookahead is the number of characters starting at strstart in + window that are valid. + So window[strstart] until window[strstart+lookahead-1] are valid + characters. + + + + + This array contains the part of the uncompressed stream that + is of relevance. The current character is indexed by strstart. + + + + + The current compression function. + + + + + The input data for compression. + + + + + The total bytes of input read. + + + + + The offset into inputBuf, where input data starts. + + + + + The end offset of the input data. + + + + + The adler checksum + + + + + This is the DeflaterHuffman class. + + This class is not thread safe. This is inherent in the API, due + to the split of Deflate and SetInput. + + author of the original java version : Jochen Hoenicke + + + + + Resets the internal state of the tree + + + + + Check that all frequencies are zero + + + At least one frequency is non-zero + + + + + Set static codes and length + + new codes + length for new codes + + + + Build dynamic codes and lengths + + + + + Get encoded length + + Encoded length, the sum of frequencies * lengths + + + + Scan a literal or distance tree to determine the frequencies of the codes + in the bit length tree. + + + + + Write tree values + + Tree to write + + + + Pending buffer to use + + + + + Construct instance with pending buffer + + Pending buffer to use + + + + Reset internal state + + + + + Write all trees to pending buffer + + The number/rank of treecodes to send. + + + + Compress current buffer writing data to pending buffer + + + + + Flush block to output with no compression + + Data to write + Index of first byte to write + Count of bytes to write + True if this is the last block + + + + Flush block to output with compression + + Data to flush + Index of first byte to flush + Count of bytes to flush + True if this is the last block + + + + Get value indicating if internal buffer is full + + true if buffer is full + + + + Add literal to buffer + + Literal value to add to buffer. + Value indicating internal buffer is full + + + + Add distance code and length to literal and distance trees + + Distance code + Length + Value indicating if internal buffer is full + + + + Reverse the bits of a 16 bit value. + + Value to reverse bits + Value with bits reversed + + + + This class stores the pending output of the Deflater. + + author of the original java version : Jochen Hoenicke + + + + + Construct instance with default buffer size + + + + + Inflater is used to decompress data that has been compressed according + to the "deflate" standard described in rfc1951. + + By default Zlib (rfc1950) headers and footers are expected in the input. + You can use constructor public Inflater(bool noHeader) passing true + if there is no Zlib header information + + The usage is as following. First you have to set some input with + SetInput(), then Inflate() it. If inflate doesn't + inflate any bytes there may be three reasons: +
      +
    • IsNeedingInput() returns true because the input buffer is empty. + You have to provide more input with SetInput(). + NOTE: IsNeedingInput() also returns true when, the stream is finished. +
    • +
    • IsNeedingDictionary() returns true, you have to provide a preset + dictionary with SetDictionary().
    • +
    • IsFinished returns true, the inflater has finished.
    • +
    + Once the first output byte is produced, a dictionary will not be + needed at a later stage. + + author of the original java version : John Leuner, Jochen Hoenicke +
    +
    + + + Copy lengths for literal codes 257..285 + + + + + Extra bits for literal codes 257..285 + + + + + Copy offsets for distance codes 0..29 + + + + + Extra bits for distance codes + + + + + These are the possible states for an inflater + + + + + This variable contains the current state. + + + + + The adler checksum of the dictionary or of the decompressed + stream, as it is written in the header resp. footer of the + compressed stream. + Only valid if mode is DECODE_DICT or DECODE_CHKSUM. + + + + + The number of bits needed to complete the current state. This + is valid, if mode is DECODE_DICT, DECODE_CHKSUM, + DECODE_HUFFMAN_LENBITS or DECODE_HUFFMAN_DISTBITS. + + + + + True, if the last block flag was set in the last block of the + inflated stream. This means that the stream ends after the + current block. + + + + + The total number of inflated bytes. + + + + + The total number of bytes set with setInput(). This is not the + value returned by the TotalIn property, since this also includes the + unprocessed input. + + + + + This variable stores the noHeader flag that was given to the constructor. + True means, that the inflated stream doesn't contain a Zlib header or + footer. + + + + + Creates a new inflater or RFC1951 decompressor + RFC1950/Zlib headers and footers will be expected in the input data + + + + + Creates a new inflater. + + + True if no RFC1950/Zlib header and footer fields are expected in the input data + + This is used for GZIPed/Zipped input. + + For compatibility with + Sun JDK you should provide one byte of input more than needed in + this case. + + + + + Resets the inflater so that a new stream can be decompressed. All + pending input and output will be discarded. + + + + + Decodes a zlib/RFC1950 header. + + + False if more input is needed. + + + The header is invalid. + + + + + Decodes the dictionary checksum after the deflate header. + + + False if more input is needed. + + + + + Decodes the huffman encoded symbols in the input stream. + + + false if more input is needed, true if output window is + full or the current block ends. + + + if deflated stream is invalid. + + + + + Decodes the adler checksum after the deflate stream. + + + false if more input is needed. + + + If checksum doesn't match. + + + + + Decodes the deflated stream. + + + false if more input is needed, or if finished. + + + if deflated stream is invalid. + + + + + Sets the preset dictionary. This should only be called, if + needsDictionary() returns true and it should set the same + dictionary, that was used for deflating. The getAdler() + function returns the checksum of the dictionary needed. + + + The dictionary. + + + + + Sets the preset dictionary. This should only be called, if + needsDictionary() returns true and it should set the same + dictionary, that was used for deflating. The getAdler() + function returns the checksum of the dictionary needed. + + + The dictionary. + + + The index into buffer where the dictionary starts. + + + The number of bytes in the dictionary. + + + No dictionary is needed. + + + The adler checksum for the buffer is invalid + + + + + Sets the input. This should only be called, if needsInput() + returns true. + + + the input. + + + + + Sets the input. This should only be called, if needsInput() + returns true. + + + The source of input data + + + The index into buffer where the input starts. + + + The number of bytes of input to use. + + + No input is needed. + + + The index and/or count are wrong. + + + + + Inflates the compressed stream to the output buffer. If this + returns 0, you should check, whether IsNeedingDictionary(), + IsNeedingInput() or IsFinished() returns true, to determine why no + further output is produced. + + + the output buffer. + + + The number of bytes written to the buffer, 0 if no further + output can be produced. + + + if buffer has length 0. + + + if deflated stream is invalid. + + + + + Inflates the compressed stream to the output buffer. If this + returns 0, you should check, whether needsDictionary(), + needsInput() or finished() returns true, to determine why no + further output is produced. + + + the output buffer. + + + the offset in buffer where storing starts. + + + the maximum number of bytes to output. + + + the number of bytes written to the buffer, 0 if no further output can be produced. + + + if count is less than 0. + + + if the index and / or count are wrong. + + + if deflated stream is invalid. + + + + + Returns true, if the input buffer is empty. + You should then call setInput(). + NOTE: This method also returns true when the stream is finished. + + + + + Returns true, if a preset dictionary is needed to inflate the input. + + + + + Returns true, if the inflater has finished. This means, that no + input is needed and no output can be produced. + + + + + Gets the adler checksum. This is either the checksum of all + uncompressed bytes returned by inflate(), or if needsDictionary() + returns true (and thus no output was yet produced) this is the + adler checksum of the expected dictionary. + + + the adler checksum. + + + + + Gets the total number of output bytes returned by Inflate(). + + + the total number of output bytes. + + + + + Gets the total number of processed compressed input bytes. + + + The total number of bytes of processed input bytes. + + + + + Gets the number of unprocessed input bytes. Useful, if the end of the + stream is reached and you want to further process the bytes after + the deflate stream. + + + The number of bytes of the input which have not been processed. + + + + + Continue decoding header from until more bits are needed or decoding has been completed + + Returns whether decoding could be completed + + + + Get literal/length huffman tree, must not be used before has returned true + + If hader has not been successfully read by the state machine + + + + Get distance huffman tree, must not be used before has returned true + + If hader has not been successfully read by the state machine + + + + Huffman tree used for inflation + + + + + Literal length tree + + + + + Distance tree + + + + + Constructs a Huffman tree from the array of code lengths. + + + the array of code lengths + + + + + Reads the next symbol from input. The symbol is encoded using the + huffman tree. + + + input the input source. + + + the next symbol, or -1 if not enough input is available. + + + + + This class is general purpose class for writing data to a buffer. + + It allows you to write bits as well as bytes + Based on DeflaterPending.java + + author of the original java version : Jochen Hoenicke + + + + + Internal work buffer + + + + + construct instance using default buffer size of 4096 + + + + + construct instance using specified buffer size + + + size to use for internal buffer + + + + + Clear internal state/buffers + + + + + Write a byte to buffer + + + The value to write + + + + + Write a short value to buffer LSB first + + + The value to write. + + + + + write an integer LSB first + + The value to write. + + + + Write a block of data to buffer + + data to write + offset of first byte to write + number of bytes to write + + + + The number of bits written to the buffer + + + + + Align internal buffer on a byte boundary + + + + + Write bits to internal buffer + + source of bits + number of bits to write + + + + Write a short value to internal buffer most significant byte first + + value to write + + + + Indicates if buffer has been flushed + + + + + Flushes the pending buffer into the given output array. If the + output array is to small, only a partial flush is done. + + The output array. + The offset into output array. + The maximum number of bytes to store. + The number of bytes flushed. + + + + Convert internal buffer to byte array. + Buffer is empty on completion + + + The internal buffer contents converted to a byte array. + + + + + A special stream deflating or compressing the bytes that are + written to it. It uses a Deflater to perform actual deflating.
    + Authors of the original java version : Tom Tromey, Jochen Hoenicke +
    +
    + + + Creates a new DeflaterOutputStream with a default Deflater and default buffer size. + + + the output stream where deflated output should be written. + + + + + Creates a new DeflaterOutputStream with the given Deflater and + default buffer size. + + + the output stream where deflated output should be written. + + + the underlying deflater. + + + + + Creates a new DeflaterOutputStream with the given Deflater and + buffer size. + + + The output stream where deflated output is written. + + + The underlying deflater to use + + + The buffer size in bytes to use when deflating (minimum value 512) + + + bufsize is less than or equal to zero. + + + baseOutputStream does not support writing + + + deflater instance is null + + + + + Finishes the stream by calling finish() on the deflater. + + + Not all input is deflated + + + + + Gets or sets a flag indicating ownership of underlying stream. + When the flag is true will close the underlying stream also. + + The default value is true. + + + + Allows client to determine if an entry can be patched after its added + + + + + The CryptoTransform currently being used to encrypt the compressed data. + + + + + Returns the 10 byte AUTH CODE to be appended immediately following the AES data stream. + + + + + Encrypt a block of data + + + Data to encrypt. NOTE the original contents of the buffer are lost + + + Offset of first byte in buffer to encrypt + + + Number of bytes in buffer to encrypt + + + + + Deflates everything in the input buffers. This will call + def.deflate() until all bytes from the input buffers + are processed. + + + + + Gets value indicating stream can be read from + + + + + Gets a value indicating if seeking is supported for this stream + This property always returns false + + + + + Get value indicating if this stream supports writing + + + + + Get current length of stream + + + + + Gets the current position within the stream. + + Any attempt to set position + + + + Sets the current position of this stream to the given value. Not supported by this class! + + The offset relative to the to seek. + The to seek from. + The new position in the stream. + Any access + + + + Sets the length of this stream to the given value. Not supported by this class! + + The new stream length. + Any access + + + + Read a byte from stream advancing position by one + + The byte read cast to an int. THe value is -1 if at the end of the stream. + Any access + + + + Read a block of bytes from stream + + The buffer to store read data in. + The offset to start storing at. + The maximum number of bytes to read. + The actual number of bytes read. Zero if end of stream is detected. + Any access + + + + Flushes the stream by calling Flush on the deflater and then + on the underlying stream. This ensures that all bytes are flushed. + + + + + Calls and closes the underlying + stream when is true. + + + + + Get the Auth code for AES encrypted entries + + + + + Writes a single byte to the compressed output stream. + + + The byte value. + + + + + Writes bytes from an array to the compressed stream. + + + The byte array + + + The offset into the byte array where to start. + + + The number of bytes to write. + + + + + This buffer is used temporarily to retrieve the bytes from the + deflater and write them to the underlying output stream. + + + + + The deflater which is used to deflate the stream. + + + + + Base stream the deflater depends on. + + + + + An input buffer customised for use by + + + The buffer supports decryption of incoming data. + + + + + Initialise a new instance of with a default buffer size + + The stream to buffer. + + + + Initialise a new instance of + + The stream to buffer. + The size to use for the buffer + A minimum buffer size of 1KB is permitted. Lower sizes are treated as 1KB. + + + + Get the length of bytes in the + + + + + Get the contents of the raw data buffer. + + This may contain encrypted data. + + + + Get the number of useable bytes in + + + + + Get the contents of the clear text buffer. + + + + + Get/set the number of bytes available + + + + + Call passing the current clear text buffer contents. + + The inflater to set input for. + + + + Fill the buffer from the underlying input stream. + + + + + Read a buffer directly from the input stream + + The buffer to fill + Returns the number of bytes read. + + + + Read a buffer directly from the input stream + + The buffer to read into + The offset to start reading data into. + The number of bytes to read. + Returns the number of bytes read. + + + + Read clear text data from the input stream. + + The buffer to add data to. + The offset to start adding data at. + The number of bytes to read. + Returns the number of bytes actually read. + + + + Read a from the input stream. + + Returns the byte read. + + + + Read an in little endian byte order. + + The short value read case to an int. + + + + Read an in little endian byte order. + + The int value read. + + + + Read a in little endian byte order. + + The long value read. + + + + Get/set the to apply to any data. + + Set this value to null to have no transform applied. + + + + This filter stream is used to decompress data compressed using the "deflate" + format. The "deflate" format is described in RFC 1951. + + This stream may form the basis for other decompression filters, such + as the GZipInputStream. + + Author of the original java version : John Leuner. + + + + + Create an InflaterInputStream with the default decompressor + and a default buffer size of 4KB. + + + The InputStream to read bytes from + + + + + Create an InflaterInputStream with the specified decompressor + and a default buffer size of 4KB. + + + The source of input data + + + The decompressor used to decompress data read from baseInputStream + + + + + Create an InflaterInputStream with the specified decompressor + and the specified buffer size. + + + The InputStream to read bytes from + + + The decompressor to use + + + Size of the buffer to use + + + + + Gets or sets a flag indicating ownership of underlying stream. + When the flag is true will close the underlying stream also. + + The default value is true. + + + + Skip specified number of bytes of uncompressed data + + + Number of bytes to skip + + + The number of bytes skipped, zero if the end of + stream has been reached + + + The number of bytes to skip is less than or equal to zero. + + + + + Clear any cryptographic state. + + + + + Returns 0 once the end of the stream (EOF) has been reached. + Otherwise returns 1. + + + + + Fills the buffer with more data to decompress. + + + Stream ends early + + + + + Gets a value indicating whether the current stream supports reading + + + + + Gets a value of false indicating seeking is not supported for this stream. + + + + + Gets a value of false indicating that this stream is not writeable. + + + + + A value representing the length of the stream in bytes. + + + + + The current position within the stream. + Throws a NotSupportedException when attempting to set the position + + Attempting to set the position + + + + Flushes the baseInputStream + + + + + Sets the position within the current stream + Always throws a NotSupportedException + + The relative offset to seek to. + The defining where to seek from. + The new position in the stream. + Any access + + + + Set the length of the current stream + Always throws a NotSupportedException + + The new length value for the stream. + Any access + + + + Writes a sequence of bytes to stream and advances the current position + This method always throws a NotSupportedException + + The buffer containing data to write. + The offset of the first byte to write. + The number of bytes to write. + Any access + + + + Writes one byte to the current stream and advances the current position + Always throws a NotSupportedException + + The byte to write. + Any access + + + + Closes the input stream. When + is true the underlying stream is also closed. + + + + + Reads decompressed data into the provided buffer byte array + + + The array to read and decompress data into + + + The offset indicating where the data should be placed + + + The number of bytes to decompress + + The number of bytes read. Zero signals the end of stream + + Inflater needs a dictionary + + + + + Decompressor for this stream + + + + + Input buffer for this stream. + + + + + Base stream the inflater reads from. + + + + + The compressed size + + + + + Flag indicating whether this instance has been closed or not. + + + + + Contains the output from the Inflation process. + We need to have a window so that we can refer backwards into the output stream + to repeat stuff.
    + Author of the original java version : John Leuner +
    +
    + + + Write a byte to this output window + + value to write + + if window is full + + + + + Append a byte pattern already in the window itself + + length of pattern to copy + distance from end of window pattern occurs + + If the repeated data overflows the window + + + + + Copy from input manipulator to internal window + + source of data + length of data to copy + the number of bytes copied + + + + Copy dictionary to window + + source dictionary + offset of start in source dictionary + length of dictionary + + If window isnt empty + + + + + Get remaining unfilled space in window + + Number of bytes left in window + + + + Get bytes available for output in window + + Number of bytes filled + + + + Copy contents of window to output + + buffer to copy to + offset to start at + number of bytes to count + The number of bytes copied + + If a window underflow occurs + + + + + Reset by clearing window so GetAvailable returns 0 + + + + + This class allows us to retrieve a specified number of bits from + the input buffer, as well as copy big byte blocks. + + It uses an int buffer to store up to 31 bits for direct + manipulation. This guarantees that we can get at least 16 bits, + but we only need at most 15, so this is all safe. + + There are some optimizations in this class, for example, you must + never peek more than 8 bits more than needed, and you must first + peek bits before you may drop them. This is not a general purpose + class but optimized for the behaviour of the Inflater. + + authors of the original java version : John Leuner, Jochen Hoenicke + + + + + Get the next sequence of bits but don't increase input pointer. bitCount must be + less or equal 16 and if this call succeeds, you must drop + at least n - 8 bits in the next call. + + The number of bits to peek. + + the value of the bits, or -1 if not enough bits available. */ + + + + + Tries to grab the next bits from the input and + sets to the value, adding . + + true if enough bits could be read, otherwise false + + + + Tries to grab the next bits from the input and + sets of to the value. + + true if enough bits could be read, otherwise false + + + + Drops the next n bits from the input. You should have called PeekBits + with a bigger or equal n before, to make sure that enough bits are in + the bit buffer. + + The number of bits to drop. + + + + Gets the next n bits and increases input pointer. This is equivalent + to followed by , except for correct error handling. + + The number of bits to retrieve. + + the value of the bits, or -1 if not enough bits available. + + + + + Gets the number of bits available in the bit buffer. This must be + only called when a previous PeekBits() returned -1. + + + the number of bits available. + + + + + Gets the number of bytes available. + + + The number of bytes available. + + + + + Skips to the next byte boundary. + + + + + Returns true when SetInput can be called + + + + + Copies bytes from input buffer to output buffer starting + at output[offset]. You have to make sure, that the buffer is + byte aligned. If not enough bytes are available, copies fewer + bytes. + + + The buffer to copy bytes to. + + + The offset in the buffer at which copying starts + + + The length to copy, 0 is allowed. + + + The number of bytes copied, 0 if no bytes were available. + + + Length is less than zero + + + Bit buffer isnt byte aligned + + + + + Resets state and empties internal buffers + + + + + Add more input for consumption. + Only call when IsNeedingInput returns true + + data to be input + offset of first byte of input + number of bytes of input to add. + + + + FastZipEvents supports all events applicable to FastZip operations. + + + + + Delegate to invoke when processing directories. + + + + + Delegate to invoke when processing files. + + + + + Delegate to invoke during processing of files. + + + + + Delegate to invoke when processing for a file has been completed. + + + + + Delegate to invoke when processing directory failures. + + + + + Delegate to invoke when processing file failures. + + + + + Raise the directory failure event. + + The directory causing the failure. + The exception for this event. + A boolean indicating if execution should continue or not. + + + + Fires the file failure handler delegate. + + The file causing the failure. + The exception for this failure. + A boolean indicating if execution should continue or not. + + + + Fires the ProcessFile delegate. + + The file being processed. + A boolean indicating if execution should continue or not. + + + + Fires the delegate + + The file whose processing has been completed. + A boolean indicating if execution should continue or not. + + + + Fires the process directory delegate. + + The directory being processed. + Flag indicating if the directory has matching files as determined by the current filter. + A of true if the operation should continue; false otherwise. + + + + The minimum timespan between events. + + The minimum period of time between events. + + The default interval is three seconds. + + + + FastZip provides facilities for creating and extracting zip files. + + + + + Defines the desired handling when overwriting files during extraction. + + + + + Prompt the user to confirm overwriting + + + + + Never overwrite files. + + + + + Always overwrite files. + + + + + Initialise a default instance of . + + + + + Initialise a new instance of using the specified + + The time setting to use when creating or extracting Zip entries. + Using TimeSetting.LastAccessTime[Utc] when + creating an archive will set the file time to the moment of reading. + + + + + Initialise a new instance of using the specified + + The time to set all values for created or extracted Zip Entries. + + + + Initialise a new instance of + + The events to use during operations. + + + + Get/set a value indicating whether empty directories should be created. + + + + + Get / set the password value. + + + + + Get / set the method of encrypting entries. + + + Only applies when is set. + Defaults to ZipCrypto for backwards compatibility purposes. + + + + + Get or set the active when creating Zip files. + + + + + + Get or set the active when creating Zip files. + + + + + Gets or sets the setting for Zip64 handling when writing. + + + The default value is dynamic which is not backwards compatible with old + programs and can cause problems with XP's built in compression which cant + read Zip64 archives. However it does avoid the situation were a large file + is added and cannot be completed correctly. + NOTE: Setting the size for entries before they are added is the best solution! + By default the EntryFactory used by FastZip will set the file size. + + + + + Get/set a value indicating whether file dates and times should + be restored when extracting files from an archive. + + The default value is false. + + + + Get/set a value indicating whether file attributes should + be restored during extract operations + + + + + Get/set the Compression Level that will be used + when creating the zip + + + + + Delegate called when confirming overwriting of files. + + + + + Create a zip file. + + The name of the zip file to create. + The directory to source files from. + True to recurse directories, false for no recursion. + The file filter to apply. + The directory filter to apply. + + + + Create a zip file/archive. + + The name of the zip file to create. + The directory to obtain files and directories from. + True to recurse directories, false for no recursion. + The file filter to apply. + + + + Create a zip archive sending output to the passed. + + The stream to write archive data to. + The directory to source files from. + True to recurse directories, false for no recursion. + The file filter to apply. + The directory filter to apply. + The is closed after creation. + + + + Create a zip archive sending output to the passed. + + The stream to write archive data to. + The directory to source files from. + True to recurse directories, false for no recursion. + The file filter to apply. + The directory filter to apply. + true to leave open after the zip has been created, false to dispose it. + + + + Create a zip file. + + The name of the zip file to create. + The directory to source files from. + True to recurse directories, false for no recursion. + The file filter to apply. + The directory filter to apply. + + + + Create a zip archive sending output to the passed. + + The stream to write archive data to. + The directory to source files from. + True to recurse directories, false for no recursion. + The file filter to apply. + The directory filter to apply. + true to leave open after the zip has been created, false to dispose it. + + + + Create a zip archive sending output to the passed. + + The stream to write archive data to. + The directory to source files from. + True to recurse directories, false for no recursion. + For performing the actual file system scan + true to leave open after the zip has been created, false to dispose it. + The is closed after creation. + + + + Extract the contents of a zip file. + + The zip file to extract from. + The directory to save extracted information in. + A filter to apply to files. + + + + Extract the contents of a zip file. + + The zip file to extract from. + The directory to save extracted information in. + The style of overwriting to apply. + A delegate to invoke when confirming overwriting. + A filter to apply to files. + A filter to apply to directories. + Flag indicating whether to restore the date and time for extracted files. + Allow parent directory traversal in file paths (e.g. ../file) + + + + Extract the contents of a zip file held in a stream. + + The seekable input stream containing the zip to extract from. + The directory to save extracted information in. + The style of overwriting to apply. + A delegate to invoke when confirming overwriting. + A filter to apply to files. + A filter to apply to directories. + Flag indicating whether to restore the date and time for extracted files. + Flag indicating whether the inputStream will be closed by this method. + Allow parent directory traversal in file paths (e.g. ../file) + + + + Defines factory methods for creating new values. + + + + + Create a for a file given its name + + The name of the file to create an entry for. + Returns a file entry based on the passed. + + + + Create a for a file given its name + + The name of the file to create an entry for. + If true get details from the file system if the file exists. + Returns a file entry based on the passed. + + + + Create a for a file given its actual name and optional override name + + The name of the file to create an entry for. + An alternative name to be used for the new entry. Null if not applicable. + If true get details from the file system if the file exists. + Returns a file entry based on the passed. + + + + Create a for a directory given its name + + The name of the directory to create an entry for. + Returns a directory entry based on the passed. + + + + Create a for a directory given its name + + The name of the directory to create an entry for. + If true get details from the file system for this directory if it exists. + Returns a directory entry based on the passed. + + + + Get/set the applicable. + + + + + Get the in use. + + + + + Get the value to use when is set to , + or if not specified, the value of when the class was the initialized + + + + + WindowsNameTransform transforms names to windows compatible ones. + + + + + The maximum windows path name permitted. + + This may not valid for all windows systems - CE?, etc but I cant find the equivalent in the CLR. + + + + In this case we need Windows' invalid path characters. + Path.GetInvalidPathChars() only returns a subset invalid on all platforms. + + + + + Initialises a new instance of + + + Allow parent directory traversal in file paths (e.g. ../file) + + + + Initialise a default instance of + + + + + Gets or sets a value containing the target directory to prefix values with. + + + + + Allow parent directory traversal in file paths (e.g. ../file) + + + + + Gets or sets a value indicating whether paths on incoming values should be removed. + + + + + Transform a Zip directory name to a windows directory name. + + The directory name to transform. + The transformed name. + + + + Transform a Zip format file name to a windows style one. + + The file name to transform. + The transformed name. + + + + Test a name to see if it is a valid name for a windows filename as extracted from a Zip archive. + + The name to test. + Returns true if the name is a valid zip name; false otherwise. + The filename isnt a true windows path in some fundamental ways like no absolute paths, no rooted paths etc. + + + + Force a name to be valid by replacing invalid characters with a fixed value + + The name to make valid + The replacement character to use for any invalid characters. + Returns a valid name + + + + Gets or set the character to replace invalid characters during transformations. + + + + + Determines how entries are tested to see if they should use Zip64 extensions or not. + + + + + Zip64 will not be forced on entries during processing. + + An entry can have this overridden if required + + + + Zip64 should always be used. + + + + + #ZipLib will determine use based on entry values when added to archive. + + + + + The kind of compression used for an entry in an archive + + + + + A direct copy of the file contents is held in the archive + + + + + Common Zip compression method using a sliding dictionary + of up to 32KB and secondary compression from Huffman/Shannon-Fano trees + + + + + An extension to deflate with a 64KB window. Not supported by #Zip currently + + + + + BZip2 compression. Not supported by #Zip. + + + + + LZMA compression. Not supported by #Zip. + + + + + PPMd compression. Not supported by #Zip. + + + + + WinZip special for AES encryption, Now supported by #Zip. + + + + + Identifies the encryption algorithm used for an entry + + + + + No encryption has been used. + + + + + Encrypted using PKZIP 2.0 or 'classic' encryption. + + + + + DES encryption has been used. + + + + + RC2 encryption has been used for encryption. + + + + + Triple DES encryption with 168 bit keys has been used for this entry. + + + + + Triple DES with 112 bit keys has been used for this entry. + + + + + AES 128 has been used for encryption. + + + + + AES 192 has been used for encryption. + + + + + AES 256 has been used for encryption. + + + + + RC2 corrected has been used for encryption. + + + + + Blowfish has been used for encryption. + + + + + Twofish has been used for encryption. + + + + + RC4 has been used for encryption. + + + + + An unknown algorithm has been used for encryption. + + + + + Defines the contents of the general bit flags field for an archive entry. + + + + + Bit 0 if set indicates that the file is encrypted + + + + + Bits 1 and 2 - Two bits defining the compression method (only for Method 6 Imploding and 8,9 Deflating) + + + + + Bit 3 if set indicates a trailing data descriptor is appended to the entry data + + + + + Bit 4 is reserved for use with method 8 for enhanced deflation + + + + + Bit 5 if set indicates the file contains Pkzip compressed patched data. + Requires version 2.7 or greater. + + + + + Bit 6 if set indicates strong encryption has been used for this entry. + + + + + Bit 7 is currently unused + + + + + Bit 8 is currently unused + + + + + Bit 9 is currently unused + + + + + Bit 10 is currently unused + + + + + Bit 11 if set indicates the filename and + comment fields for this file must be encoded using UTF-8. + + + + + Bit 12 is documented as being reserved by PKware for enhanced compression. + + + + + Bit 13 if set indicates that values in the local header are masked to hide + their actual values, and the central directory is encrypted. + + + Used when encrypting the central directory contents. + + + + + Bit 14 is documented as being reserved for use by PKware + + + + + Bit 15 is documented as being reserved for use by PKware + + + + + This class contains constants used for Zip format files + + + + + The version made by field for entries in the central header when created by this library + + + This is also the Zip version for the library when comparing against the version required to extract + for an entry. See . + + + + + The version made by field for entries in the central header when created by this library + + + This is also the Zip version for the library when comparing against the version required to extract + for an entry. See ZipInputStream.CanDecompressEntry. + + + + + The minimum version required to support strong encryption + + + + + The minimum version required to support strong encryption + + + + + Version indicating AES encryption + + + + + The version required for Zip64 extensions (4.5 or higher) + + + + + The version required for BZip2 compression (4.6 or higher) + + + + + Size of local entry header (excluding variable length fields at end) + + + + + Size of local entry header (excluding variable length fields at end) + + + + + Size of Zip64 data descriptor + + + + + Size of data descriptor + + + + + Size of data descriptor + + + + + Size of central header entry (excluding variable fields) + + + + + Size of central header entry + + + + + Size of end of central record (excluding variable fields) + + + + + Size of end of central record (excluding variable fields) + + + + + Size of 'classic' cryptographic header stored before any entry data + + + + + Size of cryptographic header stored before entry data + + + + + The size of the Zip64 central directory locator. + + + + + Signature for local entry header + + + + + Signature for local entry header + + + + + Signature for spanning entry + + + + + Signature for spanning entry + + + + + Signature for temporary spanning entry + + + + + Signature for temporary spanning entry + + + + + Signature for data descriptor + + + This is only used where the length, Crc, or compressed size isnt known when the + entry is created and the output stream doesnt support seeking. + The local entry cannot be 'patched' with the correct values in this case + so the values are recorded after the data prefixed by this header, as well as in the central directory. + + + + + Signature for data descriptor + + + This is only used where the length, Crc, or compressed size isnt known when the + entry is created and the output stream doesnt support seeking. + The local entry cannot be 'patched' with the correct values in this case + so the values are recorded after the data prefixed by this header, as well as in the central directory. + + + + + Signature for central header + + + + + Signature for central header + + + + + Signature for Zip64 central file header + + + + + Signature for Zip64 central file header + + + + + Signature for Zip64 central directory locator + + + + + Signature for archive extra data signature (were headers are encrypted). + + + + + Central header digital signature + + + + + Central header digital signature + + + + + End of central directory record signature + + + + + End of central directory record signature + + + + + Default encoding used for string conversion. 0 gives the default system OEM code page. + Using the default code page isnt the full solution necessarily + there are many variable factors, codepage 850 is often a good choice for + European users, however be careful about compatability. + + + + Deprecated wrapper for + + + Deprecated wrapper for + + + Deprecated wrapper for + + + Deprecated wrapper for + + + Deprecated wrapper for + + + Deprecated wrapper for + + + + The method of encrypting entries when creating zip archives. + + + + + No encryption will be used. + + + + + Encrypt entries with ZipCrypto. + + + + + Encrypt entries with AES 128. + + + + + Encrypt entries with AES 256. + + + + + Defines known values for the property. + + + + + Host system = MSDOS + + + + + Host system = Amiga + + + + + Host system = Open VMS + + + + + Host system = Unix + + + + + Host system = VMCms + + + + + Host system = Atari ST + + + + + Host system = OS2 + + + + + Host system = Macintosh + + + + + Host system = ZSystem + + + + + Host system = Cpm + + + + + Host system = Windows NT + + + + + Host system = MVS + + + + + Host system = VSE + + + + + Host system = Acorn RISC + + + + + Host system = VFAT + + + + + Host system = Alternate MVS + + + + + Host system = BEOS + + + + + Host system = Tandem + + + + + Host system = OS400 + + + + + Host system = OSX + + + + + Host system = WinZIP AES + + + + + This class represents an entry in a zip archive. This can be a file + or a directory + ZipFile and ZipInputStream will give you instances of this class as + information about the members in an archive. ZipOutputStream + uses an instance of this class when creating an entry in a Zip file. +
    +
    Author of the original java version : Jochen Hoenicke +
    +
    + + + Creates a zip entry with the given name. + + + The name for this entry. Can include directory components. + The convention for names is 'unix' style paths with relative names only. + There are with no device names and path elements are separated by '/' characters. + + + The name passed is null + + + + + Creates a zip entry with the given name and version required to extract + + + The name for this entry. Can include directory components. + The convention for names is 'unix' style paths with no device names and + path elements separated by '/' characters. This is not enforced see CleanName + on how to ensure names are valid if this is desired. + + + The minimum 'feature version' required this entry + + + The name passed is null + + + + + Initializes an entry with the given name and made by information + + Name for this entry + Version and HostSystem Information + Minimum required zip feature version required to extract this entry + Compression method for this entry. + + The name passed is null + + + versionRequiredToExtract should be 0 (auto-calculate) or > 10 + + + This constructor is used by the ZipFile class when reading from the central header + It is not generally useful, use the constructor specifying the name only. + + + + + Creates a deep copy of the given zip entry. + + + The entry to copy. + + + + + Get a value indicating whether the entry has a CRC value available. + + + + + Get/Set flag indicating if entry is encrypted. + A simple helper routine to aid interpretation of flags + + This is an assistant that interprets the flags property. + + + + Get / set a flag indicating whether entry name and comment text are + encoded in unicode UTF8. + + This is an assistant that interprets the flags property. + + + + Value used during password checking for PKZIP 2.0 / 'classic' encryption. + + + + + Get/Set general purpose bit flag for entry + + + General purpose bit flag
    +
    + Bit 0: If set, indicates the file is encrypted
    + Bit 1-2 Only used for compression type 6 Imploding, and 8, 9 deflating
    + Imploding:
    + Bit 1 if set indicates an 8K sliding dictionary was used. If clear a 4k dictionary was used
    + Bit 2 if set indicates 3 Shannon-Fanno trees were used to encode the sliding dictionary, 2 otherwise
    +
    + Deflating:
    + Bit 2 Bit 1
    + 0 0 Normal compression was used
    + 0 1 Maximum compression was used
    + 1 0 Fast compression was used
    + 1 1 Super fast compression was used
    +
    + Bit 3: If set, the fields crc-32, compressed size + and uncompressed size are were not able to be written during zip file creation + The correct values are held in a data descriptor immediately following the compressed data.
    + Bit 4: Reserved for use by PKZIP for enhanced deflating
    + Bit 5: If set indicates the file contains compressed patch data
    + Bit 6: If set indicates strong encryption was used.
    + Bit 7-10: Unused or reserved
    + Bit 11: If set the name and comments for this entry are in unicode.
    + Bit 12-15: Unused or reserved
    +
    + + +
    + + + Get/Set index of this entry in Zip file + + This is only valid when the entry is part of a + + + + Get/set offset for use in central header + + + + + Get/Set external file attributes as an integer. + The values of this are operating system dependent see + HostSystem for details + + + + + Get the version made by for this entry or zero if unknown. + The value / 10 indicates the major version number, and + the value mod 10 is the minor version number + + + + + Get a value indicating this entry is for a DOS/Windows system. + + + + + Test the external attributes for this to + see if the external attributes are Dos based (including WINNT and variants) + and match the values + + The attributes to test. + Returns true if the external attributes are known to be DOS/Windows + based and have the same attributes set as the value passed. + + + + Gets the compatibility information for the external file attribute + If the external file attributes are compatible with MS-DOS and can be read + by PKZIP for DOS version 2.04g then this value will be zero. Otherwise the value + will be non-zero and identify the host system on which the attributes are compatible. + + + + The values for this as defined in the Zip File format and by others are shown below. The values are somewhat + misleading in some cases as they are not all used as shown. You should consult the relevant documentation + to obtain up to date and correct information. The modified appnote by the infozip group is + particularly helpful as it documents a lot of peculiarities. The document is however a little dated. + + 0 - MS-DOS and OS/2 (FAT / VFAT / FAT32 file systems) + 1 - Amiga + 2 - OpenVMS + 3 - Unix + 4 - VM/CMS + 5 - Atari ST + 6 - OS/2 HPFS + 7 - Macintosh + 8 - Z-System + 9 - CP/M + 10 - Windows NTFS + 11 - MVS (OS/390 - Z/OS) + 12 - VSE + 13 - Acorn Risc + 14 - VFAT + 15 - Alternate MVS + 16 - BeOS + 17 - Tandem + 18 - OS/400 + 19 - OS/X (Darwin) + 99 - WinZip AES + remainder - unused + + + + + + Get minimum Zip feature version required to extract this entry + + + Minimum features are defined as:
    + 1.0 - Default value
    + 1.1 - File is a volume label
    + 2.0 - File is a folder/directory
    + 2.0 - File is compressed using Deflate compression
    + 2.0 - File is encrypted using traditional encryption
    + 2.1 - File is compressed using Deflate64
    + 2.5 - File is compressed using PKWARE DCL Implode
    + 2.7 - File is a patch data set
    + 4.5 - File uses Zip64 format extensions
    + 4.6 - File is compressed using BZIP2 compression
    + 5.0 - File is encrypted using DES
    + 5.0 - File is encrypted using 3DES
    + 5.0 - File is encrypted using original RC2 encryption
    + 5.0 - File is encrypted using RC4 encryption
    + 5.1 - File is encrypted using AES encryption
    + 5.1 - File is encrypted using corrected RC2 encryption
    + 5.1 - File is encrypted using corrected RC2-64 encryption
    + 6.1 - File is encrypted using non-OAEP key wrapping
    + 6.2 - Central directory encryption (not confirmed yet)
    + 6.3 - File is compressed using LZMA
    + 6.3 - File is compressed using PPMD+
    + 6.3 - File is encrypted using Blowfish
    + 6.3 - File is encrypted using Twofish
    +
    + +
    + + + Get a value indicating whether this entry can be decompressed by the library. + + This is based on the and + whether the compression method is supported. + + + + Force this entry to be recorded using Zip64 extensions. + + + + + Get a value indicating whether Zip64 extensions were forced. + + A value of true if Zip64 extensions have been forced on; false if not. + + + + Gets a value indicating if the entry requires Zip64 extensions + to store the full entry values. + + A value of true if a local header requires Zip64 extensions; false if not. + + + + Get a value indicating whether the central directory entry requires Zip64 extensions to be stored. + + + + + Get/Set DosTime value. + + + The MS-DOS date format can only represent dates between 1/1/1980 and 12/31/2107. + + + + + Gets/Sets the time of last modification of the entry. + + + The property is updated to match this as far as possible. + + + + + Returns the entry name. + + + The unix naming convention is followed. + Path components in the entry should always separated by forward slashes ('/'). + Dos device names like C: should also be removed. + See the class, or + + + + + Gets/Sets the size of the uncompressed data. + + + The size or -1 if unknown. + + Setting the size before adding an entry to an archive can help + avoid compatibility problems with some archivers which don't understand Zip64 extensions. + + + + Gets/Sets the size of the compressed data. + + + The compressed entry size or -1 if unknown. + + + + + Gets/Sets the crc of the uncompressed data. + + + Crc is not in the range 0..0xffffffffL + + + The crc value or -1 if unknown. + + + + + Gets/Sets the compression method. + + + The compression method for this entry + + + + + Gets the compression method for outputting to the local or central header. + Returns same value as CompressionMethod except when AES encrypting, which + places 99 in the method and places the real method in the extra data. + + + + + Gets/Sets the extra data. + + + Extra data is longer than 64KB (0xffff) bytes. + + + Extra data or null if not set. + + + + + For AES encrypted files returns or sets the number of bits of encryption (128, 192 or 256). + When setting, only 0 (off), 128 or 256 is supported. + + + + + AES Encryption strength for storage in extra data in entry header. + 1 is 128 bit, 2 is 192 bit, 3 is 256 bit. + + + + + Returns the length of the salt, in bytes + + Key size -> Salt length: 128 bits = 8 bytes, 192 bits = 12 bytes, 256 bits = 16 bytes. + + + + Number of extra bytes required to hold the AES Header fields (Salt, Pwd verify, AuthCode) + + File format: + Bytes | Content + ---------+--------------------------- + Variable | Salt value + 2 | Password verification value + Variable | Encrypted file data + 10 | Authentication code + + + + Number of extra bytes required to hold the encryption header fields. + + + + + Process extra data fields updating the entry based on the contents. + + True if the extra data fields should be handled + for a local header, rather than for a central header. + + + + + Gets/Sets the entry comment. + + + If comment is longer than 0xffff. + + + The comment or null if not set. + + + A comment is only available for entries when read via the class. + The class doesn't have the comment data available. + + + + + Gets a value indicating if the entry is a directory. + however. + + + A directory is determined by an entry name with a trailing slash '/'. + The external file attributes can also indicate an entry is for a directory. + Currently only dos/windows attributes are tested in this manner. + The trailing slash convention should always be followed. + + + + + Get a value of true if the entry appears to be a file; false otherwise + + + This only takes account of DOS/Windows attributes. Other operating systems are ignored. + For linux and others the result may be incorrect. + + + + + Test entry to see if data can be extracted. + + Returns true if data can be extracted for this entry; false otherwise. + + + + Creates a copy of this zip entry. + + An that is a copy of the current instance. + + + + Gets a string representation of this ZipEntry. + + A readable textual representation of this + + + + Test a compression method to see if this library + supports extracting data compressed with that method + + The compression method to test. + Returns true if the compression method is supported; false otherwise + + + + Cleans a name making it conform to Zip file conventions. + Devices names ('c:\') and UNC share names ('\\server\share') are removed + and forward slashes ('\') are converted to back slashes ('/'). + Names are made relative by trimming leading slashes which is compatible + with the ZIP naming convention. + + The name to clean + The 'cleaned' name. + + The Zip name transform class is more flexible. + + + + + General ZipEntry helper extensions + + + + + Efficiently check if a flag is set without enum un-/boxing + + + + Returns whether the flag was set + + + + Efficiently set a flag without enum un-/boxing + + + + Whether the passed flag should be set (1) or cleared (0) + + + + Basic implementation of + + + + + Defines the possible values to be used for the . + + + + + Use the recorded LastWriteTime value for the file. + + + + + Use the recorded LastWriteTimeUtc value for the file + + + + + Use the recorded CreateTime value for the file. + + + + + Use the recorded CreateTimeUtc value for the file. + + + + + Use the recorded LastAccessTime value for the file. + + + + + Use the recorded LastAccessTimeUtc value for the file. + + + + + Use a fixed value. + + The actual value used can be + specified via the constructor or + using the with the setting set + to which will use the when this class was constructed. + The property can also be used to set this value. + + + + Initialise a new instance of the class. + + A default , and the LastWriteTime for files is used. + + + + Initialise a new instance of using the specified + + The time setting to use when creating Zip entries. + + + + Initialise a new instance of using the specified + + The time to set all values to. + + + + Get / set the to be used when creating new values. + + + Setting this property to null will cause a default name transform to be used. + + + + + Get / set the in use. + + + + + Get / set the value to use when is set to + + + + + A bitmask defining the attributes to be retrieved from the actual file. + + The default is to get all possible attributes from the actual file. + + + + A bitmask defining which attributes are to be set on. + + By default no attributes are set on. + + + + Get set a value indicating whether unidoce text should be set on. + + + + + Make a new for a file. + + The name of the file to create a new entry for. + Returns a new based on the . + + + + Make a new for a file. + + The name of the file to create a new entry for. + If true entry detail is retrieved from the file system if the file exists. + Returns a new based on the . + + + + Make a new from a name. + + The name of the file to create a new entry for. + An alternative name to be used for the new entry. Null if not applicable. + If true entry detail is retrieved from the file system if the file exists. + Returns a new based on the . + + + + Make a new for a directory. + + The raw untransformed name for the new directory + Returns a new representing a directory. + + + + Make a new for a directory. + + The raw untransformed name for the new directory + If true entry detail is retrieved from the file system if the file exists. + Returns a new representing a directory. + + + + ZipException represents exceptions specific to Zip classes and code. + + + + + Initialise a new instance of . + + + + + Initialise a new instance of with its message string. + + A that describes the error. + + + + Initialise a new instance of . + + A that describes the error. + The that caused this exception. + + + + Initializes a new instance of the ZipException class with serialized data. + + + The System.Runtime.Serialization.SerializationInfo that holds the serialized + object data about the exception being thrown. + + + The System.Runtime.Serialization.StreamingContext that contains contextual information + about the source or destination. + + + + + ExtraData tagged value interface. + + + + + Get the ID for this tagged data value. + + + + + Set the contents of this instance from the data passed. + + The data to extract contents from. + The offset to begin extracting data from. + The number of bytes to extract. + + + + Get the data representing this instance. + + Returns the data for this instance. + + + + A raw binary tagged value + + + + + Initialise a new instance. + + The tag ID. + + + + Get the ID for this tagged data value. + + + + + Set the data from the raw values provided. + + The raw data to extract values from. + The index to start extracting values from. + The number of bytes available. + + + + Get the binary data representing this instance. + + The raw binary data representing this instance. + + + + Get /set the binary data representing this instance. + + The raw binary data representing this instance. + + + + The tag ID for this instance. + + + + + Class representing extended unix date time values. + + + + + Flags indicate which values are included in this instance. + + + + + The modification time is included + + + + + The access time is included + + + + + The create time is included. + + + + + Get the ID + + + + + Set the data from the raw values provided. + + The raw data to extract values from. + The index to start extracting values from. + The number of bytes available. + + + + Get the binary data representing this instance. + + The raw binary data representing this instance. + + + + Test a value to see if is valid and can be represented here. + + The value to test. + Returns true if the value is valid and can be represented; false if not. + The standard Unix time is a signed integer data type, directly encoding the Unix time number, + which is the number of seconds since 1970-01-01. + Being 32 bits means the values here cover a range of about 136 years. + The minimum representable time is 1901-12-13 20:45:52, + and the maximum representable time is 2038-01-19 03:14:07. + + + + + Get /set the Modification Time + + + + + + + Get / set the Access Time + + + + + + + Get / Set the Create Time + + + + + + + Get/set the values to include. + + + + + Class handling NT date time values. + + + + + Get the ID for this tagged data value. + + + + + Set the data from the raw values provided. + + The raw data to extract values from. + The index to start extracting values from. + The number of bytes available. + + + + Get the binary data representing this instance. + + The raw binary data representing this instance. + + + + Test a valuie to see if is valid and can be represented here. + + The value to test. + Returns true if the value is valid and can be represented; false if not. + + NTFS filetimes are 64-bit unsigned integers, stored in Intel + (least significant byte first) byte order. They determine the + number of 1.0E-07 seconds (1/10th microseconds!) past WinNT "epoch", + which is "01-Jan-1601 00:00:00 UTC". 28 May 60056 is the upper limit + + + + + Get/set the last modification time. + + + + + Get /set the create time + + + + + Get /set the last access time. + + + + + A factory that creates tagged data instances. + + + + + Get data for a specific tag value. + + The tag ID to find. + The data to search. + The offset to begin extracting data from. + The number of bytes to extract. + The located value found, or null if not found. + + + + + A class to handle the extra data field for Zip entries + + + Extra data contains 0 or more values each prefixed by a header tag and length. + They contain zero or more bytes of actual data. + The data is held internally using a copy on write strategy. This is more efficient but + means that for extra data created by passing in data can have the values modified by the caller + in some circumstances. + + + + + Initialise a default instance. + + + + + Initialise with known extra data. + + The extra data. + + + + Get the raw extra data value + + Returns the raw byte[] extra data this instance represents. + + + + Clear the stored data. + + + + + Gets the current extra data length. + + + + + Get a read-only for the associated tag. + + The tag to locate data for. + Returns a containing tag data or null if no tag was found. + + + + Get the tagged data for a tag. + + The tag to search for. + Returns a tagged value or null if none found. + + + + Get the length of the last value found by + + This is only valid if has previously returned true. + + + + Get the index for the current read value. + + This is only valid if has previously returned true. + Initially the result will be the index of the first byte of actual data. The value is updated after calls to + , and . + + + + Get the number of bytes remaining to be read for the current value; + + + + + Find an extra data value + + The identifier for the value to find. + Returns true if the value was found; false otherwise. + + + + Add a new entry to extra data. + + The value to add. + + + + Add a new entry to extra data + + The ID for this entry. + The data to add. + If the ID already exists its contents are replaced. + + + + Start adding a new entry. + + Add data using , , , or . + The new entry is completed and actually added by calling + + + + + Add entry data added since using the ID passed. + + The identifier to use for this entry. + + + + Add a byte of data to the pending new entry. + + The byte to add. + + + + + Add data to a pending new entry. + + The data to add. + + + + + Add a short value in little endian order to the pending new entry. + + The data to add. + + + + + Add an integer value in little endian order to the pending new entry. + + The data to add. + + + + + Add a long value in little endian order to the pending new entry. + + The data to add. + + + + + Delete an extra data field. + + The identifier of the field to delete. + Returns true if the field was found and deleted. + + + + Read a long in little endian form from the last found data value + + Returns the long value read. + + + + Read an integer in little endian form from the last found data value. + + Returns the integer read. + + + + Read a short value in little endian form from the last found data value. + + Returns the short value read. + + + + Read a byte from an extra data + + The byte value read or -1 if the end of data has been reached. + + + + Skip data during reading. + + The number of bytes to skip. + + + + Internal form of that reads data at any location. + + Returns the short value read. + + + + Dispose of this instance. + + + + + Arguments used with KeysRequiredEvent + + + + + Initialise a new instance of + + The name of the file for which keys are required. + + + + Initialise a new instance of + + The name of the file for which keys are required. + The current key value. + + + + Gets the name of the file for which keys are required. + + + + + Gets or sets the key value + + + + + The strategy to apply to testing. + + + + + Find the first error only. + + + + + Find all possible errors. + + + + + The operation in progress reported by a during testing. + + TestArchive + + + + Setting up testing. + + + + + Testing an individual entries header + + + + + Testing an individual entries data + + + + + Testing an individual entry has completed. + + + + + Running miscellaneous tests + + + + + Testing is complete + + + + + Status returned by during testing. + + TestArchive + + + + Initialise a new instance of + + The this status applies to. + + + + Get the current in progress. + + + + + Get the this status is applicable to. + + + + + Get the current/last entry tested. + + + + + Get the number of errors detected so far. + + + + + Get the number of bytes tested so far for the current entry. + + + + + Get a value indicating whether the last entry test was valid. + + + + + Delegate invoked during testing if supplied indicating current progress and status. + + If the message is non-null an error has occured. If the message is null + the operation as found in status has started. + + + + The possible ways of applying updates to an archive. + + + + + Perform all updates on temporary files ensuring that the original file is saved. + + + + + Update the archive directly, which is faster but less safe. + + + + + This class represents a Zip archive. You can ask for the contained + entries, or get an input stream for a file entry. The entry is + automatically decompressed. + + You can also update the archive adding or deleting entries. + + This class is thread safe for input: You can open input streams for arbitrary + entries in different threads. +
    +
    Author of the original java version : Jochen Hoenicke +
    + + + using System; + using System.Text; + using System.Collections; + using System.IO; + + using ICSharpCode.SharpZipLib.Zip; + + class MainClass + { + static public void Main(string[] args) + { + using (ZipFile zFile = new ZipFile(args[0])) { + Console.WriteLine("Listing of : " + zFile.Name); + Console.WriteLine(""); + Console.WriteLine("Raw Size Size Date Time Name"); + Console.WriteLine("-------- -------- -------- ------ ---------"); + foreach (ZipEntry e in zFile) { + if ( e.IsFile ) { + DateTime d = e.DateTime; + Console.WriteLine("{0, -10}{1, -10}{2} {3} {4}", e.Size, e.CompressedSize, + d.ToString("dd-MM-yy"), d.ToString("HH:mm"), + e.Name); + } + } + } + } + } + + +
    + + + Delegate for handling keys/password setting during compression/decompression. + + + + + Event handler for handling encryption keys. + + + + + Handles getting of encryption keys when required. + + The file for which encryption keys are required. + + + + Get/set the encryption key value. + + + + + Password to be used for encrypting/decrypting files. + + Set to null if no password is required. + + + + Get a value indicating whether encryption keys are currently available. + + + + + Opens a Zip file with the given name for reading. + + The name of the file to open. + The argument supplied is null. + + An i/o error occurs + + + The file doesn't contain a valid zip archive. + + + + + Opens a Zip file reading the given . + + The to read archive data from. + The supplied argument is null. + + An i/o error occurs. + + + The file doesn't contain a valid zip archive. + + + + + Opens a Zip file reading the given . + + The to read archive data from. + true to leave the file open when the ZipFile is disposed, false to dispose of it + The supplied argument is null. + + An i/o error occurs. + + + The file doesn't contain a valid zip archive. + + + + + Opens a Zip file reading the given . + + The to read archive data from. + + An i/o error occurs + + + The stream doesn't contain a valid zip archive.
    +
    + + The stream doesnt support seeking. + + + The stream argument is null. + +
    + + + Opens a Zip file reading the given . + + The to read archive data from. + true to leave the stream open when the ZipFile is disposed, false to dispose of it + + An i/o error occurs + + + The stream doesn't contain a valid zip archive.
    +
    + + The stream doesnt support seeking. + + + The stream argument is null. + +
    + + + Initialises a default instance with no entries and no file storage. + + + + + Finalize this instance. + + + + + Closes the ZipFile. If the stream is owned then this also closes the underlying input stream. + Once closed, no further instance methods should be called. + + + An i/o error occurs. + + + + + Create a new whose data will be stored in a file. + + The name of the archive to create. + Returns the newly created + is null + + + + Create a new whose data will be stored on a stream. + + The stream providing data storage. + Returns the newly created + is null + doesnt support writing. + + + + Get/set a flag indicating if the underlying stream is owned by the ZipFile instance. + If the flag is true then the stream will be closed when Close is called. + + + The default value is true in all cases. + + + + + Get a value indicating whether + this archive is embedded in another file or not. + + + + + Get a value indicating that this archive is a new one. + + + + + Gets the comment for the zip file. + + + + + Gets the name of this zip file. + + + + + Gets the number of entries in this zip file. + + + The Zip file has been closed. + + + + + Get the number of entries contained in this . + + + + + Indexer property for ZipEntries + + + + + Gets an enumerator for the Zip entries in this Zip file. + + Returns an for this archive. + + The Zip file has been closed. + + + + + Return the index of the entry with a matching name + + Entry name to find + If true the comparison is case insensitive + The index position of the matching entry or -1 if not found + + The Zip file has been closed. + + + + + Searches for a zip entry in this archive with the given name. + String comparisons are case insensitive + + + The name to find. May contain directory components separated by slashes ('/'). + + + A clone of the zip entry, or null if no entry with that name exists. + + + The Zip file has been closed. + + + + + Gets an input stream for reading the given zip entry data in an uncompressed form. + Normally the should be an entry returned by GetEntry(). + + The to obtain a data for + An input containing data for this + + The ZipFile has already been closed + + + The compression method for the entry is unknown + + + The entry is not found in the ZipFile + + + + + Creates an input stream reading a zip entry + + The index of the entry to obtain an input stream for. + + An input containing data for this + + + The ZipFile has already been closed + + + The compression method for the entry is unknown + + + The entry is not found in the ZipFile + + + + + Test an archive for integrity/validity + + Perform low level data Crc check + true if all tests pass, false otherwise + Testing will terminate on the first error found. + + + + Test an archive for integrity/validity + + Perform low level data Crc check + The to apply. + The handler to call during testing. + true if all tests pass, false otherwise + The object has already been closed. + + + + Test a local header against that provided from the central directory + + + The entry to test against + + The type of tests to carry out. + The offset of the entries data in the file + + + + The kind of update to apply. + + + + + Get / set the to apply to names when updating. + + + + + Get/set the used to generate values + during updates. + + + + + Get /set the buffer size to be used when updating this zip file. + + + + + Get a value indicating an update has been started. + + + + + Get / set a value indicating how Zip64 Extension usage is determined when adding entries. + + + + + Begin updating this archive. + + The archive storage for use during the update. + The data source to utilise during updating. + ZipFile has been closed. + One of the arguments provided is null + ZipFile has been closed. + + + + Begin updating to this archive. + + The storage to use during the update. + + + + Begin updating this archive. + + + + + + + + Commit current updates, updating this archive. + + + + ZipFile has been closed. + + + + Abort updating leaving the archive unchanged. + + + + + + + Set the file comment to be recorded when the current update is commited. + + The comment to record. + ZipFile has been closed. + + + + Add a new entry to the archive. + + The name of the file to add. + The compression method to use. + Ensure Unicode text is used for name and comment for this entry. + Argument supplied is null. + ZipFile has been closed. + Compression method is not supported for creating entries. + + + + Add a new entry to the archive. + + The name of the file to add. + The compression method to use. + ZipFile has been closed. + Compression method is not supported for creating entries. + + + + Add a file to the archive. + + The name of the file to add. + Argument supplied is null. + + + + Add a file to the archive. + + The name of the file to add. + The name to use for the on the Zip file created. + Argument supplied is null. + + + + Add a file entry with data. + + The source of the data for this entry. + The name to give to the entry. + + + + Add a file entry with data. + + The source of the data for this entry. + The name to give to the entry. + The compression method to use. + Compression method is not supported for creating entries. + + + + Add a file entry with data. + + The source of the data for this entry. + The name to give to the entry. + The compression method to use. + Ensure Unicode text is used for name and comments for this entry. + Compression method is not supported for creating entries. + + + + Add a that contains no data. + + The entry to add. + This can be used to add directories, volume labels, or empty file entries. + + + + Add a with data. + + The source of the data for this entry. + The entry to add. + This can be used to add file entries with a custom data source. + + The encryption method specified in is unsupported. + + Compression method is not supported for creating entries. + + + + Add a directory entry to the archive. + + The directory to add. + + + + Check if the specified compression method is supported for adding a new entry. + + The compression method for the new entry. + + + + Delete an entry by name + + The filename to delete + True if the entry was found and deleted; false otherwise. + + + + Delete a from the archive. + + The entry to delete. + + + + Write an unsigned short in little endian byte order. + + + + + Write an int in little endian byte order. + + + + + Write an unsigned int in little endian byte order. + + + + + Write a long in little endian byte order. + + + + + Get a raw memory buffer. + + Returns a raw memory buffer. + + + + Get the size of the source descriptor for a . + + The update to get the size for. + Whether to include the signature size + The descriptor size, zero if there isn't one. + + + + Get an output stream for the specified + + The entry to get an output stream for. + The output stream obtained for the entry. + + + + Class used to sort updates. + + + + + Compares two objects and returns a value indicating whether one is + less than, equal to or greater than the other. + + First object to compare + Second object to compare. + Compare result. + + + + Represents a pending update to a Zip file. + + + + + Copy an existing entry. + + The existing entry to copy. + + + + Get the for this update. + + This is the source or original entry. + + + + Get the that will be written to the updated/new file. + + + + + Get the command for this update. + + + + + Get the filename if any for this update. Null if none exists. + + + + + Get/set the location of the size patch for this update. + + + + + Get /set the location of the crc patch for this update. + + + + + Get/set the size calculated by offset. + Specifically, the difference between this and next entry's starting offset. + + + + + Releases the unmanaged resources used by the this instance and optionally releases the managed resources. + + true to release both managed and unmanaged resources; + false to release only unmanaged resources. + + + + Read an unsigned short in little endian byte order. + + Returns the value read. + + The stream ends prematurely + + + + + Read a uint in little endian byte order. + + Returns the value read. + + An i/o error occurs. + + + The file ends prematurely + + + + + Search for and read the central directory of a zip file filling the entries array. + + + An i/o error occurs. + + + The central directory is malformed or cannot be found + + + + + Locate the data for a given entry. + + + The start offset of the data. + + + The stream ends prematurely + + + The local header signature is invalid, the entry and central header file name lengths are different + or the local and entry compression methods dont match + + + + + Represents a string from a which is stored as an array of bytes. + + + + + Initialise a with a string. + + The textual string form. + + + + Initialise a using a string in its binary 'raw' form. + + + + + + Get a value indicating the original source of data for this instance. + True if the source was a string; false if the source was binary data. + + + + + Get the length of the comment when represented as raw bytes. + + + + + Get the comment in its 'raw' form as plain bytes. + + + + + Reset the comment to its initial state. + + + + + Implicit conversion of comment to a string. + + The to convert to a string. + The textual equivalent for the input value. + + + + An enumerator for Zip entries + + + + + An is a stream that you can write uncompressed data + to and flush, but cannot read, seek or do anything else to. + + + + + Gets a value indicating whether the current stream supports reading. + + + + + Write any buffered data to underlying storage. + + + + + Gets a value indicating whether the current stream supports writing. + + + + + Gets a value indicating whether the current stream supports seeking. + + + + + Get the length in bytes of the stream. + + + + + Gets or sets the position within the current stream. + + + + + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source. + The zero-based byte offset in buffer at which to begin storing the data read from the current stream. + The maximum number of bytes to be read from the current stream. + + The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. + + The sum of offset and count is larger than the buffer length. + Methods were called after the stream was closed. + The stream does not support reading. + buffer is null. + An I/O error occurs. + offset or count is negative. + + + + Sets the position within the current stream. + + A byte offset relative to the origin parameter. + A value of type indicating the reference point used to obtain the new position. + + The new position within the current stream. + + An I/O error occurs. + The stream does not support seeking, such as if the stream is constructed from a pipe or console output. + Methods were called after the stream was closed. + + + + Sets the length of the current stream. + + The desired length of the current stream in bytes. + The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. + An I/O error occurs. + Methods were called after the stream was closed. + + + + Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + An array of bytes. This method copies count bytes from buffer to the current stream. + The zero-based byte offset in buffer at which to begin copying bytes to the current stream. + The number of bytes to be written to the current stream. + An I/O error occurs. + The stream does not support writing. + Methods were called after the stream was closed. + buffer is null. + The sum of offset and count is greater than the buffer length. + offset or count is negative. + + + + A is an + whose data is only a part or subsection of a file. + + + + + Initialise a new instance of the class. + + The containing the underlying stream to use for IO. + The start of the partial data. + The length of the partial data. + + + + Read a byte from this stream. + + Returns the byte read or -1 on end of stream. + + + + Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source. + The zero-based byte offset in buffer at which to begin storing the data read from the current stream. + The maximum number of bytes to be read from the current stream. + + The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. + + The sum of offset and count is larger than the buffer length. + Methods were called after the stream was closed. + The stream does not support reading. + buffer is null. + An I/O error occurs. + offset or count is negative. + + + + Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + An array of bytes. This method copies count bytes from buffer to the current stream. + The zero-based byte offset in buffer at which to begin copying bytes to the current stream. + The number of bytes to be written to the current stream. + An I/O error occurs. + The stream does not support writing. + Methods were called after the stream was closed. + buffer is null. + The sum of offset and count is greater than the buffer length. + offset or count is negative. + + + + When overridden in a derived class, sets the length of the current stream. + + The desired length of the current stream in bytes. + The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. + An I/O error occurs. + Methods were called after the stream was closed. + + + + When overridden in a derived class, sets the position within the current stream. + + A byte offset relative to the origin parameter. + A value of type indicating the reference point used to obtain the new position. + + The new position within the current stream. + + An I/O error occurs. + The stream does not support seeking, such as if the stream is constructed from a pipe or console output. + Methods were called after the stream was closed. + + + + Clears all buffers for this stream and causes any buffered data to be written to the underlying device. + + An I/O error occurs. + + + + Gets or sets the position within the current stream. + + + The current position within the stream. + An I/O error occurs. + The stream does not support seeking. + Methods were called after the stream was closed. + + + + Gets the length in bytes of the stream. + + + A long value representing the length of the stream in bytes. + A class derived from Stream does not support seeking. + Methods were called after the stream was closed. + + + + Gets a value indicating whether the current stream supports writing. + + false + true if the stream supports writing; otherwise, false. + + + + Gets a value indicating whether the current stream supports seeking. + + true + true if the stream supports seeking; otherwise, false. + + + + Gets a value indicating whether the current stream supports reading. + + true. + true if the stream supports reading; otherwise, false. + + + + Gets a value that determines whether the current stream can time out. + + + A value that determines whether the current stream can time out. + + + + Provides a static way to obtain a source of data for an entry. + + + + + Get a source of data by creating a new stream. + + Returns a to use for compression input. + Ideally a new stream is created and opened to achieve this, to avoid locking problems. + + + + Represents a source of data that can dynamically provide + multiple data sources based on the parameters passed. + + + + + Get a data source. + + The to get a source for. + The name for data if known. + Returns a to use for compression input. + Ideally a new stream is created and opened to achieve this, to avoid locking problems. + + + + Default implementation of a for use with files stored on disk. + + + + + Initialise a new instance of + + The name of the file to obtain data from. + + + + Get a providing data. + + Returns a providing data. + + + + Default implementation of for files stored on disk. + + + + + Get a providing data for an entry. + + The entry to provide data for. + The file name for data if known. + Returns a stream providing data; or null if not available + + + + Defines facilities for data storage when updating Zip Archives. + + + + + Get the to apply during updates. + + + + + Get an empty that can be used for temporary output. + + Returns a temporary output + + + + + Convert a temporary output stream to a final stream. + + The resulting final + + + + + Make a temporary copy of the original stream. + + The to copy. + Returns a temporary output that is a copy of the input. + + + + Return a stream suitable for performing direct updates on the original source. + + The current stream. + Returns a stream suitable for direct updating. + This may be the current stream passed. + + + + Dispose of this instance. + + + + + An abstract suitable for extension by inheritance. + + + + + Initializes a new instance of the class. + + The update mode. + + + + Gets a temporary output + + Returns the temporary output stream. + + + + + Converts the temporary to its final form. + + Returns a that can be used to read + the final storage for the archive. + + + + + Make a temporary copy of a . + + The to make a copy of. + Returns a temporary output that is a copy of the input. + + + + Return a stream suitable for performing direct updates on the original source. + + The to open for direct update. + Returns a stream suitable for direct updating. + + + + Disposes this instance. + + + + + Gets the update mode applicable. + + The update mode. + + + + An implementation suitable for hard disks. + + + + + Initializes a new instance of the class. + + The file. + The update mode. + + + + Initializes a new instance of the class. + + The file. + + + + Gets a temporary output for performing updates on. + + Returns the temporary output stream. + + + + Converts a temporary to its final form. + + Returns a that can be used to read + the final storage for the archive. + + + + Make a temporary copy of a stream. + + The to copy. + Returns a temporary output that is a copy of the input. + + + + Return a stream suitable for performing direct updates on the original source. + + The current stream. + Returns a stream suitable for direct updating. + If the is not null this is used as is. + + + + Disposes this instance. + + + + + An implementation suitable for in memory streams. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The to use + This constructor is for testing as memory streams dont really require safe mode. + + + + Get the stream returned by if this was in fact called. + + + + + Gets the temporary output + + Returns the temporary output stream. + + + + Converts the temporary to its final form. + + Returns a that can be used to read + the final storage for the archive. + + + + Make a temporary copy of the original stream. + + The to copy. + Returns a temporary output that is a copy of the input. + + + + Return a stream suitable for performing direct updates on the original source. + + The original source stream + Returns a stream suitable for direct updating. + If the passed is not null this is used; + otherwise a new is returned. + + + + Disposes this instance. + + + + + Holds data pertinent to a data descriptor. + + + + + Get /set the compressed size of data. + + + + + Get / set the uncompressed size of data + + + + + Get /set the crc value. + + + + + This class assists with writing/reading from Zip files. + + + + + Initialise an instance of this class. + + The name of the file to open. + + + + Initialise a new instance of . + + The stream to use. + + + + Get / set a value indicating whether the underlying stream is owned or not. + + If the stream is owned it is closed when this instance is closed. + + + + Close the stream. + + + The underlying stream is closed only if is true. + + + + + Locates a block with the desired . + + The signature to find. + Location, marking the end of block. + Minimum size of the block. + The maximum variable data. + Returns the offset of the first byte after the signature; -1 if not found + + + + Write Zip64 end of central directory records (File header and locator). + + The number of entries in the central directory. + The size of entries in the central directory. + The offset of the central directory. + + + + Write the required records to end the central directory. + + The number of entries in the directory. + The size of the entries in the directory. + The start of the central directory. + The archive comment. (This can be null). + + + + Read an unsigned short in little endian byte order. + + Returns the value read. + + An i/o error occurs. + + + The file ends prematurely + + + + + Read an int in little endian byte order. + + Returns the value read. + + An i/o error occurs. + + + The file ends prematurely + + + + + Read a long in little endian byte order. + + The value read. + + + + Write an unsigned short in little endian byte order. + + The value to write. + + + + Write a ushort in little endian byte order. + + The value to write. + + + + Write an int in little endian byte order. + + The value to write. + + + + Write a uint in little endian byte order. + + The value to write. + + + + Write a long in little endian byte order. + + The value to write. + + + + Write a ulong in little endian byte order. + + The value to write. + + + + Write a data descriptor. + + The entry to write a descriptor for. + Returns the number of descriptor bytes written. + + + + Read data descriptor at the end of compressed data. + + if set to true [zip64]. + The data to fill in. + Returns the number of bytes read in the descriptor. + + + + This is an InflaterInputStream that reads the files baseInputStream an zip archive + one after another. It has a special method to get the zip entry of + the next file. The zip entry contains information about the file name + size, compressed size, Crc, etc. + It includes support for Stored and Deflated entries. +
    +
    Author of the original java version : Jochen Hoenicke +
    + + This sample shows how to read a zip file + + using System; + using System.Text; + using System.IO; + + using ICSharpCode.SharpZipLib.Zip; + + class MainClass + { + public static void Main(string[] args) + { + using ( ZipInputStream s = new ZipInputStream(File.OpenRead(args[0]))) { + + ZipEntry theEntry; + const int size = 2048; + byte[] data = new byte[2048]; + + while ((theEntry = s.GetNextEntry()) != null) { + if ( entry.IsFile ) { + Console.Write("Show contents (y/n) ?"); + if (Console.ReadLine() == "y") { + while (true) { + size = s.Read(data, 0, data.Length); + if (size > 0) { + Console.Write(new ASCIIEncoding().GetString(data, 0, size)); + } else { + break; + } + } + } + } + } + } + } + } + + +
    + + + Delegate for reading bytes from a stream. + + + + + The current reader this instance. + + + + + Creates a new Zip input stream, for reading a zip archive. + + The underlying providing data. + + + + Creates a new Zip input stream, for reading a zip archive. + + The underlying providing data. + Size of the buffer. + + + + Optional password used for encryption when non-null + + A password for all encrypted entries in this + + + + Gets a value indicating if there is a current entry and it can be decompressed + + + The entry can only be decompressed if the library supports the zip features required to extract it. + See the ZipEntry Version property for more details. + + Since uses the local headers for extraction, entries with no compression combined with the + flag set, cannot be extracted as the end of the entry data cannot be deduced. + + + + + Is the compression method for the specified entry supported? + + + Uses entry.CompressionMethodForHeader so that entries of type WinZipAES will be rejected. + + the entry to check. + true if the compression method is supported, false if not. + + + + Advances to the next entry in the archive + + + The next entry in the archive or null if there are no more entries. + + + If the previous entry is still open CloseEntry is called. + + + Input stream is closed + + + Password is not set, password is invalid, compression method is invalid, + version required to extract is not supported + + + + + Read data descriptor at the end of compressed data. + + + + + Complete cleanup as the final part of closing. + + True if the crc value should be tested + + + + Closes the current zip entry and moves to the next one. + + + The stream is closed + + + The Zip stream ends early + + + + + Returns 1 if there is an entry available + Otherwise returns 0. + + + + + Returns the current size that can be read from the current entry if available + + Thrown if the entry size is not known. + Thrown if no entry is currently available. + + + + Reads a byte from the current zip entry. + + + The byte or -1 if end of stream is reached. + + + + + Handle attempts to read by throwing an . + + The destination array to store data in. + The offset at which data read should be stored. + The maximum number of bytes to read. + Returns the number of bytes actually read. + + + + Handle attempts to read from this entry by throwing an exception + + + + + Handle attempts to read from this entry by throwing an exception + + + + + Perform the initial read on an entry which may include + reading encryption headers and setting up inflation. + + The destination to fill with data read. + The offset to start reading at. + The maximum number of bytes to read. + The actual number of bytes read. + + + + Read a block of bytes from the stream. + + The destination for the bytes. + The index to start storing data. + The number of bytes to attempt to read. + Returns the number of bytes read. + Zero bytes read means end of stream. + + + + Reads a block of bytes from the current zip entry. + + + The number of bytes read (this may be less than the length requested, even before the end of stream), or 0 on end of stream. + + + An i/o error occurred. + + + The deflated stream is corrupted. + + + The stream is not open. + + + + + Closes the zip input stream + + + + + ZipNameTransform transforms names as per the Zip file naming convention. + + The use of absolute names is supported although its use is not valid + according to Zip naming conventions, and should not be used if maximum compatability is desired. + + + + Initialize a new instance of + + + + + Initialize a new instance of + + The string to trim from the front of paths if found. + + + + Static constructor. + + + + + Transform a windows directory name according to the Zip file naming conventions. + + The directory name to transform. + The transformed name. + + + + Transform a windows file name according to the Zip file naming conventions. + + The file name to transform. + The transformed name. + + + + Get/set the path prefix to be trimmed from paths if present. + + The prefix is trimmed before any conversion from + a windows path is done. + + + + Force a name to be valid by replacing invalid characters with a fixed value + + The name to force valid + The replacement character to use. + Returns a valid name + + + + Test a name to see if it is a valid name for a zip entry. + + The name to test. + If true checking is relaxed about windows file names and absolute paths. + Returns true if the name is a valid zip name; false otherwise. + Zip path names are actually in Unix format, and should only contain relative paths. + This means that any path stored should not contain a drive or + device letter, or a leading slash. All slashes should forward slashes '/'. + An empty name is valid for a file where the input comes from standard input. + A null name is not considered valid. + + + + + Test a name to see if it is a valid name for a zip entry. + + The name to test. + Returns true if the name is a valid zip name; false otherwise. + Zip path names are actually in unix format, + and should only contain relative paths if a path is present. + This means that the path stored should not contain a drive or + device letter, or a leading slash. All slashes should forward slashes '/'. + An empty name is valid where the input comes from standard input. + A null name is not considered valid. + + + + + An implementation of INameTransform that transforms entry paths as per the Zip file naming convention. + Strips path roots and puts directory separators in the correct format ('/') + + + + + Initialize a new instance of + + + + + Transform a windows directory name according to the Zip file naming conventions. + + The directory name to transform. + The transformed name. + + + + Transform a windows file name according to the Zip file naming conventions. + + The file name to transform. + The transformed name. + + + + This is a DeflaterOutputStream that writes the files into a zip + archive one after another. It has a special method to start a new + zip entry. The zip entries contains information about the file name + size, compressed size, CRC, etc. + + It includes support for Stored and Deflated entries. + This class is not thread safe. +
    +
    Author of the original java version : Jochen Hoenicke +
    + This sample shows how to create a zip file + + using System; + using System.IO; + + using ICSharpCode.SharpZipLib.Core; + using ICSharpCode.SharpZipLib.Zip; + + class MainClass + { + public static void Main(string[] args) + { + string[] filenames = Directory.GetFiles(args[0]); + byte[] buffer = new byte[4096]; + + using ( ZipOutputStream s = new ZipOutputStream(File.Create(args[1])) ) { + + s.SetLevel(9); // 0 - store only to 9 - means best compression + + foreach (string file in filenames) { + ZipEntry entry = new ZipEntry(file); + s.PutNextEntry(entry); + + using (FileStream fs = File.OpenRead(file)) { + StreamUtils.Copy(fs, s, buffer); + } + } + } + } + } + + +
    + + + Creates a new Zip output stream, writing a zip archive. + + + The output stream to which the archive contents are written. + + + + + Creates a new Zip output stream, writing a zip archive. + + The output stream to which the archive contents are written. + Size of the buffer to use. + + + + Gets a flag value of true if the central header has been added for this archive; false if it has not been added. + + No further entries can be added once this has been done. + + + + Set the zip file comment. + + + The comment text for the entire archive. + + + The converted comment is longer than 0xffff bytes. + + + + + Sets the compression level. The new level will be activated + immediately. + + The new compression level (1 to 9). + + Level specified is not supported. + + + + + + Get the current deflater compression level + + The current compression level + + + + Get / set a value indicating how Zip64 Extension usage is determined when adding entries. + + Older archivers may not understand Zip64 extensions. + If backwards compatability is an issue be careful when adding entries to an archive. + Setting this property to off is workable but less desirable as in those circumstances adding a file + larger then 4GB will fail. + + + + Used for transforming the names of entries added by . + Defaults to , set to null to disable transforms and use names as supplied. + + + + + Get/set the password used for encryption. + + When set to null or if the password is empty no encryption is performed + + + + Write an unsigned short in little endian byte order. + + + + + Write an int in little endian byte order. + + + + + Write an int in little endian byte order. + + + + + Starts a new Zip entry. It automatically closes the previous + entry if present. + All entry elements bar name are optional, but must be correct if present. + If the compression method is stored and the output is not patchable + the compression for that entry is automatically changed to deflate level 0 + + + the entry. + + + if entry passed is null. + + + if an I/O error occured. + + + if stream was finished + + + Too many entries in the Zip file
    + Entry name is too long
    + Finish has already been called
    +
    + + The Compression method specified for the entry is unsupported. + +
    + + + Closes the current entry, updating header and footer information as required + + + Invalid entry field values. + + + An I/O error occurs. + + + No entry is active. + + + + + Initializes encryption keys based on given . + + The password. + + + + Initializes encryption keys based on given password. + + + + + Writes the given buffer to the current entry. + + The buffer containing data to write. + The offset of the first byte to write. + The number of bytes to write. + Archive size is invalid + No entry is active. + + + + Finishes the stream. This will write the central directory at the + end of the zip file and flush the stream. + + + This is automatically called when the stream is closed. + + + An I/O error occurs. + + + Comment exceeds the maximum length
    + Entry name exceeds the maximum length +
    +
    + + + Flushes the stream by calling Flush on the deflater stream unless + the current compression method is . Then it flushes the underlying output stream. + + + + + The entries for the archive. + + + + + Used to track the crc of data added to entries. + + + + + The current entry being added. + + + + + Used to track the size of data for an entry during writing. + + + + + Offset to be recorded for each entry in the central header. + + + + + Comment for the entire archive recorded in central header. + + + + + Flag indicating that header patching is required for the current entry. + + + + + Position to patch crc + + + + + Position to patch size. + + + + + The password to use when encrypting archive entries. + + + + + This static class contains functions for encoding and decoding zip file strings + + + + Code page backing field + + The original Zip specification (https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT) states + that file names should only be encoded with IBM Code Page 437 or UTF-8. + In practice, most zip apps use OEM or system encoding (typically cp437 on Windows). + Let's be good citizens and default to UTF-8 http://utf8everywhere.org/ + + + + Automatically select codepage while opening archive + see https://github.com/icsharpcode/SharpZipLib/pull/280#issuecomment-433608324 + + + + + Encoding used for string conversion. Setting this to 65001 (UTF-8) will + also set the Language encoding flag to indicate UTF-8 encoded file names. + + + + + Attempt to get the operating system default codepage, or failing that, to + the fallback code page IBM 437. + + + + + Get whether the default codepage is set to UTF-8. Setting this property to false will + set the to + + + Get OEM codepage from NetFX, which parses the NLP file with culture info table etc etc. + But sometimes it yields the special value of 1 which is nicknamed CodePageNoOEM in sources (might also mean CP_OEMCP, but Encoding puts it so). + This was observed on Ukranian and Hindu systems. + Given this value, throws an . + So replace it with , (IBM 437 which is the default code page in a default Windows installation console. + + + + + Convert a portion of a byte array to a string using + + + Data to convert to string + + + Number of bytes to convert starting from index 0 + + + data[0]..data[count - 1] converted to a string + + + + + Convert a byte array to a string using + + + Byte array to convert + + + dataconverted to a string + + + + + Convert a byte array to a string using + + The applicable general purpose bits flags + + Byte array to convert + + The number of bytes to convert. + + dataconverted to a string + + + + + Convert a byte array to a string using + + + Byte array to convert + + The applicable general purpose bits flags + + dataconverted to a string + + + + + Convert a string to a byte array using + + + String to convert to an array + + Converted array + + + + Convert a string to a byte array using + + The applicable general purpose bits flags + + String to convert to an array + + Converted array + +
    +
    diff --git a/DAL/bin/Debug/Model.dll b/DAL/bin/Debug/Model.dll new file mode 100644 index 0000000..7ce17f8 Binary files /dev/null and b/DAL/bin/Debug/Model.dll differ diff --git a/DAL/bin/Debug/Model.pdb b/DAL/bin/Debug/Model.pdb new file mode 100644 index 0000000..91b11a9 Binary files /dev/null and b/DAL/bin/Debug/Model.pdb differ diff --git a/DAL/bin/Debug/NPOI.OOXML.dll b/DAL/bin/Debug/NPOI.OOXML.dll new file mode 100644 index 0000000..9d9b5e8 Binary files /dev/null and b/DAL/bin/Debug/NPOI.OOXML.dll differ diff --git a/DAL/bin/Debug/NPOI.OOXML.pdb b/DAL/bin/Debug/NPOI.OOXML.pdb new file mode 100644 index 0000000..142cc2f Binary files /dev/null and b/DAL/bin/Debug/NPOI.OOXML.pdb differ diff --git a/DAL/bin/Debug/NPOI.OOXML.xml b/DAL/bin/Debug/NPOI.OOXML.xml new file mode 100644 index 0000000..6c62077 --- /dev/null +++ b/DAL/bin/Debug/NPOI.OOXML.xml @@ -0,0 +1,11817 @@ + + + + NPOI.OOXML + + + + Decryptor implementation for Agile Encryption + + + Set decryption password + + + instead of a password, it's also possible to decrypt via certificate. + Warning: this code is experimental and hasn't been validated + + @see Agile encryption with certificates + + @param keyPair + @param x509 + @return true, when the data can be successfully decrypted with the given private key + @throws GeneralSecurityException + + + 2.3.4.15 Data Encryption (Agile Encryption) + + The EncryptedPackage stream (1) MUST be encrypted in 4096-byte segments to facilitate nearly + random access while allowing CBC modes to be used in the encryption Process. + The Initialization vector for the encryption process MUST be obtained by using the zero-based + segment number as a blockKey and the binary form of the KeyData.saltValue as specified in + section 2.3.4.12. The block number MUST be represented as a 32-bit unsigned integer. + Data blocks MUST then be encrypted by using the Initialization vector and the intermediate key + obtained by decrypting the encryptedKeyValue from a KeyEncryptor Contained within the + KeyEncryptors sequence as specified in section 2.3.4.10. The data block MUST be pAdded to + the next integral multiple of the KeyData.blockSize value. Any pAdding bytes can be used. Note + that the StreamSize field of the EncryptedPackage field specifies the number of bytes of + unencrypted data as specified in section 2.3.4.4. + + + Used when Checking if a key is valid for a document + + + Generate an HMAC, as specified in [RFC2104], of the encrypted form of the data (message), + which the DataIntegrity element will verify by using the Salt generated in step 2 as the key. + Note that the entire EncryptedPackage stream (1), including the StreamSize field, MUST be + used as the message. + + Encrypt the HMAC as in step 3 by using a blockKey byte array consisting of the following bytes: + 0xa0, 0x67, 0x7f, 0x02, 0xb2, 0x2c, 0x84, and 0x33. + + + + 2.3.4.15 Data Encryption (Agile Encryption) + + The EncryptedPackage stream (1) MUST be encrypted in 4096-byte segments to facilitate nearly + random access while allowing CBC modes to be used in the encryption Process. + The Initialization vector for the encryption process MUST be obtained by using the zero-based + segment number as a blockKey and the binary form of the KeyData.saltValue as specified in + section 2.3.4.12. The block number MUST be represented as a 32-bit unsigned integer. + Data blocks MUST then be encrypted by using the Initialization vector and the intermediate key + obtained by decrypting the encryptedKeyValue from a KeyEncryptor Contained within the + KeyEncryptors sequence as specified in section 2.3.4.10. The data block MUST be pAdded to + the next integral multiple of the KeyData.blockSize value. Any pAdding bytes can be used. Note + that the StreamSize field of the EncryptedPackage field specifies the number of bytes of + unencrypted data as specified in section 2.3.4.4. + + + Exception thrown in case there is something wrong with the incoming eID + certificate. + + @author Frank Cornelis + + + + Digest Information data transfer class. + + + Main constructor. + + @param digestValue + @param hashAlgo + @param description + + + Exception thrown in case the incoming eID certificate is expired. + + @author Frank Cornelis + + + + Signature Facet implementation to create enveloped signatures. + + @author Frank Cornelis + + + + Signature Facet implementation that Adds ds:KeyInfo to the XML signature. + + @author Frank Cornelis + + + + Work-around for Office2010 to accept the XAdES-BES/EPES signature. + + xades:UnsignedProperties/xades:UnsignedSignatureProperties needs to be + present. + + @author Frank Cornelis + + + + Office OpenXML Signature Facet implementation. + + @author fcorneli + @see [MS-OFFCRYPTO]: Office Document Cryptography Structure + + + Office 2010 list of signed types (extensions). + + + JSR105 Signature Facet base class. + + + This method is being invoked by the XML signature service engine during + pre-sign phase. Via this method a signature facet implementation can add + signature facets to an XML signature. + + @param document the signature document to be used for imports + @param references list of reference defInitions + @param objects objects to be signed/included in the signature document + @throws XMLSignatureException + + + This method is being invoked by the XML signature service engine during + the post-sign phase. Via this method a signature facet can extend the XML + signatures with for example key information. + + @param document the signature document to be modified + @throws MarshalException + + + XAdES Signature Facet. Implements XAdES v1.4.1 which is compatible with XAdES + v1.3.2. The implemented XAdES format is XAdES-BES/EPES. It's up to another + part of the signature service to upgrade the XAdES-BES to a XAdES-X-L. + + This implementation has been tested against an implementation that + participated multiple ETSI XAdES plugtests. + + @author Frank Cornelis + @see XAdES + + + + Adds a mime-type for the given ds:Reference (referred via its @URI). This + information is Added via the xades:DataObjectFormat element. + + @param dsReferenceUri + @param mimetype + + + XAdES-X-L v1.4.1 signature facet. This signature facet implementation will + upgrade a given XAdES-BES/EPES signature to XAdES-X-L. + + We don't inherit from XAdESSignatureFacet as we also want to be able to use + this facet out of the context of a signature creation. This signature facet + assumes that the signature is already XAdES-BES/EPES compliant. + + This implementation has been tested against an implementation that + participated multiple ETSI XAdES plugtests. + + @author Frank Cornelis + @see XAdESSignatureFacet + + + JSR105 URI dereferencer for Office Open XML documents. + + + Exception thrown in case the incoming eID certificate has been revoked. + + @author Frank Cornelis + + + + Container class for PKI revocation data. + + @author Frank Cornelis + + + + Default constructor. + + + Adds a CRL to this revocation data Set. + + @param encodedCrl + + + Adds a CRL to this revocation data Set. + + @param crl + + + Adds an OCSP response to this revocation data Set. + + @param encodedOcsp + + + Gives back a list of all CRLs. + + @return a list of all CRLs + + + Gives back a list of all OCSP responses. + + @return a list of all OCSP response + + + Returns true if this revocation data Set holds OCSP + responses. + + @return true if this revocation data Set holds OCSP + responses. + + + Returns true if this revocation data Set holds CRLs. + + @return true if this revocation data Set holds CRLs. + + + Returns true if this revocation data is not empty. + + @return true if this revocation data is not empty. + + + Interface for a service that retrieves revocation data about some given + certificate chain. + + @author Frank Cornelis + + + + Gives back the revocation data corresponding with the given certificate + chain. + + @param certificateChain the certificate chain + @return the revocation data corresponding with the given certificate chain. + + + Interface for the signature policy service. + + @author Frank Cornelis + + + + Gives back the signature policy identifier URI. + + @return the signature policy identifier URI. + + + Gives back the short description of the signature policy or + null if a description is not available. + + @return the description, or null. + + + Gives back the download URL where the signature policy document can be + found. Can be null in case such a download location does not + exist. + + @return the download URL, or null. + + + Gives back the signature policy document. + + @return the bytes of the signature policy document. + + + Interface for a time-stamp service. + + @author Frank Cornelis + + + + Gives back the encoded time-stamp token for the given array of data + bytes. We assume that the time-stamp token itself Contains its full + certificate chain required for proper validation. + + @param data + the data to be time-stamped. + @param revocationData + the optional Container that needs to be Filled up with the + revocation data used to validate the TSA certificate chain. + @return the DER encoded time-stamp token. + @throws Exception + in case something went wrong. + + + Interface for trust validator of a TSP. + + @author Frank Cornelis + + + + Validates the given certificate chain. + + @param certificateChain + @param revocationData + the optional data Container that should be Filled with + revocation data that was used to validate the given + certificate chain. + @throws Exception + in case the certificate chain is invalid. + + + A TSP time-stamp service implementation. + + @author Frank Cornelis + + + + Maps the digest algorithm to corresponding OID value. + + + This class bundles the configuration options used for the existing + signature facets. + Apart of the thread local members (e.g. opc-package) most values will probably be constant, so + it might be configured centrally (e.g. by spring) + + + + the optional signature policy service used for XAdES-EPES. + + + the time-stamp service used for XAdES-T and XAdES-X. + + + timestamp service provider URL + + + if not defined, it's the same as the main digest + + + the optional TSP request policy OID. + + + the optional revocation data service used for XAdES-C and XAdES-X-L. + When null the signature will be limited to XAdES-T only. + + + if not defined, it's the same as the main digest + + + Work-around for Office 2010 IssuerName encoding. + + + The signature Id attribute value used to create the XML signature. A + null value will trigger an automatically generated signature Id. + + + Gives back the human-readable description of what the citizen will be + signing. The default value is "Office OpenXML Document". + + + The process of signing includes the marshalling of xml structures. + This also includes the canonicalization. Currently this leads to problems + with certain namespaces, so this EventListener is used to interfere + with the marshalling Process. + + + Map of namespace uris to prefix + If a mapping is specified, the corresponding elements will be prefixed + + + Inits and Checks the config object. + If not Set previously, complex configuration properties also Get + Created/initialized via this Initialization call. + + @param onlyValidation if true, only a subset of the properties + is Initialized, which are necessary for validation. If false, + also the other properties needed for signing are been taken care of + + + @param signatureFacet the signature facet is Appended to facet list + + + @return the list of facets, may be empty when the config object is not Initialized + + + @param signatureFacets the new list of facets + + + @return the main digest algorithm, defaults to sha-1 + + + @param digestAlgo the main digest algorithm + + + @return the opc package to be used by this thread, stored as thread-local + + + @param opcPackage the opc package to be handled by this thread, stored as thread-local + + + @return the private key + + + @param key the private key + + + @return the certificate chain, index 0 is usually the certificate matching + the private key + + + @param signingCertificateChain the certificate chain, index 0 should be + the certificate matching the private key + + + @return the time at which the document is signed, also used for the timestamp service. + defaults to now + + + @param executionTime Sets the time at which the document ought to be signed + + + @return the service to be used for XAdES-EPES properties. There's no default implementation + + + @param signaturePolicyService the service to be used for XAdES-EPES properties + + + @return Gives back the human-readable description of what the citizen + will be signing. The default value is "Office OpenXML Document". + + + @param signatureDescription the human-readable description of + what the citizen will be signing. + + + @return the default canonicalization method, defaults to INCLUSIVE + + + @param canonicalizationMethod the default canonicalization method + + + @return The signature Id attribute value used to create the XML signature. + Defaults to "idPackageSignature" + + + @param packageSignatureId The signature Id attribute value used to create the XML signature. + A null value will trigger an automatically generated signature Id. + + + @return the url of the timestamp provider (TSP) + + + @param tspUrl the url of the timestamp provider (TSP) + + + @return if true, uses timestamp-request/response mimetype, + if false, timestamp-query/reply mimetype + + + @param tspOldProtocol defines the timestamp-protocol mimetype + @see #isTspOldProtocol + + + @return the hash algorithm to be used for the timestamp entry. + Defaults to the hash algorithm of the main entry + + + @param tspDigestAlgo the algorithm to be used for the timestamp entry. + if null, the hash algorithm of the main entry + + + @return the proxy url to be used for all communications. + Currently this affects the timestamp service + + + @param proxyUrl the proxy url to be used for all communications. + Currently this affects the timestamp service + + + @return the timestamp service. Defaults to {@link TSPTimeStampService} + + + @param tspService the timestamp service + + + @return the user id for the timestamp service - currently only basic authorization is supported + + + @param tspUser the user id for the timestamp service - currently only basic authorization is supported + + + @return the password for the timestamp service + + + @param tspPass the password for the timestamp service + + + @return the validator for the timestamp service (certificate) + + + @param tspValidator the validator for the timestamp service (certificate) + + + @return the optional revocation data service used for XAdES-C and XAdES-X-L. + When null the signature will be limited to XAdES-T only. + + + @param revocationDataService the optional revocation data service used for XAdES-C and XAdES-X-L. + When null the signature will be limited to XAdES-T only. + + + @return hash algorithm used for XAdES. Defaults to the {@link #getDigestAlgo()} + + + @param xadesDigestAlgo hash algorithm used for XAdES. + When null, defaults to {@link #getDigestAlgo()} + + + @return the user agent used for http communication (e.g. to the TSP) + + + @param userAgent the user agent used for http communication (e.g. to the TSP) + + + @return the asn.1 object id for the tsp request policy. + Defaults to 1.3.6.1.4.1.13762.3 + + + @param tspRequestPolicy the asn.1 object id for the tsp request policy. + + + @return true, if the whole certificate chain is included in the signature. + When false, only the signer cert will be included + + + @param includeEntireCertificateChain if true, include the whole certificate chain. + If false, only include the signer cert + + + @return if true, issuer serial number is included + + + @param includeIssuerSerial if true, issuer serial number is included + + + @return if true, the key value of the public key (certificate) is included + + + @param includeKeyValue if true, the key value of the public key (certificate) is included + + + @return the xades role element. If null the claimed role element is omitted. + Defaults to null + + + @param xadesRole the xades role element. If null the claimed role element is omitted. + + + @return the Id for the XAdES SignedProperties element. + Defaults to idSignedProperties + + + @param xadesSignatureId the Id for the XAdES SignedProperties element. + When null defaults to idSignedProperties + + + @return when true, include the policy-implied block. + Defaults to true + + + @param xadesSignaturePolicyImplied when true, include the policy-implied block + + + Make sure the DN is encoded using the same order as present + within the certificate. This is an Office2010 work-around. + Should be reverted back. + + XXX: not correct according to RFC 4514. + + @return when true, the issuer DN is used instead of the issuer X500 principal + + + @param xadesIssuerNameNoReverseOrder when true, the issuer DN instead of the issuer X500 prinicpal is used + + + @return the map of namespace uri (key) to prefix (value) + + + @param namespacePrefixes the map of namespace uri (key) to prefix (value) + + + helper method for null/default value handling + @param value + @param defaultValue + @return if value is not null, return value otherwise defaultValue + + + Each digest method has its own IV (Initial vector) + + @return the IV depending on the main digest method + + + @return the uri for the signature method, i.e. currently only rsa is + supported, so it's the rsa variant of the main digest + + + @return the uri for the main digest + + + @param digestAlgo the digest algo, currently only sha* and ripemd160 is supported + @return the uri for the given digest + + + @return the cannonicalization method for XAdES-XL signing. + Defaults to EXCLUSIVE + @see javax.xml.Crypto.dsig.CanonicalizationMethod + + + @param xadesCanonicalizationMethod the cannonicalization method for XAdES-XL signing + @see javax.xml.Crypto.dsig.CanonicalizationMethod + + + + Returns the URI of the referenced data object. + + @return the URI of the data object in RFC 2396 format (may be + null if not specified) + + + Returns the type of data referenced by this URI. + + @return the type (a URI) of the data object (may be null + if not specified) + + + + Dereferences the specified URIReference and returns the + dereferenced data. + + @param uriReference the URIReference + @param context an XMLCryptoContext that may + contain additional useful information for dereferencing the URI. This + implementation should dereference the specified + URIReference against the context's baseURI + parameter, if specified. + @return the dereferenced data + @throws NullPointerException if uriReference or + context are null + @throws URIReferenceException if an exception occurs while + dereferencing the specified uriReference + + + + This method is called whenever an event occurs of the type for which + the EventListener interface was registered. + @param evt The Event contains contextual information + about the event. It also contains the stopPropagation + and preventDefault methods which are used in + determining the event's flow and default action. + + +

    This class is the default entry point for XML signatures and can be used for + validating an existing signed office document and signing a office document.

    + +

    Validating a signed office document

    + +
    +            OPCPackage pkg = OPCPackage.open(..., PackageAccess.READ);
    +            SignatureConfig sic = new SignatureConfig();
    +            sic.setOpcPackage(pkg);
    +            SignatureInfo si = new SignatureInfo();
    +            si.setSignatureConfig(sic);
    +            boolean isValid = si.validate();
    +            ...
    +            
    + +

    Signing an office document

    + +
    +            // loading the keystore - pkcs12 is used here, but of course jks & co are also valid
    +            // the keystore needs to contain a private key and it's certificate having a
    +            // 'digitalSignature' key usage
    +            char password[] = "test".toCharArray();
    +            File file = new File("test.pfx");
    +            KeyStore keystore = KeyStore.getInstance("PKCS12");
    +            FileInputStream fis = new FileInputStream(file);
    +            keystore.load(fis, password);
    +            fis.close();
    +            
    +            // extracting private key and certificate
    +            String alias = "xyz"; // alias of the keystore entry
    +            Key key = keystore.getKey(alias, password);
    +            X509Certificate x509 = (X509Certificate)keystore.getCertificate(alias);
    +            
    +            // filling the SignatureConfig entries (minimum fields, more options are available ...)
    +            SignatureConfig signatureConfig = new SignatureConfig();
    +            signatureConfig.setKey(keyPair.getPrivate());
    +            signatureConfig.setSigningCertificateChain(Collections.singletonList(x509));
    +            OPCPackage pkg = OPCPackage.open(..., PackageAccess.READ_WRITE);
    +            signatureConfig.setOpcPackage(pkg);
    +            
    +            // adding the signature document to the package
    +            SignatureInfo si = new SignatureInfo();
    +            si.setSignatureConfig(signatureConfig);
    +            si.confirmSignature();
    +            // optionally verify the generated signature
    +            boolean b = si.verifySignature();
    +            assert (b);
    +            // write the changes back to disc
    +            pkg.close();
    +            
    + +

    Implementation notes:

    + +

    Although there's a XML signature implementation in the Oracle JDKs 6 and higher, + compatibility with IBM JDKs is also in focus (... but maybe not thoroughly tested ...). + Therefore we are using the Apache Santuario libs (xmlsec) instead of the built-in classes, + as the compatibility seems to be provided there.

    + +

    To use SignatureInfo and its sibling classes, you'll need to have the following libs + in the classpath:

    +
      +
    • BouncyCastle bcpkix and bcprov (tested against 1.51)
    • +
    • Apache Santuario "xmlsec" (tested against 2.0.1)
    • +
    • and slf4j-api (tested against 1.7.7)
    • +
    +
    + + @return the package part Containing the signature + + + @return the signer certificate + + + @return the certificate chain of the signer + + + @return true, when the xml signature is valid, false otherwise + + @throws EncryptedDocumentException if the signature can't be extracted or if its malformed + + + Constructor Initializes xml signature environment, if it hasn't been Initialized before + + + @return the signature config + + + @param signatureConfig the signature config, needs to be Set before a SignatureInfo object is used + + + @return true, if first signature part is valid + + + add the xml signature to the document + + @throws XMLSignatureException + @throws MarshalException + + + Sign (encrypt) the digest with the private key. + Currently only rsa is supported. + + @param digest the hashed input + @return the encrypted hash + + + @return a signature part for each signature document. + the parts can be validated independently. + + + Initialize the xml signing environment and the bouncycastle provider + + + Helper method for Adding informations before the signing. + Normally {@link #ConfirmSignature()} is sufficient to be used. + + + Helper method for Adding informations After the signing. + Normally {@link #ConfirmSignature()} is sufficient to be used. + + + Write XML signature into the OPC package + + @param document the xml signature document + @throws MarshalException + + + Helper method for null lists, which are Converted to empty lists + + @param other the reference to wrap, if null + @return if other is null, an empty lists is returned, otherwise other is returned + + + This listener class is used, to modify the to be digested xml document, + e.g. to register id attributes or Set prefixes for registered namespaces + + + + Exception thrown in case the incoming eID certificate is not trusted. + + @author Frank Cornelis + + + + The OPC Package + + + The properties of the OPC namespace, opened as needed + + + Wrapper to open a namespace, returning an IOException + in the event of a problem. + Works around shortcomings in java's this() constructor calls + + + Retrieves all the PackageParts which are defined as + relationships of the base document with the + specified content type. + + + Checks that the supplied Stream (which MUST + support mark and reSet, or be a PushbackStream) + has a OOXML (zip) header at the start of it. + If your Stream does not support mark / reSet, + then wrap it in a PushBackStream, then be + sure to always use that, and not the original! + @param inp An Stream which supports either mark/reSet, or is a PushbackStream + + + Get the document properties. This gives you access to the + core ooxml properties, and the extended ooxml properties. + + + Get the document's embedded files. + + + Closes the underlying {@link OPCPackage} from which this + document was read, if there is one + + + Write out this document to an Outputstream. + + Note - if the Document was opened from a {@link File} rather + than an {@link InputStream}, you must write out to + a different file, overwriting via an OutputStream isn't possible. + + If {@code stream} is a {@link java.io.FileOutputStream} on a networked drive + or has a high cost/latency associated with each written byte, + consider wrapping the OutputStream in a {@link java.io.BufferedOutputStream} + to improve write performance. + + @param stream - the java Stream you wish to write the file to + + @exception IOException if anything can't be written. + + + Represents an entry of a OOXML namespace. + +

    + Each POIXMLDocumentPart keeps a reference to the underlying a {@link org.apache.poi.openxml4j.opc.PackagePart}. +

    + + @author Yegor Kozlov +
    + + The RelationPart is a cached relationship between the document, which contains the RelationPart, + and one of its referenced child document parts. + The child document parts may only belong to one parent, but it's often referenced by other + parents too, having varying {@link PackageRelationship#getId() relationship ids} pointing to it. + + + @return the cached relationship, which uniquely identifies this child document part within the parent + + + @return the child document part + + + Counter that provides the amount of incoming relations from other parts + to this part. + + + Construct POIXMLDocumentPart representing a "core document" namespace part. + + + Construct POIXMLDocumentPart representing a custom "core document" package part. + + + Creates new POIXMLDocumentPart - called by client code to create new parts from scratch. + + @see #CreateRelationship(POIXMLRelation, POIXMLFactory, int, bool) + + + Creates an POIXMLDocumentPart representing the given package part and relationship. + Called by {@link #read(POIXMLFactory, java.util.Map)} when reading in an existing file. + + @param part - The package part that holds xml data representing this sheet. + @see #read(POIXMLFactory, java.util.Map) + + @since POI 3.14-Beta1 + + + Creates an POIXMLDocumentPart representing the given package part, relationship and parent + Called by {@link #read(POIXMLFactory, java.util.Map)} when reading in an existing file. + + @param parent - Parent part + @param part - The package part that holds xml data representing this sheet. + @see #read(POIXMLFactory, java.util.Map) + + @since POI 3.14-Beta1 + + + Creates an POIXMLDocumentPart representing the given namespace part and relationship. + Called by {@link #read(POIXMLFactory, java.util.Map)} when Reading in an exisiting file. + + @param part - The namespace part that holds xml data represenring this sheet. + @param rel - the relationship of the given namespace part + @see #read(POIXMLFactory, java.util.Map) + + + Creates an POIXMLDocumentPart representing the given namespace part, relationship and parent + Called by {@link #read(POIXMLFactory, java.util.Map)} when Reading in an exisiting file. + + @param parent - Parent part + @param part - The namespace part that holds xml data represenring this sheet. + @param rel - the relationship of the given namespace part + @see #read(POIXMLFactory, java.util.Map) + + + When you open something like a theme, call this to + re-base the XML Document onto the core child of the + current core document + + + Provides access to the underlying PackagePart + + @return the underlying PackagePart + + + Provides access to the PackageRelationship that identifies this POIXMLDocumentPart + + @return the PackageRelationship that identifies this POIXMLDocumentPart + + + Returns the list of child relations for this POIXMLDocumentPart + + @return child relations + + + Returns the list of child relations for this POIXMLDocumentPart + + @return child relations + + + Returns the target {@link POIXMLDocumentPart}, where a + {@link PackageRelationship} is set from the {@link PackagePart} of this + {@link POIXMLDocumentPart} to the {@link PackagePart} of the target + {@link POIXMLDocumentPart} with a {@link PackageRelationship#GetId()} + matching the given parameter value. + + @param id + The relation id to look for + @return the target part of the relation, or null, if none exists + + + Returns the {@link PackageRelationship#GetId()} of the + {@link PackageRelationship}, that sources from the {@link PackagePart} of + this {@link POIXMLDocumentPart} to the {@link PackagePart} of the given + parameter value. + + @param part + The {@link POIXMLDocumentPart} for which the according + relation-id shall be found. + @return The value of the {@link PackageRelationship#GetId()} or null, if + parts are not related. + + + + Add a new child POIXMLDocumentPart + + + the child to add + + + + Add a new child POIXMLDocumentPart + + the preferred relation id, when null the next free relation id will be used + the package relationship type + the child to add + + + + + Add a new child POIXMLDocumentPart + + the relationship of the child + the child to add + + + Remove the relation to the specified part in this namespace and remove the + part, if it is no longer needed. + + + Remove the relation to the specified part in this namespace and remove the + part, if it is no longer needed and flag is set to true. + + @param part + The related part, to which the relation shall be Removed. + @param RemoveUnusedParts + true, if the part shall be Removed from the namespace if not + needed any longer. + + + Returns the parent POIXMLDocumentPart. All parts except root have not-null parent. + + @return the parent POIXMLDocumentPart or null for the root element. + + + Save the content in the underlying namespace part. + Default implementation is empty meaning that the namespace part is left unmodified. + + Sub-classes should override and add logic to marshal the "model" into Ooxml4J. + + For example, the code saving a generic XML entry may look as follows: +
    
    +             protected void commit()  {
    +               PackagePart part = GetPackagePart();
    +               Stream out = part.GetStream();
    +               XmlObject bean = GetXmlBean(); //the "model" which holds Changes in memory
    +               bean.save(out, DEFAULT_XML_OPTIONS);
    +               out.close();
    +             }
    +              
    + +
    + + Save Changes in the underlying OOXML namespace. + Recursively fires {@link #commit()} for each namespace part + + @param alreadySaved context set Containing already visited nodes + + + Ensure that a memory based package part does not have lingering data from previous + commit() calls. + + Note: This is overwritten for some objects, as *PictureData seem to store the actual content + in the part directly without keeping a copy like all others therefore we need to handle them differently. + + + Create a new child POIXMLDocumentPart + + @param descriptor the part descriptor + @param factory the factory that will create an instance of the requested relation + @return the Created child POIXMLDocumentPart + + + Create a new child POIXMLDocumentPart + + @param descriptor the part descriptor + @param factory the factory that will create an instance of the requested relation + @param idx part number + @param noRelation if true, then no relationship is Added. + @return the Created child POIXMLDocumentPart + + + Iterate through the underlying PackagePart and create child POIXMLFactory instances + using the specified factory + + @param factory the factory object that Creates POIXMLFactory instances + @param context context map Containing already visited noted keyed by tarGetURI + + + Get the PackagePart that is the target of a relationship. + + @param rel The relationship + @return The target part + @throws InvalidFormatException + + + Fired when a new namespace part is Created + + + Fired when a namespace part is read + + + Fired when a namespace part is about to be Removed from the namespace + + + Retrieves the core document part + + @since POI 3.14-Beta1 + + + Defines a factory API that enables sub-classes to create instances of POIXMLDocumentPart + + @author Yegor Kozlov + + + Create a POIXMLDocumentPart from existing package part and relation. This method is called + from {@link POIXMLDocument#load(POIXMLFactory)} when parsing a document + + @param parent parent part + @param rel the package part relationship + @param part the PackagePart representing the created instance + @return A new instance of a POIXMLDocumentPart. + + @since by POI 3.14-Beta1 + + + Need to delegate instantiation to sub class because of constructor visibility + @since POI 3.14-Beta1 + + + returns the descriptor for the given relationship type + + @return the descriptor or null if type is unknown + + @since POI 3.14-Beta1 + + + Create a POIXMLDocumentPart from existing package part and relation. This method is called + from {@link POIXMLDocument#load(POIXMLFactory)} when parsing a document + + @param parent parent part + @param rel the package part relationship + @param part the PackagePart representing the created instance + @return A new instance of a POIXMLDocumentPart. + + @deprecated in POI 3.14, scheduled for removal in POI 3.16 + + + Create a new POIXMLDocumentPart using the supplied descriptor. This method is used when adding new parts + to a document, for example, when adding a sheet to a workbook, slide to a presentation, etc. + + @param descriptor describes the object to create + @return A new instance of a POIXMLDocumentPart. + + + Retrieves the package relationship of the child part within the parent + + @since POI 3.14-Beta1 + + + The core document properties + + + Extended document properties + + + Custom document properties + + + Each custom property element Contains an fmtid attribute + with the same GUID value ({D5CDD505-2E9C-101B-9397-08002B2CF9AE}). + + + Add a new property + + @param name the property name + @throws IllegalArgumentException if a property with this name already exists + + + Add a new string property + + @throws IllegalArgumentException if a property with this name already exists + + + Add a new double property + + @throws IllegalArgumentException if a property with this name already exists + + + Add a new integer property + + @throws IllegalArgumentException if a property with this name already exists + + + Add a new bool property + + @throws IllegalArgumentException if a property with this name already exists + + + Generate next id that uniquely relates a custom property + + @return next property id starting with 2 + + + Check if a property with this name already exists in the collection of custom properties + + @param name the name to check + @return whether a property with the given name exists in the custom properties + + + Retrieve the custom property with this name, or null if none exists. + + You will need to test the various isSetX methods to work out + what the type of the property is, before fetching the + appropriate value for it. + + @param name the name of the property to fetch + + + Wrapper around the three different kinds of OOXML properties + and metadata a document can have (Core, Extended and Custom), + as well Thumbnails. + + + Returns the core document properties + + + Returns the extended document properties + + + Returns the custom document properties + + + Returns the {@link PackagePart} for the Document + Thumbnail, or null if there isn't one + + @return The Document Thumbnail part or null + + + Returns the name of the Document thumbnail, eg + thumbnail.jpeg, or null if there + isn't one. + + @return The thumbnail filename, or null + + + Returns the Document thumbnail image data, or + null if there isn't one. + + @return The thumbnail data, or null + + + Sets the Thumbnail for the document, replacing any existing + one. + + @param name The filename for the thumbnail image, eg thumbnail.jpg + @param imageData The inputstream to read the thumbnail image from + + + Commit Changes to the underlying OPC namespace + + + A {@link POITextExtractor} for returning the textual + content of the OOXML file properties, eg author + and title. + + + Creates a new POIXMLPropertiesTextExtractor for the + given open document. + + + Creates a new POIXMLPropertiesTextExtractor, for the + same file that another TextExtractor is already + working on. + + + Returns the core document properties, eg author + + + Returns the extended document properties, eg + application + + + Returns the custom document properties, if + there are any + + + Represents a descriptor of a OOXML relation. + + @author Yegor Kozlov + + + Describes the content stored in a part. + + + The kind of connection between a source part and a target part in a namespace. + + + The path component of a pack URI. + + + Defines what object is used to construct instances of this relationship + + + Instantiates a POIXMLRelation. + + @param type content type + @param rel relationship + @param defaultName default item name + @param cls defines what object is used to construct instances of this relationship + + + Instantiates a POIXMLRelation. + + @param type content type + @param rel relationship + @param defaultName default item name + + + Return the content type. Content types define a media type, a subtype, and an + optional set of parameters, as defined in RFC 2616. + + @return the content type + + + Return the relationship, the kind of connection between a source part and a target part in a namespace. + Relationships make the connections between parts directly discoverable without looking at the content + in the parts, and without altering the parts themselves. + + @return the relationship + + + Return the default part name. Part names are used to refer to a part in the context of a + namespace, typically as part of a URI. + + @return the default part name + + + Returns the filename for the nth one of these, + e.g. /xl/comments4.xml + + + Returns the index of the filename within the package for the given part. + e.g. 4 for /xl/comments4.xml + + + Return type of the obejct used to construct instances of this relationship + + @return the class of the object used to construct instances of this relation + + + The POIXMLDocument that's open + + + Creates a new text extractor for the given document + + + Returns the core document properties + + + Returns the extended document properties + + + Returns the custom document properties + + + Returns opened document + + + Returns the opened OPCPackage that Contains the document + + + Returns an OOXML properties text extractor for the + document properties metadata, such as title and author. + + + + 是否输出列头 + + + + + 是否输出隐藏的列 + + + + + 是否输出隐藏的行 + + + + + 是否输出文本前的空格 + + + + + 是否输出行号 + + + + + 在跨列的单元格使用DIV标记 + + + + @return maximum 1-base index of column that were rendered, zero if none + + + Creates COLGROUP element with width specified for all columns. (Except + first if {@link #isOutputRowNumbers()}==true) + + + Creates a map (i.e. two-dimensional array) filled with ranges. Allow fast + retrieving {@link CellRangeAddress} of any cell, if cell is contained in + range. + + @see #getMergedRange(CellRangeAddress[][], int, int) + + + See here for Xio explanation and details + + + @param mergedRanges + map of sheet merged ranges built with + {@link #buildMergedRangesMap(HSSFSheet)} + @return {@link CellRangeAddress} from map if cell with specified row and + column numbers contained in found range, null otherwise + + + + Only Text and Formulas are imported. Pictures, Drawing, Styles etc. are all ignored. + + + + + Only Text, Comments and Formulas are imported. Pictures, Drawing, Styles etc. are all ignored. + + + + + Everything is imported - this is the same as NONE. + + + + + Factory for creating the appropriate kind of Workbook + (be it HSSFWorkbook or XSSFWorkbook), from the given input + + + + + Creates an HSSFWorkbook from the given POIFSFileSystem + + + + Creates an HSSFWorkbook from the given NPOIFSFileSystem + + + Creates a Workbook from the given NPOIFSFileSystem, which may + be password protected + + + + Creates an XSSFWorkbook from the given OOXML Package + + + + + Creates the appropriate HSSFWorkbook / XSSFWorkbook from + the given InputStream. The Stream is wraped inside a PushbackInputStream. + + Input Stream of .xls or .xlsx file + + IWorkbook depending on the input HSSFWorkbook or XSSFWorkbook is returned. + + + + Creates the appropriate HSSFWorkbook / XSSFWorkbook from + the given File, which must exist and be readable. + + + + + + + Note that for Workbooks opened this way, it is not possible + to explicitly close the underlying File resource. + + + + + Creates the appropriate HSSFWorkbook / XSSFWorkbook from + the given InputStream. The Stream is wraped inside a PushbackInputStream. + + Input Stream of .xls or .xlsx file + Customize the elements that are processed on the next import + IWorkbook depending on the input HSSFWorkbook or XSSFWorkbook is returned. + + + + Creates a specific FormulaEvaluator for the given workbook. + + + + + Sets the import option when opening the next workbook. + Works only for XSSF. For HSSF workbooks this option is ignored. + + Customize the elements that are processed on the next import + + + + 24.08.2009 @author Stefan Stern + + + + + + + + + + List of segments of available identifiers + + + @param lowerbound the lower limit of the id-range to manage. Must be greater than or equal to {@link #MIN_ID}. + @param upperbound the upper limit of the id-range to manage. Must be less then or equal {@link #MAX_ID}. + + + @return a new identifier. + @throws InvalidOperationException if no more identifiers are available, then an Exception is raised. + + + @param id + the identifier to release. Must be greater than or equal to + {@link #lowerbound} and must be less than or equal to {@link #upperbound} + @return true, if the identifier was reserved and has been successfully + released, false, if the identifier was not reserved. + + + + + + Provides handy methods to work with OOXML namespaces + + @author Yegor Kozlov + + + Clone the specified namespace. + + @param pkg the namespace to clone + @param file the destination file + @return the Cloned namespace + + + Creates an empty file in the default temporary-file directory, + + + Recursively copy namespace parts to the destination namespace + + + Copy core namespace properties + + @param src source properties + @param tgt target properties + + + Helper class to extract text from an OOXML Excel file + + + + Should header and footer be included? Default is true + + + + + Should sheet names be included? Default is true + + if set to true [include sheet names]. + + + + Should we return the formula itself, and not + the result it produces? Default is false + + if set to true [formulas not results]. + + + + Should cell comments be included? Default is false + + if set to true [include cell comments]. + + + Should sheet names be included? Default is true + + + Should we return the formula itself, and not + the result it produces? Default is false + + + Should cell comments be included? Default is false + + + Should headers and footers be included? Default is true + + + Should text within textboxes be included? Default is true + @param includeTextBoxes + + + Retreives the text contents of the file + + + + Maps an XLSX to an XML according to one of the mapping defined. + + + The output XML Schema must respect this limitations: + +
      +
    • all mandatory elements and attributes must be mapped (enable validation to check this)
    • + +
    • no <any> in complex type/element declaration
    • +
    • no <anyAttribute> attributes declaration
    • +
    • no recursive structures: recursive structures can't be nested more than one level
    • +
    • no abstract elements: abstract complex types can be declared but must not be used in elements.
    • +
    • no mixed content: an element can't contain simple text and child element(s) together
    • +
    • no <substitutionGroup> in complex type/element declaration
    • +
    +
    + + Creates a new exporter and Sets the mapping to be used when generating the XML output document + + @param map the mapping rule to be used + + + + Exports the data in an XML stream + + @param os OutputStream in which will contain the output XML + @param validate if true, validates the XML againts the XML Schema + @throws SAXException + @throws TransformerException + @throws ParserConfigurationException + + + Exports the data in an XML stream + + @param os OutputStream in which will contain the output XML + @param encoding the output charset encoding + @param validate if true, validates the XML againts the XML Schema + @throws SAXException + @throws ParserConfigurationException + @throws TransformerException + @throws InvalidFormatException + + + Validate the generated XML against the XML Schema associated with the XSSFMap + + @param xml the XML to validate + @return + + + Compares two xpaths to define an ordering according to the XML Schema + + + + The cells in a workbook can be calculated in different orders depending on various optimizations and + dependencies. The calculation chain object specifies the order in which the cells in a workbook were last calculated. + + @author Yegor Kozlov + + + Remove a formula reference from the calculation chain + + @param sheetId the sheet Id of a sheet the formula belongs to. + @param ref A1 style reference to the cell Containing the formula. + + + XML Beans uses a list, which is very slow + to search, so we wrap things with our own + map for fast Lookup. + + + Called after the reference is updated, so that + we can reflect that in our cache + + + Called after the reference is updated, so that + we can reflect that in our cache + @param oldReference the comment to remove from the commentRefs map + @param comment the comment to replace in the commentRefs map + + + + Searches the author. If not found he is added to the list of authors. + + author to search + index of the author + + + Finds the cell comment at cellAddress, if one exists + + @param cellAddress the address of the cell to find a comment + @return cell comment if one exists, otherwise returns null + @ + + + Finds the cell comment at cellAddress, if one exists + + @param cellAddress the address of the cell to find a comment + @return cell comment if one exists, otherwise returns null + + + Get the underlying CTComment xmlbean for a comment located at cellRef, if it exists + + @param cellRef the location of the cell comment + @return CTComment xmlbean if comment exists, otherwise return null. + @ + + + Get the underlying CTComment xmlbean for a comment located at cellRef, if it exists + + @param cellRef the location of the cell comment + @return CTComment xmlbean if comment exists, otherwise return null. + + + Returns all cell comments on this sheet. + @return A map of each Comment in this sheet, keyed on the cell address where + the comment is located. + + + + Create a new comment located at cell address + + @param ref the location to add the comment + @return a new CTComment located at ref with default author + + + Create a new comment located` at cell address + + @param ref the location to add the comment + @return a new CTComment located at ref with default author + + + Remove the comment at cellRef location, if one exists + + @param cellRef the location of the comment to remove + @return returns true if a comment was removed + @deprecated 2015-11-23 (circa POI 3.14beta1). Use {@link #removeComment(CellAddress)} instead + + + Remove the comment at cellRef location, if one exists + + @param cellRef the location of the comment to remove + @return returns true if a comment was removed + + + Add a new author to the CommentsTable. + This does not check if the author already exists. + + @param author the name of the comment author + @return the index of the new author + + + Returns the underlying CTComments list xmlbean + + @return underlying comments list xmlbean + + + Holds details of links to parts of other workbooks (eg named ranges), + along with the most recently seen values for what they point to. + + + Returns the underlying xmlbeans object for the external + link table + + + get or set the last recorded name of the file that this + is linked to + + + + This class : the Custom XML Mapping Part (Open Office XML Part 1: + chapter 12.3.6) + + An instance of this part type Contains a schema for an XML file, and + information on the behavior that is used when allowing this custom XML schema + to be mapped into the spreadsheet. + + @author Roberto Manicardi + + + Returns the parent XSSFWorkbook + + @return the parent XSSFWorkbook + + + + @return the internal data object + + + Gets the + @param schemaId the schema ID + @return CTSchema by it's ID + + + + @return all the mappings configured in this document + + + Used internally to navigate the paragraph text style hierarchy within a shape and fetch properties + + + + @param shape the shape being examined + @return true if the desired property was fetched + + + Table of strings shared across all sheets in a workbook. +

    + A workbook may contain thousands of cells Containing string (non-numeric) data. Furthermore this data is very + likely to be repeated across many rows or columns. The goal of implementing a single string table that is shared + across the workbook is to improve performance in opening and saving the file by only Reading and writing the + repetitive information once. +

    +

    + Consider for example a workbook summarizing information for cities within various countries. There may be a + column for the name of the country, a column for the name of each city in that country, and a column + Containing the data for each city. In this case the country name is repetitive, being duplicated in many cells. + In many cases the repetition is extensive, and a tremendous savings is realized by making use of a shared string + table when saving the workbook. When displaying text in the spreadsheet, the cell table will just contain an + index into the string table as the value of a cell, instead of the full string. +

    +

    + The shared string table Contains all the necessary information for displaying the string: the text, formatting + properties, and phonetic properties (for East Asian languages). +

    + + @author Nick Birch + @author Yegor Kozlov +
    + + Array of individual string items in the Shared String table. + + + Maps strings and their indexes in the strings arrays + + + An integer representing the total count of strings in the workbook. This count does not + include any numbers, it counts only the total of text strings in the workbook. + + + An integer representing the total count of unique strings in the Shared String Table. + A string is unique even if it is a copy of another string, but has different formatting applied + at the character level. + + + Return a string item by index + + @param idx index of item to return. + @return the item at the specified position in this Shared String table. + + + Return an integer representing the total count of strings in the workbook. This count does not + include any numbers, it counts only the total of text strings in the workbook. + + @return the total count of strings in the workbook + + + Returns an integer representing the total count of unique strings in the Shared String Table. + A string is unique even if it is a copy of another string, but has different formatting applied + at the character level. + + @return the total count of unique strings in the workbook + + + Add an entry to this Shared String table (a new value is appened to the end). + +

    + If the Shared String table already Contains this CT_Rst bean, its index is returned. + Otherwise a new entry is aded. +

    + + @param st the entry to add + @return index the index of Added entry +
    + + Provide low-level access to the underlying array of CT_Rst beans + + @return array of CT_Rst beans + + + + this table out as XML. + + @param out The stream to write to. + @throws IOException if an error occurs while writing. + + + + This class : the Single Cell Tables Part (Open Office XML Part 4: + chapter 3.5.2) + + + @author Roberto Manicardi + + + + @return all the SimpleXmlCell Contained in this SingleXmlCells element + + + Table of styles shared across all sheets in a workbook. + + @author ugo + + + The first style id available for use as a custom style + + + Depending on the version of Excel, the maximum number of number formats in a workbook is between 200 and 250 + See https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3 + POI defaults this limit to 250, but can be increased or decreased on a per-StylesTable basis with + {@link #setMaxNumberOfDataFormats(int)} if needed. + + + Get the upper limit on the number of data formats that has been set for the style table. + To get the current number of data formats in use, use {@link #getNumDataFormats()}. + + @return the maximum number of data formats allowed in the workbook + + + Create a new, empty StylesTable + + + If there isn't currently a {@link ThemesTable} for the + current Workbook, then creates one and sets it up. + After this, calls to {@link #getTheme()} won't give null + + + Read this shared styles table from an XML file. + + @param is The input stream Containing the XML document. + @throws IOException if an error occurs while Reading. + + + Get number format string given its id + + @param idx number format id + @return number format code + + + Get number format string given its id + + @param fmtId number format id + @return number format code + + + Puts fmt in the numberFormats map if the format is not + already in the the number format style table. + Does nothing if fmt is already in number format style table. + + @param fmt the number format to add to number format style table + @return the index of fmt in the number format style table + + + Add a number format with a specific ID into the numberFormats map. + If a format with the same ID already exists, overwrite the format code + with fmt + This may be used to override built-in number formats. + + @param index the number format ID + @param fmt the number format code + + + Remove a number format from the style table if it exists. + All cell styles with this number format will be modified to use the default number format. + + @param fmt the number format to remove + @return true if the number format was removed + + + Remove a number format from the style table if it exists + All cell styles with this number format will be modified to use the default number format + + @param fmt the number format to remove + @return true if the number format was removed + + + Records the given font in the font table. + Will re-use an existing font index if this + font matches another, EXCEPT if forced + registration is requested. + This allows people to create several fonts + then customise them later. + Note - End Users probably want to call + {@link XSSFFont#registerTo(StylesTable)} + + + + Adds a border to the border style table if it isn't already in the style table + Does nothing if border is already in borders style table + + border to add + return the index of the added border + + + + Adds a fill to the fill style table if it isn't already in the style table + Does nothing if fill is already in fill style table + + fill to add + return the index of the added fill + + + + Adds a cell to the styles table. Does not check for duplicates + + the cell to add to the styles table + return the added cell ID in the style table + + + + Adds a cell style to the styles table.Does not check for duplicates. + + the cell style to add to the styles table + return the cell style ID in the style table + + + get the size of cell styles + + + @return number of data formats in the styles table + + + For unit testing only + + + For unit testing only + + + For unit testing only + + + For unit testing only! + + + Write this table out as XML. + + @param out The stream to write to. + @throws IOException if an error occurs while writing. + + + + Adds a Dxf to the style table Does not check for duplicates. + + the Dxf to add + added dxf ID in the style table + + + Create a cell style in this style table. + Note - End users probably want to call {@link XSSFWorkbook#createCellStyle()} + rather than working with the styles table directly. + + + Finds a font that matches the one with the supplied attributes + + + Finds a font that matches the one with the supplied attributes + + + Class that represents theme of XLSX document. The theme includes specific + colors and fonts. + + + Create a new, empty ThemesTable + + + Construct a ThemesTable. + @param part A PackagePart. + @param rel A PackageRelationship. + + + Construct a ThemesTable from an existing ThemeDocument. + @param theme A ThemeDocument. + + + Convert a theme "index" into a color. + @param idx A theme "index" + @return The mapped XSSFColor, or null if not mapped. + + + If the colour is based on a theme, then inherit + information (currently just colours) from it as + required. + + + Write this table out as XML. + + @param out The stream to write to. + @throws IOException if an error occurs while writing. + + + + map of tracked columns, with values containing the best-fit width for the column + Using a HashMap instead of a TreeMap because insertion (trackColumn), removal (untrackColumn), and membership (everything) + will be called more frequently than getTrackedColumns(). The O(1) cost of insertion, removal, and membership operations + outweigh the infrequent O(n*log n) cost of sorting getTrackedColumns(). + Memory consumption for a HashMap and TreeMap is about the same + + + + Gets the current best-fit column width for the provided settings + + @param useMergedCells true if merged cells are considered into the best-fit column width calculation + @return best fit column width, measured in default character widths. + + + Sets the best-fit column width to the maximum of the current width and the provided width + + @param unmergedWidth the best-fit column width calculated with useMergedCells=False + @param mergedWidth the best-fit column width calculated with useMergedCells=True + + + AutoSizeColumnTracker constructor. Holds no reference to sheet + + @param sheet the sheet associated with this auto-size column tracker + @since 3.14beta1 + + + Get the currently tracked columns, naturally ordered. + Note if all columns are tracked, this will only return the columns that have been explicitly or implicitly tracked, + which is probably only columns containing 1 or more non-blank values + + @return a set of the indices of all tracked columns + @since 3.14beta1 + + + Returns true if column is currently tracked for auto-sizing. + + @param column the index of the column to check + @return true if column is tracked + @since 3.14beta1 + + + Returns true if all columns are implicitly tracked. + + @return true if all columns are implicitly tracked + @since 3.14beta1 + + + Tracks all non-blank columns + Allows columns that have been explicitly untracked to be tracked + @since 3.14beta1 + + + Untrack all columns that were previously tracked for auto-sizing. + All best-fit column widths are forgotten. + @since 3.14beta1 + + + Marks multiple columns for inclusion in auto-size column tracking. + Note this has undefined behavior if columns are tracked after one or more rows are written to the sheet. + Any column in columns that are already tracked are ignored by this call. + + @param columns the indices of the columns to track + @since 3.14beta1 + + + Marks a column for inclusion in auto-size column tracking. + Note this has undefined behavior if a column is tracked after one or more rows are written to the sheet. + If column is already tracked, this call does nothing. + + @param column the index of the column to track for auto-sizing + @return if column is already tracked, the call does nothing and returns false + @since 3.14beta1 + + + Implicitly track a column if it has not been explicitly untracked + If it has been explicitly untracked, this call does nothing and returns false. + Otherwise return true + + @param column the column to implicitly track + @return false if column has been explicitly untracked, otherwise return true + + + Removes columns that were previously marked for inclusion in auto-size column tracking. + When a column is untracked, the best-fit width is forgotten. + Any column in columns that is not tracked will be ignored by this call. + + @param columns the indices of the columns to track for auto-sizing + @return true if one or more columns were untracked as a result of this call + @since 3.14beta1 + + + Removes a column that was previously marked for inclusion in auto-size column tracking. + When a column is untracked, the best-fit width is forgotten. + If column is not tracked, it will be ignored by this call. + + @param column the index of the column to track for auto-sizing + @return true if column was tracked prior this call, false if no action was taken + @since 3.14beta1 + + + Get the best-fit width of a tracked column + + @param column the index of the column to get the current best-fit width of + @param useMergedCells true if merged cells should be considered when computing the best-fit width + @return best-fit column width, measured in number of characters + @throws InvalidOperationException if column is not tracked and trackAllColumns is false + @since 3.14beta1 + + + Calculate the best fit width for each tracked column in row + + @param row the row to get the cells + @since 3.14beta1 + + + Helper for {@link #updateColumnWidths(Row)}. + Implicitly track the columns corresponding to the cells in row. + If all columns in the row are already tracked, this call does nothing. + Explicitly untracked columns will not be tracked. + + @param row the row containing cells to implicitly track the columns + @since 3.14beta1 + + + Helper for {@link #updateColumnWidths(Row)}. + + @param cell the cell to compute the best fit width on + @param pair the column width pair to update + @since 3.14beta1 + + + @param sharedStringsTable the shared strings table, or null if inline text is used + + + @return temp file to write sheet data + + + Table of strings shared across this workbook. + If two cells contain the same string, then the cell value is the same index into SharedStringsTable + + + Create a temp file to write sheet data. + By default, temp files are created in the default temporary-file directory + with a prefix "poi-sxssf-sheet" and suffix ".xml". Subclasses can override + it and specify a different temp directory or filename or suffix, e.g. .gz + + @return temp file to write sheet data + + + Create a writer for the sheet data. + + @param fd the file to write to + + + Override this to translate (such as encrypt or compress) the file output stream + as it is being written to disk. + The default behavior is to to pass the stream through unmodified. + + @param fos the stream to decorate + @return a decorated stream + @throws IOException + @see #decorateInputStream(FileInputStream) + + + flush and close the temp data writer. + This method must be invoked before calling {@link #getWorksheetXMLInputStream()} + + + @return a stream to read temp file with the sheet data + + + Override this to translate (such as decrypt or expand) the file input stream + as it is being read from disk. + The default behavior is to to pass the stream through unmodified. + + @param fis the stream to decorate + @return a decorated stream + @throws IOException + @see #decorateOutputStream(FileOutputStream) + + + Write a row to the file + + @param rownum 0-based row number + @param row a row + + + @return whether the string has leading / trailing spaces that + need to be preserved with the xml:space=\"preserve\" attribute + + + Deletes the temporary file that backed this sheet on disk. + @return true if the file was deleted, false if it wasn't. + + + Used to help format error messages + + + Will return {@link CellType} in a future version of POI. + For forwards compatibility, do not hard-code cell type literals in your code. + + @return cell type + + + @since POI 3.15 beta 3 + @deprecated POI 3.15 beta 3. + Will be deleted when we make the CellType enum transition. See bug 59791. + + + Will return {@link CellType} in a future version of POI. + For forwards compatibility, do not hard-code cell type literals in your code. + + @return cell type of cached formula result + + + @since POI 3.15 beta 3 + @deprecated POI 3.15 beta 3. + Will be deleted when we make the CellType enum transition. See bug 59791. + + + Loops over rows and cells, evaluating formula cells there. + If any sheets are inactive, or any cells outside of the window, + will give an Exception. + For SXSSF, you generally don't want to use this method, instead + evaluate your formulas as you go before they leave the window. + + + Compares two SXSSFRow objects. Two rows are equal if they belong to the same worksheet and + their row indexes are equal. + + @param other the SXSSFRow to be compared. + @return
      +
    • + the value 0 if the row number of this SXSSFRow is + equal to the row number of the argument SXSSFRow +
    • +
    • + a value less than 0 if the row number of this this SXSSFRow is + numerically less than the row number of the argument SXSSFRow +
    • +
    • + a value greater than 0 if the row number of this this SXSSFRow is + numerically greater than the row number of the argument SXSSFRow +
    • +
    + @throws IllegalArgumentException if the argument row belongs to a different worksheet +
    + + + throws RuntimeException if the bounds are exceeded. + + + + + Return the column number of a cell if it is in this row + Otherwise return -1 + + @param cell the cell to get the index of + @return cell column index if it is in this row, -1 otherwise + + + Create an iterator over the cells from [0, getLastCellNum()). + Includes blank cells, excludes empty cells + + Returns an iterator over all filled cells (created via Row.createCell()) + Throws ConcurrentModificationException if cells are added, moved, or + removed after the iterator is created. + + + Returns whether row and column headings are printed. + + @return whether row and column headings are printed + + + Returns the list of merged regions. If you want multiple regions, this is + faster than calling {@link #getMergedRegion(int)} each time. + + @return the list of merged regions + + + + Adds a merged region of cells (hence those cells form one). + Skips validation.It is possible to create overlapping merged regions + or create a merged region that intersects a multi-cell array formula + with this formula, which may result in a corrupt workbook. + + region to merge + index of this region + if region contains fewer than 2 cells + + + Verify that merged regions do not intersect multi-cell array formulas and + no merged regions intersect another merged region in this sheet. + + @throws InvalidOperationException if region intersects with a multi-cell array formula + @throws InvalidOperationException if at least one region intersects with another merged region in this sheet + + + Adjusts the column width to fit the contents. + +

    + This process can be relatively slow on large sheets, so this should + normally only be called once per column, at the end of your + processing. +

    + You can specify whether the content of merged cells should be considered or ignored. + Default is to ignore merged cells. + +

    + Special note about SXSSF implementation: You must register the columns you wish to track with + the SXSSFSheet using {@link #trackColumnForAutoSizing(int)} or {@link #trackAllColumnsForAutoSizing()}. + This is needed because the rows needed to compute the column width may have fallen outside the + random access window and been flushed to disk. + Tracking columns is required even if all rows are in the random access window. +

    +

    New in POI 3.14 beta 1: auto-sizes columns using cells from current and flushed rows.

    + + @param column the column index to auto-size +
    + + Adjusts the column width to fit the contents. +

    + This process can be relatively slow on large sheets, so this should + normally only be called once per column, at the end of your + processing. +

    + You can specify whether the content of merged cells should be considered or ignored. + Default is to ignore merged cells. + +

    + Special note about SXSSF implementation: You must register the columns you wish to track with + the SXSSFSheet using {@link #trackColumnForAutoSizing(int)} or {@link #trackAllColumnsForAutoSizing()}. + This is needed because the rows needed to compute the column width may have fallen outside the + random access window and been flushed to disk. + Tracking columns is required even if all rows are in the random access window. +

    +

    New in POI 3.14 beta 1: auto-sizes columns using cells from current and flushed rows.

    + + @param column the column index to auto-size + @param useMergedCells whether to use the contents of merged cells when calculating the width of the column +
    + + + Get a Hyperlink in this sheet anchored at row, column + + The index of the row of the hyperlink, zero-based + the index of the column of the hyperlink, zero-based + return hyperlink if there is a hyperlink anchored at row, column; otherwise returns null + + + + Get a Hyperlink in this sheet located in a cell specified by {code addr} + + The address of the cell containing the hyperlink + return hyperlink if there is a hyperlink anchored at {@code addr}; otherwise returns {@code null} + + + Get a list of Hyperlinks in this sheet + + @return Hyperlinks for the sheet + + + + Returns cell comment for the specified row and column + + The row. + The column. + cell comment or null if not found + + + + Returns cell comment for the specified location + + cell location + return cell comment or null if not found + + + + Returns all cell comments on this sheet. + + return A Dictionary of each Comment in the sheet, keyed on the cell address where the comment is located. + + + Set row groupings (like groupRow) in a stream-friendly manner + +

    + groupRows requires all rows in the group to be in the current window. + This is not always practical. Instead use setRowOutlineLevel to + explicitly set the group level. Level 1 is the top level group, + followed by 2, etc. It is up to the user to ensure that level 2 + groups are correctly nested under level 1, etc. +

    + + @param rownum index of row to update (0-based) + @param level outline level (greater than 0) +
    + + Removes a merged region of cells (hence letting them free) + + @param indices of the regions to unmerge + + + Track a column in the sheet for auto-sizing. + Note this has undefined behavior if a column is tracked after one or more rows are written to the sheet. + If column is already tracked, this call does nothing. + + @param column the column to track for autosizing + @since 3.14beta1 + @see #trackColumnsForAutoSizing(Collection) + @see #trackAllColumnsForAutoSizing() + + + Track several columns in the sheet for auto-sizing. + Note this has undefined behavior if columns are tracked after one or more rows are written to the sheet. + Any column in columns that are already tracked are ignored by this call. + + @param columns the columns to track for autosizing + @since 3.14beta1 + + + Tracks all columns in the sheet for auto-sizing. If this is called, individual columns do not need to be tracked. + Because determining the best-fit width for a cell is expensive, this may affect the performance. + @since 3.14beta1 + + + Removes a column that was previously marked for inclusion in auto-size column tracking. + When a column is untracked, the best-fit width is forgotten. + If column is not tracked, it will be ignored by this call. + + @param column the index of the column to track for auto-sizing + @return true if column was tracked prior to this call, false if no action was taken + @since 3.14beta1 + @see #untrackColumnsForAutoSizing(Collection) + @see #untrackAllColumnsForAutoSizing(int) + + + Untracks several columns in the sheet for auto-sizing. + When a column is untracked, the best-fit width is forgotten. + Any column in columns that is not tracked will be ignored by this call. + + @param columns the indices of the columns to track for auto-sizing + @return true if one or more columns were untracked as a result of this call + + @param columns the columns to track for autosizing + @since 3.14beta1 + + + Untracks all columns in the sheet for auto-sizing. Best-fit column widths are forgotten. + If this is called, individual columns do not need to be untracked. + @since 3.14beta1 + + + Returns true if column is currently tracked for auto-sizing. + + @param column the index of the column to check + @return true if column is tracked + @since 3.14beta1 + + + Get the currently tracked columns for auto-sizing. + Note if all columns are tracked, this will only return the columns that have been explicitly or implicitly tracked, + which is probably only columns containing 1 or more non-blank values + + @return a set of the indices of all tracked columns + @since 3.14beta1 + + + @param rowIndex the zero based row index to find from + + + + Specifies how many rows can be accessed at most via getRow(). + The exceeding rows (if any) are flushed to the disk while rows + with lower index values are flushed first. + + + @return Last row number to be flushed to disk, or -1 if none flushed yet + + + Streaming version of XSSFWorkbook implementing the "BigGridDemo" strategy. + + This allows to write very large files without running out of memory as only + a configurable portion of the rows are kept in memory at any one time. + + You can provide a template workbook which is used as basis for the written + data. + + See https://poi.apache.org/spreadsheet/how-to.html#sxssf for details. + + Please note that there are still things that still may consume a large + amount of memory based on which features you are using, e.g. merged regions, + comments, ... are still only stored in memory and thus may require a lot of + memory if used extensively. + + SXSSFWorkbook defaults to using inline strings instead of a shared strings + table. This is very efficient, since no document content needs to be kept in + memory, but is also known to produce documents that are incompatible with + some clients. With shared strings enabled all unique strings in the document + has to be kept in memory. Depending on your document content this could use + a lot more resources than with shared strings disabled. + + Carefully review your memory budget and compatibility needs before deciding + whether to enable shared strings or not. + + Streaming version of the XSSFWorkbook, originally implemented in the "BigGridDemo". + + + + See the constructors for a more detailed description of the sliding window of rows. + + @return The number of rows that are kept in memory at once before flushing them out. + + + + whether temp file should be compresss. + + + + + shared string table - a cache of strings in this workbook. + + + + Construct an empty workbook and specify the window for row access. +

    + When a new node is created via createRow() and the total number + of unflushed records would exceed the specified value, then the + row with the lowest index value is flushed and cannot be accessed + via getRow() anymore. +

    +

    + A value of -1 indicates unlimited access. In this case all + records that have not been flushed by a call to flush() are available + for random access. +

    +

    + A value of 0 is not allowed because it would flush any newly created row + without having a chance to specify any cells. +

    + + @param rowAccessWindowSize the number of rows that are kept in memory until flushed out, see above. +
    + + + Construct a new workbook with default row window size + + + + Construct a workbook from a template. +

    + There are three use-cases to use SXSSFWorkbook(XSSFWorkbook) : +

      +
    1. + Append new sheets to existing workbooks. You can open existing + workbook from a file or create on the fly with XSSF. +
    2. +
    3. + Append rows to existing sheets. The row number MUST be greater + than max(rownum) in the template sheet. +
    4. +
    5. + Use existing workbook as a template and re-use global objects such + as cell styles, formats, images, etc. +
    6. +
    + All three use cases can work in a combination. +

    + What is not supported: +
      +
    • + Access initial cells and rows in the template. After constructing + SXSSFWorkbook(XSSFWorkbook) all internal windows are empty and + SXSSFSheet@getRow and SXSSFRow#getCell return null. +
    • +
    • + Override existing cells and rows. The API silently allows that but + the output file is invalid and Excel cannot read it. +
    • +
    + + @param workbook the template workbook +
    + + Constructs an workbook from an existing workbook. +

    + When a new node is created via createRow() and the total number + of unflushed records would exceed the specified value, then the + row with the lowest index value is flushed and cannot be accessed + via getRow() anymore. +

    +

    + A value of -1 indicates unlimited access. In this case all + records that have not been flushed by a call to flush() are available + for random access. +

    +

    + A value of 0 is not allowed because it would flush any newly created row + without having a chance to specify any cells. +

    + + @param rowAccessWindowSize the number of rows that are kept in memory until flushed out, see above. +
    + + Constructs an workbook from an existing workbook. +

    + When a new node is created via createRow() and the total number + of unflushed records would exceed the specified value, then the + row with the lowest index value is flushed and cannot be accessed + via getRow() anymore. +

    +

    + A value of -1 indicates unlimited access. In this case all + records that have not been flushed by a call to flush() are available + for random access. +

    +

    + A value of 0 is not allowed because it would flush any newly created row + without having a chance to specify any cells. +

    + + @param rowAccessWindowSize the number of rows that are kept in memory until flushed out, see above. + @param compressTmpFiles whether to use gzip compression for temporary files +
    + + Constructs an workbook from an existing workbook. +

    + When a new node is created via createRow() and the total number + of unflushed records would exceed the specified value, then the + row with the lowest index value is flushed and cannot be accessed + via getRow() anymore. +

    +

    + A value of -1 indicates unlimited access. In this case all + records that have not been flushed by a call to flush() are available + for random access. +

    +

    + A value of 0 is not allowed because it would flush any newly created row + without having a chance to specify any cells. +

    + + @param workbook the template workbook + @param rowAccessWindowSize the number of rows that are kept in memory until flushed out, see above. + @param compressTmpFiles whether to use gzip compression for temporary files + @param useSharedStringsTable whether to use a shared strings table + + Currently only supports writing not reading. E.g. the number of rows returned from a worksheet will be wrong etc. + + + + + +
    + + Set whether temp files should be compressed. +

    + SXSSF writes sheet data in temporary files (a temp file per-sheet) + and the size of these temp files can grow to to a very large size, + e.g. for a 20 MB csv data the size of the temp xml file become few GB large. + If the "compress" flag is set to true then the temporary XML is gzipped. +

    +

    + Please note the the "compress" option may cause performance penalty. +

    + @param compress whether to compress temp files +
    + + Finds a font that matches the one with the supplied attributes + + @return the font with the matched attributes or null + + + Dispose of temporary files backing this workbook on disk. + Calling this method will render the workbook unusable. + @return true if all temporary files were deleted successfully. + + + Returns all defined names with the given name. + + @param name the name of the defined name + @return a list of the defined names with the specified name. An empty list is returned if none is found. + + + + Returns all defined names + + Returns all defined names + + + + Remove the given defined name + + the name to remove + + + + Returns the spreadsheet version (EXCLE2007) of this workbook + + + + + Gets a bool value that indicates whether the date systems used in the workbook starts in 1904. + The default value is false, meaning that the workbook uses the 1900 date system, + where 1/1/1900 is the first day in the system. + + True if the date systems used in the workbook starts in 1904 + + + Internal POI use only - parent of XSSF and SXSSF Evaluation workbooks + + + XSSF doesn't use external sheet indexes, so when asked treat + it just as a local index + + + @return the external sheet index of the sheet with the given internal + index. Used by some of the more obscure formula and named range things. + Fairly easy on XSSF (we think...) since the internal and external + indices are the same + + + + Return EvaluationName wrapper around the matching XSSFName (named range) + + case-aware but case-insensitive named range in workbook + index of sheet if named range scope is limited to one sheet + if named range scope is global to the workbook, sheetIndex is -1. + If name is a named range in the workbook, returns + EvaluationName corresponding to that named range + Returns null if there is no named range with the same name and scope in the workbook + + + + + Return an external name (named range, function, user-defined function) Pxg + + + + + + + Returns the data table with the given name (case insensitive). + Tables are cached for performance (formula evaluation looks them up by name repeatedly). + After the first table lookup, adding or removing a table from the document structure will cause trouble. + This is meant to be used on documents whose structure is essentially static at the point formulas are evaluated. + + @param name the data table name (case-insensitive) + @return The Data table in the workbook named name, or null if no table is named name. + @since 3.15 beta 2 + + + Internal POI use only - parent of XSSF and SXSSF formula Evaluators + + + Turns a XSSFCell / SXSSFCell into a XSSFEvaluationCell + + + Returns a CellValue wrapper around the supplied ValueEval instance. + + + + Holds data for a XSSF Line Chart + + + + + + List of all data series. + + + Base class for all axis types. + + @author Roman Kashitsyn + + + @author Roman Kashitsyn + + + @return new scatter chart data instance + + + @return factory instance + + + Represents a SpreadsheetML chart legend + @author Roman Kashitsyn + + + Underlaying CTLagend bean + + + Create a new SpreadsheetML chart legend + + + Set sensible default styling. + + + Return the underlying CTLegend bean. + + @return the underlying CTLegend bean + + + Package private class with utility methods. + + @author Roman Kashitsyn + + + Builds CTAxDataSource object content from POI ChartDataSource. + @param ctAxDataSource OOXML data source to build + @param dataSource POI data source to use + + + Builds CTNumDataSource object content from POI ChartDataSource + @param ctNumDataSource OOXML data source to build + @param dataSource POI data source to use + + + + Holds data for a XSSF Line Chart + + + + + + List of all data series. + + + Represents a SpreadsheetML manual layout. + @author Roman Kashitsyn + + + Underlaying CTManualLayout bean. + + + Create a new SpreadsheetML manual layout. + @param layout a Spreadsheet ML layout that should be used as base. + + + Create a new SpreadsheetML manual layout for chart. + @param chart a chart to create layout for. + + + Return the underlying CTManualLayout bean. + + @return the underlying CTManualLayout bean. + + + Represents DrawingML scatter chart. + + @author Roman Kashitsyn + + + List of all data series. + + + Package private ScatterChartSerie implementation. + + + Returns data source used for X axis values. + @return data source used for X axis values + + + Returns data source used for Y axis values. + @return data source used for Y axis values + + + @param useCache if true, cached results will be Added on plot + + + Value axis type. + + @author Roman Kashitsyn + + + Cell Settings avaiable in the Format/Alignment tab + + + Creates a Cell Alignment from the supplied XML defInition + + @param cellAlignment + + + Get the type of vertical alignment for the cell + + @return the type of aligment + @see VerticalAlignment + + + Get the type of horizontal alignment for the cell + + @return the type of aligment + @see HorizontalAlignment + + + Get the number of spaces to indent the text in the cell + + @return indent - number of spaces + + + + Whether the text should be wrapped + + @return a bool value indicating if the text in a cell should be line-wrapped within the cell. + + + Access to low-level data + + + The enumeration value indicating the side being used for a cell border. + + + This element Contains border formatting information, specifying border defInition formats (left, right, top, bottom, diagonal) + for cells in the workbook. + Color is optional. + + + Creates a Cell Border from the supplied XML defInition + + + Creates a Cell Border from the supplied XML defInition + + + Creates a new, empty Cell Border. + You need to attach this to the Styles Table + + + Records the Themes Table that is associated with + the current font, used when looking up theme + based colours and properties. + + + Returns the underlying XML bean. + + @return CT_Border + + + Get the type of border to use for the selected border + + @param side - - where to apply the color defInition + @return borderstyle - the type of border to use. default value is NONE if border style is not Set. + @see BorderStyle + + + Set the type of border to use for the selected border + + @param side - - where to apply the color defInition + @param style - border style + @see BorderStyle + + + Get the color to use for the selected border + + @param side - where to apply the color defInition + @return color - color to use as XSSFColor. null if color is not set + + + Set the color to use for the selected border + + @param side - where to apply the color defInition + @param color - the color to use + + + This element specifies fill formatting. + A cell fill consists of a background color, foreground color, and pattern to be applied across the cell. + + + Creates a CellFill from the supplied parts + + @param fill - fill + + + Creates an empty CellFill + + + Get the background fill color. + + @return fill color, null if color is not set + + + Set the background fill color represented as a indexed color value. + + @param index + + + Set the background fill color represented as a {@link XSSFColor} value. + + @param color + + + Get the foreground fill color. + + @return XSSFColor - foreground color. null if color is not set + + + Set the foreground fill color as a indexed color value + + @param index - the color to use + + + Set the foreground fill color represented as a {@link XSSFColor} value. + + @param color - the color to use + + + get the fill pattern + + @return fill pattern type. null if fill pattern is not set + + + set the fill pattern + + @param patternType fill pattern to use + + + Returns the underlying XML bean. + + @return CT_Fill + + + + Parent class of all XSSF headers and footers. + + + + Create an instance of XSSFHeaderFooter from the supplied XML bean + + @param headerFooter + + + Returns the underlying CTHeaderFooter xml bean + + @return the underlying CTHeaderFooter xml bean + + + Are fields currently being stripped from the text that this + {@link XSSFHeaderFooter} returns? Default is false, but can be Changed + + + Should fields (eg macros) be stripped from the text that this class + returns? Default is not to strip. + + @param StripFields + + + Removes any fields (eg macros, page markers etc) from the string. + Normally used to make some text suitable for showing to humans, and the + resultant text should not normally be saved back into the document! + + + get the text representing the center part of this element + + + get the text representing the left part of this element + + + get the text representing the right part of this element + + + Helper class for dealing with the Column Settings on + a CT_Worksheet (the data part of a sheet). + Note - within POI, we use 0 based column indexes, but + the column defInitions in the XML are 1 based! + + + Returns the Column at the given 0 based index + + + Returns the Column at the given 1 based index. + POI default is 0 based, but the file stores + as 1 based. + + + + Returns a view of the portion of this map whose keys are greater than (or + equal to, if inclusive is true) fromKey. + + + + + + + @see Sweep line algorithm + + + Does the column at the given 0 based index exist + in the supplied list of column defInitions? + + + Return the CT_Col at the given (0 based) column index, + creating it if required. + + + Split into left, center, right + + + Utility to update formulas and named ranges when a sheet name was Changed + + @author Yegor Kozlov + + + Update sheet name in all formulas and named ranges. + Called from {@link XSSFWorkbook#setSheetName(int, String)} +

    +

    + The idea is to parse every formula and render it back to string + with the updated sheet name. This is done by parsing into Ptgs, + looking for ones with sheet references in them, and changing those +

    + + @param sheetIndex the 0-based index of the sheet being changed + @param oldName the old sheet name + @param newName the new sheet name +
    + + Parse cell formula and re-assemble it back using the specified FormulaRenderingWorkbook. + + @param cell the cell to update + @param frwb the formula rendering workbbok that returns new sheet name + + + Parse formula in the named range and re-assemble it back using the specified FormulaRenderingWorkbook. + + @param name the name to update + @param frwb the formula rendering workbbok that returns new sheet name + + + XSSF-specific code for working with ignored errors + + + Sets the XORed or hashed password + + @param xobj the xmlbeans object which Contains the password attributes + @param password the password, if null, the password attributes will be Removed + @param hashAlgo the hash algorithm, if null the password will be XORed + @param prefix the prefix of the password attributes, may be null + + + Validates the password, i.e. + calculates the hash of the given password and Compares it against the stored hash + + @param xobj the xmlbeans object which Contains the password attributes + @param password the password, if null the method will always return false, + even if there's no password Set + @param prefix the prefix of the password attributes, may be null + + @return true, if the hashes match + + + @author Yegor Kozlov + + + Shift merged regions + + @param startRow the row to start Shifting + @param endRow the row to end Shifting + @param n the number of rows to shift + @return an array of affected cell regions + + + Updated named ranges + + + Update formulas. + + + + Update the formulas in specified row using the formula shifting policy specified by shifter + + the row to update the formulas on + the formula shifting policy + + + Shift a formula using the supplied FormulaShifter + + @param row the row of the cell this formula belongs to. Used to get a reference to the parent workbook. + @param formula the formula to shift + @param Shifter the FormulaShifter object that operates on the Parsed formula tokens + @return the Shifted formula if the formula was Changed, + null if the formula wasn't modified + + + Shift the Hyperlink anchors (not the hyperlink text, even if the hyperlink + is of type LINK_DOCUMENT and refers to a cell that was shifted). Hyperlinks + do not track the content they point to. + + @param shifter + + + * + * This class is a wrapper around the CTSingleXmlCell (Open Office XML Part 4: + * chapter 3.5.2.1) + * + + * + * @author Roberto Manicardi + * + + + Gets the XSSFCell referenced by the R attribute or Creates a new one if cell doesn't exists + @return the referenced XSSFCell, null if the cell reference is invalid + + + + This class is a wrapper around the CT_XmlColumnPr (Open Office XML Part 4: + chapter 3.5.1.7) + + + @author Roberto Manicardi + + + (see Open Office XML Part 4: chapter 3.5.1.3) + @return An integer representing the unique identifier of this column. + + + If the XPath is, for example, /Node1/Node2/Node3 and /Node1/Node2 is the common XPath for the table, the local XPath is /Node3 + + @return the local XPath + + + Specifies type of automatic numbered bullet points that should be applied to a paragraph. + + + (a), (b), (c), ... + + + (A), (B), (C), ... + + + a), b), c), ... + + + A), B), C), ... + + + a., b., c., ... + + + A., B., C., ... + + + (1), (2), (3), ... + + + 1), 2), 3), ... + + + 1., 2., 3., ... + + + 1, 2, 3, ... + + + (i), (ii), (iii), ... + + + (I), (II), (III), ... + + + i), ii), iii), ... + + + I), II), III), ... + + + i., ii., iii., ... + + + I., II., III., ... + + + Dbl-byte circle numbers + + + Wingdings black circle numbers + + + Wingdings white circle numbers + + + Specified a list of text alignment types + + + Align text to the left margin. + + + Align text in the center. + + + Align text to the right margin. + + + Align text so that it is justified across the whole line. It + is smart in the sense that it will not justify sentences + which are short + + + Specifies a list of auto-fit types. +

    + Autofit specifies that a shape should be auto-fit to fully contain the text described within it. + Auto-fitting is when text within a shape is scaled in order to contain all the text inside +

    +
    + + Specifies that text within the text body should not be auto-fit to the bounding box. + Auto-fitting is when text within a text box is scaled in order to remain inside + the text box. + + + Specifies that text within the text body should be normally auto-fit to the bounding box. + Autofitting is when text within a text box is scaled in order to remain inside the text box. + +

    + Example: Consider the situation where a user is building a diagram and needs + to have the text for each shape that they are using stay within the bounds of the shape. + An easy way this might be done is by using NORMAL autofit +

    +
    + + Specifies that a shape should be auto-fit to fully contain the text described within it. + Auto-fitting is when text within a shape is scaled in order to contain all the text inside. + +

    + Example: Consider the situation where a user is building a diagram and needs to have + the text for each shape that they are using stay within the bounds of the shape. + An easy way this might be done is by using SHAPE autofit +

    +
    + + Text Capitalization that is to be applied to the text Run. This is a render-only + modification and does not affect the actual characters stored in the text Run. + + + Vertical Text Types + + + Horizontal text. This should be default. + + + Vertical orientation. + (each line is 90 degrees rotated clockwise, so it goes + from top to bottom; each next line is to the left from + the previous one). + + + Vertical orientation. + (each line is 270 degrees rotated clockwise, so it goes + from bottom to top; each next line is to the right from + the previous one). + + + Determines if all of the text is vertical + ("one letter on top of another"). + + + Specified a list of text font alignment types + + + Automatic alignment + + + Align text to the top. + + + Align text in the center. + + + Align text to the baseline. + + + Align text to the bottom. + + + Text Horizontal Overflow + + + When a big character does not fit into a line, allow a + horizontal overflow. + + + When a big character does not fit into a line, clip it at + the proper horizontal overflow. + + + Text Vertical Overflow + + + Overflow the text and pay no attention to top and bottom barriers. + + + Pay attention to top and bottom barriers. Use an + ellipsis to denote that there is text which is not visible. + + + Pay attention to top and bottom barriers. Provide no + indication that there is text which is not visible. + + + An anchor is what specifics the position of a shape within a client object + or within another containing shape. + + @author Yegor Kozlov + + + Represents autofiltering for the specified worksheet. + + @author Yegor Kozlov + + + @author Yegor Kozlov + + + High level representation of a cell in a row of a spreadsheet. +

    + Cells can be numeric, formula-based or string-based (text). The cell type + specifies this. String cells cannot conatin numbers and numeric cells cannot + contain strings (at least according to our model). Client apps should do the + conversions themselves. Formula cells have the formula string, as well as + the formula result, which can be numeric or string. +

    +

    + Cells should have their number (0 based) before being Added to a row. Only + cells that have values should be Added. +

    +
    + + the xml bean Containing information about the cell's location, value, + data type, formatting, and formula + + + the XSSFRow this cell belongs to + + + 0-based column index + + + Table of strings shared across this workbook. + If two cells contain the same string, then the cell value is the same index into SharedStringsTable + + + Table of cell styles shared across all cells in a workbook. + + + Construct a XSSFCell. + + @param row the parent row. + @param cell the xml bean Containing information about the cell. + + + + Copy cell value, formula and style, from srcCell per cell copy policy + If srcCell is null, clears the cell value and cell style per cell copy policy + + This does not shift references in formulas. Use {@link XSSFRowShifter} to shift references in formulas. + + The cell to take value, formula and style from + The policy for copying the information, see {@link CellCopyPolicy} + if copy cell style and srcCell is from a different workbook + + + @return table of strings shared across this workbook + + + @return table of cell styles shared across this workbook + + + Returns the sheet this cell belongs to + + @return the sheet this cell belongs to + + + Returns the row this cell belongs to + + @return the row this cell belongs to + + + Get the value of the cell as a bool. +

    + For strings, numbers, and errors, we throw an exception. For blank cells we return a false. +

    + @return the value of the cell as a bool + @throws InvalidOperationException if the cell type returned by {@link #CellType} + is not CellType.Boolean, CellType.Blank or CellType.Formula +
    + + Set a bool value for the cell + + @param value the bool value to Set this cell to. For formulas we'll Set the + precalculated value, for bools we'll Set its value. For other types we + will change the cell to a bool cell and Set its value. + + + Get the value of the cell as a number. +

    + For strings we throw an exception. For blank cells we return a 0. + For formulas or error cells we return the precalculated value; +

    + @return the value of the cell as a number + @throws InvalidOperationException if the cell type returned by {@link #CellType} is CellType.String + @exception NumberFormatException if the cell value isn't a parsable double. + @see DataFormatter for turning this number into a string similar to that which Excel would render this number as. +
    + + Set a numeric value for the cell + + @param value the numeric value to Set this cell to. For formulas we'll Set the + precalculated value, for numerics we'll Set its value. For other types we + will change the cell to a numeric cell and Set its value. + + + Get the value of the cell as a string +

    + For numeric cells we throw an exception. For blank cells we return an empty string. + For formulaCells that are not string Formulas, we throw an exception +

    + @return the value of the cell as a string +
    + + Get the value of the cell as a XSSFRichTextString +

    + For numeric cells we throw an exception. For blank cells we return an empty string. + For formula cells we return the pre-calculated value if a string, otherwise an exception +

    + @return the value of the cell as a XSSFRichTextString +
    + + Set a string value for the cell. + + @param str value to Set the cell to. For formulas we'll Set the formula + cached string result, for String cells we'll Set its value. For other types we will + change the cell to a string cell and Set its value. + If value is null then we will change the cell to a Blank cell. + + + Set a string value for the cell. + + @param str value to Set the cell to. For formulas we'll Set the 'pre-Evaluated result string, + for String cells we'll Set its value. For other types we will + change the cell to a string cell and Set its value. + If value is null then we will change the cell to a Blank cell. + + + + Return a formula for the cell, for example, SUM(C4:E4) + + + + package/hierarchy use only - reuse an existing evaluation workbook if available for caching + + @param fpb evaluation workbook for reuse, if available, or null to create a new one as needed + @return a formula for the cell + @throws InvalidOperationException if the cell type returned by {@link #getCellType()} is not CELL_TYPE_FORMULA + + + + Creates a non shared formula from the shared formula counterpart + + Shared Group Index + + non shared formula created for the given shared formula and this cell + + + Sets formula for this cell. +

    + Note, this method only Sets the formula string and does not calculate the formula value. + To Set the precalculated value use {@link #setCellValue(double)} or {@link #setCellValue(String)} +

    + + @param formula the formula to Set, e.g. "SUM(C4:E4)". + If the argument is null then the current formula is Removed. + @throws NPOI.ss.formula.FormulaParseException if the formula has incorrect syntax or is otherwise invalid + @throws InvalidOperationException if the operation is not allowed, for example, + when the cell is a part of a multi-cell array formula +
    + + + Returns zero-based column index of this cell + + + + + Returns zero-based row index of a row in the sheet that contains this cell + + + + + Returns an A1 style reference to the location of this cell + + A1 style reference to the location of this cell + + + + Return the cell's style. + + + + + Return the cell type. + + + + + Only valid for formula cells + + + + + Detect cell type based on the "t" attribute of the CT_Cell bean + + + + + + + Get the value of the cell as a date. + + + + + Set a date value for the cell. Excel treats dates as numeric so you will need to format the cell as a date. + + the date value to Set this cell to. For formulas we'll set the precalculated value, + for numerics we'll Set its value. For other types we will change the cell to a numeric cell and Set its value. + + + + Returns the error message, such as #VALUE! + + + + + Get the value of the cell as an error code. + For strings, numbers, and bools, we throw an exception. + For blank cells we return a 0. + + + + + Set a error value for the cell + + the error value to Set this cell to. + For formulas we'll Set the precalculated value , for errors we'll set + its value. For other types we will change the cell to an error cell and Set its value. + + + + + Sets this cell as the active cell for the worksheet. + + + + + Blanks this cell. Blank cells have no formula or value but may have styling. + This method erases all the data previously associated with this cell. + + + + + Sets column index of this cell + + + + + + Set the cells type (numeric, formula or string) + + + + + + Returns a string representation of the cell + + Formula cells return the formula string, rather than the formula result. + Dates are displayed in dd-MMM-yyyy format + Errors are displayed as #ERR<errIdx> + + + + Returns the raw, underlying ooxml value for the cell +

    + If the cell Contains a string, then this value is an index into + the shared string table, pointing to the actual string value. Otherwise, + the value of the cell is expressed directly in this element. Cells Containing formulas express + the last calculated result of the formula in this element. +

    + + @return the raw cell value as Contained in the underlying CT_Cell bean, + null for blank cells. +
    + + + Used to help format error messages + + + + + + Used to help format error messages + + + @throws RuntimeException if the bounds are exceeded. + + + + Returns cell comment associated with this cell + + + + + Removes the comment for this cell, if there is one. + + + + + Get or set hyperlink associated with this cell + If the supplied hyperlink is null on setting, the hyperlink for this cell will be removed. + + + + Removes the hyperlink for this cell, if there is one. + + + Returns the xml bean containing information about the cell's location (reference), value, + data type, formatting, and formula + + @return the xml bean containing information about this cell + + + Chooses a new bool value for the cell when its type is changing.

    + + Usually the caller is calling SetCellType() with the intention of calling + SetCellValue(bool) straight afterwards. This method only exists to give + the cell a somewhat reasonable value until the SetCellValue() call (if at all). + TODO - perhaps a method like SetCellTypeAndValue(int, Object) should be introduced to avoid this + + + The purpose of this method is to validate the cell state prior to modification + + @see #NotifyArrayFormulaChanging() + + +

    + Called when this cell is modified.The purpose of this method is to validate the cell state prior to modification. + + if modification is not allowed +
    + + + High level representation of the the possible formatting information for the contents of the cells on a sheet in a + SpreadsheetML document. + + @see NPOI.xssf.usermodel.XSSFWorkbook#CreateCellStyle() + @see NPOI.xssf.usermodel.XSSFWorkbook#getCellStyleAt(short) + @see NPOI.xssf.usermodel.XSSFCell#setCellStyle(NPOI.ss.usermodel.CellStyle) + + + Creates a Cell Style from the supplied parts + @param cellXfId The main XF for the cell. Must be a valid 0-based index into the XF table + @param cellStyleXfId Optional, style xf. A value of -1 means no xf. + @param stylesSource Styles Source to work off + + + Used so that StylesSource can figure out our location + + + Used so that StylesSource can figure out our location + + + + Creates an empty Cell Style + + + + + Verifies that this style belongs to the supplied Workbook + Styles Source. + Will throw an exception if it belongs to a different one. + This is normally called when trying to assign a style to a + cell, to ensure the cell and the style are from the same + workbook (if they're not, it won't work) + @throws ArgumentException if there's a workbook mis-match + + + Clones all the style information from another + XSSFCellStyle, onto this one. This + XSSFCellStyle will then have all the same + properties as the source, but the two may + be edited independently. + Any stylings on this XSSFCellStyle will be lost! + + The source XSSFCellStyle could be from another + XSSFWorkbook if you like. This allows you to + copy styles from one XSSFWorkbook to another. + + + + Get the type of horizontal alignment for the cell + + the type of alignment + + + + Get or set the type of border to use for the bottom border of the cell + + + + + Get or set the type of border to use for the left border of the cell + + + + + Get or set the type of border to use for the right border of the cell + + + + + Get or set the type of border to use for the top border of the cell + + + + Get the color to use for the bottom border + Color is optional. When missing, IndexedColors.Automatic is implied. + @return the index of the color defInition, default value is {@link NPOI.ss.usermodel.IndexedColors#AUTOMATIC} + @see NPOI.ss.usermodel.IndexedColors + + + Get the color to use for the bottom border as a {@link XSSFColor} + + @return the used color or null if not Set + + + Get the index of the number format (numFmt) record used by this cell format. + + @return the index of the number format + + + Set the index of a data format + + @param fmt the index of a data format + + + Get the contents of the format string, by looking up + the StylesSource + + @return the number format string + + + + Get the background fill color. + Note - many cells are actually filled with a foreground fill, not a background fill + + + + Get the background fill color. +

    + Note - many cells are actually Filled with a foreground + Fill, not a background fill - see {@link #getFillForegroundColor()} +

    + @see NPOI.xssf.usermodel.XSSFColor#getRgb() + @return XSSFColor - fill color or null if not Set +
    + + Get the foreground fill color. +

    + Many cells are Filled with this, instead of a + background color ({@link #getFillBackgroundColor()}) +

    + @see IndexedColors + @return fill color, default value is {@link NPOI.ss.usermodel.IndexedColors#AUTOMATIC} +
    + + + Get the foreground fill color. + + + + + Get the foreground fill color. + + + + Gets the font for this style + @return Font - font + + + Gets the index of the font for this style + + @return short - font index + @see NPOI.xssf.usermodel.XSSFWorkbook#getFontAt(short) + + + Get whether the cell's using this style are to be hidden + + @return bool - whether the cell using this style is hidden + + + Get the number of spaces to indent the text in the cell + + @return indent - number of spaces + + + Get the index within the StylesTable (sequence within the collection of CT_Xf elements) + + @return unique index number of the underlying record this style represents + + + Get the color to use for the left border + + @return the index of the color defInition, default value is {@link NPOI.ss.usermodel.IndexedColors#BLACK} + @see NPOI.ss.usermodel.IndexedColors + + + Get the color to use for the left border + + @return the index of the color defInition or null if not Set + @see NPOI.ss.usermodel.IndexedColors + + + + Get whether the cell's using this style are locked + + + + + Get the color to use for the right border + + + + + Get the color to use for the right border + + + + + + Get the degree of rotation (between 0 and 180 degrees) for the text in the cell + + Note: HSSF uses values from -90 to 90 degrees, whereas XSSF + uses values from 0 to 180 degrees.The implementations of this method will map between these two value-ranges + accordingly, however the corresponding getter is returning values in the range mandated by the current type + of Excel file-format that this CellStyle is applied to. + + + Expressed in degrees. Values range from 0 to 180. The first letter of + the text is considered the center-point of the arc. + For 0 - 90, the value represents degrees above horizon. For 91-180 the degrees below the horizon is calculated as: + [degrees below horizon] = 90 - textRotation. + + + + Get the color to use for the top border + + @return the index of the color defInition, default value is {@link NPOI.ss.usermodel.IndexedColors#BLACK} + @see NPOI.ss.usermodel.IndexedColors + + + + Get the color to use for the top border + + + + + + Get the type of vertical alignment for the cell + + + + + Get the type of vertical alignment for the cell + + + + + + Whether the text in a cell should be line-wrapped within the cell. + + + + Set the color to use for the bottom border + + @param color the color to use, null means no color + + + + * Set the foreground fill color represented as a {@link XSSFColor} value. + *
    + * Note: Ensure Foreground color is Set prior to background color. + * @param color the color to use + * @see #setFillBackgroundColor(NPOI.xssf.usermodel.XSSFColor) ) +
    + + Get a copy of the currently used CT_Fill, if none is used, return a new instance. + + + Get a copy of the currently used CT_Border, if none is used, return a new instance. + + + Set the font for this style + + @param font a font object Created or retrieved from the XSSFWorkbook object + @see NPOI.xssf.usermodel.XSSFWorkbook#CreateFont() + @see NPOI.xssf.usermodel.XSSFWorkbook#getFontAt(short) + + + Set the color to use for the left border as a {@link XSSFColor} value + + @param color the color to use + + + Set the color to use for the right border as a {@link XSSFColor} value + + @param color the color to use + + + Set the color to use for the top border as a {@link XSSFColor} value + + @param color the color to use + + + Set the type of vertical alignment for the cell + + @param align - align the type of alignment + @see NPOI.ss.usermodel.CellStyle#VERTICAL_TOP + @see NPOI.ss.usermodel.CellStyle#VERTICAL_CENTER + @see NPOI.ss.usermodel.CellStyle#VERTICAL_BOTTOM + @see NPOI.ss.usermodel.CellStyle#VERTICAL_JUSTIFY + @see NPOI.ss.usermodel.VerticalAlignment + + + Gets border color + + @param side the border side + @return the used color + + + Set the color to use for the selected border + + @param side - where to apply the color defInition + @param color - the color to use + + + Get the cellAlignment object to use for manage alignment + @return XSSFCellAlignment - cell alignment + + + Return the CT_CellAlignment instance for alignment + + @return CT_CellAlignment + + + Returns a hash code value for the object. The hash is derived from the underlying CT_Xf bean. + + @return the hash code value for this style + + + Checks is the supplied style is equal to this style + + @param o the style to check + @return true if the supplied style is equal to this style + + + Make a copy of this style. The underlying CT_Xf bean is Cloned, + the references to Fills and borders remain. + + @return a copy of this style + + + Represents a SpreadsheetML Chart + @author Nick Burch + @author Roman Kashitsyn + + + Parent graphic frame. + + + Root element of the SpreadsheetML Chart part + + + The Chart within that + + + Create a new SpreadsheetML chart + + + Construct a SpreadsheetML chart from a namespace part. + + @param part the namespace part holding the chart data, + the content type must be application/vnd.Openxmlformats-officedocument.Drawingml.chart+xml + @param rel the namespace relationship holding this chart, + the relationship type must be http://schemas.Openxmlformats.org/officeDocument/2006/relationships/chart + + + Construct a new CTChartSpace bean. + By default, it's just an empty placeholder for chart objects. + + @return a new CTChartSpace bean + + + + Return the underlying CTChartSpace bean, the root element of the SpreadsheetML Chart part. + + + + + + Return the underlying CTChart bean, within the Chart Space + + + + + + Returns the parent graphic frame. + + + + + Sets the parent graphic frame. + + + @return true if only visible cells will be present on the chart, + false otherwise + + + @param plotVisOnly a flag specifying if only visible cells should be + present on the chart + + + Returns the title, or null if none is Set + + + Sets the title text. + + + High level representation of Sheet Parts that are of type 'chartsheet'. +

    + Chart sheet is a special kind of Sheet that Contains only chart and no data. +

    + + @author Yegor Kozlov +
    + + @since POI 3.14-Beta1 + + + Provide access to the CTChartsheet bean holding this sheet's data + + @return the CTChartsheet bean holding this sheet's data + + + A client anchor is attached to an excel worksheet. It anchors against + top-left and bottom-right cells. + + @author Yegor Kozlov + + + Starting anchor point + + + Ending anchor point + + + Creates a new client anchor and defaults all the anchor positions to 0. + + + Creates a new client anchor and Sets the top-left and bottom-right + coordinates of the anchor. + + @param dx1 the x coordinate within the first cell. + @param dy1 the y coordinate within the first cell. + @param dx2 the x coordinate within the second cell. + @param dy2 the y coordinate within the second cell. + @param col1 the column (0 based) of the first cell. + @param row1 the row (0 based) of the first cell. + @param col2 the column (0 based) of the second cell. + @param row2 the row (0 based) of the second cell. + + + Create XSSFClientAnchor from existing xml beans + + @param cell1 starting anchor point + @param cell2 ending anchor point + + + Return starting anchor point + + @return starting anchor point + + + Return ending anchor point + + @return ending anchor point + + + Represents a color in SpreadsheetML + + + Create an instance of XSSFColor from the supplied XML bean + + + Create an new instance of XSSFColor + + + + A bool value indicating the ctColor is automatic and system ctColor dependent. + + + + A bool value indicating if the ctColor has a alpha or not + + + A bool value indicating if the ctColor has a tint or not + + + Indexed ctColor value. Only used for backwards compatibility. References a ctColor in indexedColors. + + + Standard Red Green Blue ctColor value (RGB). + If there was an A (Alpha) value, it will be stripped. + + + Standard Alpha Red Green Blue ctColor value (ARGB). + + + Standard Alpha Red Green Blue ctColor value (ARGB). + + + Standard Red Green Blue ctColor value (RGB) with applied tint. + Alpha values are ignored. + + + Standard Alpha Red Green Blue ctColor value (ARGB). + + + Index into the clrScheme collection, referencing a particular sysClr or + srgbClr value expressed in the Theme part. + + + Specifies the tint value applied to the ctColor. + +

    + If tint is supplied, then it is applied to the RGB value of the ctColor to determine the final + ctColor applied. +

    +

    + The tint value is stored as a double from -1.0 .. 1.0, where -1.0 means 100% darken and + 1.0 means 100% lighten. Also, 0.0 means no Change. +

    +

    + In loading the RGB value, it is Converted to HLS where HLS values are (0..HLSMAX), where + HLSMAX is currently 255. +

    + Here are some examples of how to apply tint to ctColor: +
    +
    +             If (tint < 0)
    +             Lum' = Lum * (1.0 + tint)
    +            
    +             For example: Lum = 200; tint = -0.5; Darken 50%
    +             Lum' = 200 * (0.5) => 100
    +             For example: Lum = 200; tint = -1.0; Darken 100% (make black)
    +             Lum' = 200 * (1.0-1.0) => 0
    +             If (tint > 0)
    +             Lum' = Lum * (1.0-tint) + (HLSMAX - HLSMAX * (1.0-tint))
    +             For example: Lum = 100; tint = 0.75; Lighten 75%
    +            
    +             Lum' = 100 * (1-.75) + (HLSMAX - HLSMAX*(1-.75))
    +             = 100 * .25 + (255 - 255 * .25)
    +             = 25 + (255 - 63) = 25 + 192 = 217
    +             For example: Lum = 100; tint = 1.0; Lighten 100% (make white)
    +             Lum' = 100 * (1-1) + (HLSMAX - HLSMAX*(1-1))
    +             = 100 * 0 + (255 - 255 * 0)
    +             = 0 + (255 - 0) = 255
    +             
    +
    + + @return the tint value +
    + + Returns the underlying XML bean + + @return the underlying XML bean + + + + Checked type cast color to an XSSFColor. + + the color to type cast + the type casted color + if color is null or is not an instance of XSSFColor + + + High level representation for Color Scale / Color Gradient Formatting + component of Conditional Formatting Settings + + + cached reference to the string with the comment text + + + Creates a new XSSFComment, associated with a given + low level comment object. + + + + @return Name of the original comment author. Default value is blank. + + + @return the 0-based column of the cell that the comment is associated with. + + + @return the 0-based row index of the cell that the comment is associated with. + + + @return whether the comment is visible + + + @return the rich text string of the comment + + + Sets the rich text string used by this comment. + + @param string the XSSFRichTextString used by this object. + + + @return the xml bean holding this comment's properties + + + @author Yegor Kozlov + + + @return array of CellRangeAddresss. Never null + + + Replaces an existing Conditional Formatting rule at position idx. + Excel allows to create up to 3 Conditional Formatting rules. + This method can be useful to modify existing Conditional Formatting rules. + + @param idx position of the rule. Should be between 0 and 2. + @param cfRule - Conditional Formatting rule + + + Add a Conditional Formatting rule. + Excel allows to create up to 3 Conditional Formatting rules. + + @param cfRule - Conditional Formatting rule + + + @return the Conditional Formatting rule at position idx. + + + @return number of Conditional Formatting rules. + + + @author Yegor Kozlov + + + Create a new border formatting structure if it does not exist, + otherwise just return existing object. + + @return - border formatting object, never returns null. + + + @return - border formatting object if defined, null otherwise + + + Create a new font formatting structure if it does not exist, + otherwise just return existing object. + + @return - font formatting object, never returns null. + + + @return - font formatting object if defined, null otherwise + + + Create a new pattern formatting structure if it does not exist, + otherwise just return existing object. + + @return - pattern formatting object, never returns null. + + + @return - pattern formatting object if defined, null otherwise + + + Type of conditional formatting rule. + + + The comparison function used when the type of conditional formatting is Set to + {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS} +

    + MUST be a constant from {@link NPOI.ss.usermodel.ComparisonOperator} +

    + + @return the conditional format operator +
    + + The formula used to Evaluate the first operand for the conditional formatting rule. +

    + If the condition type is {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS}, + this field is the first operand of the comparison. + If type is {@link ConditionalFormattingRule#CONDITION_TYPE_FORMULA}, this formula is used + to determine if the conditional formatting is applied. +

    +

    + If comparison type is {@link ConditionalFormattingRule#CONDITION_TYPE_FORMULA} the formula MUST be a Boolean function +

    + + @return the first formula +
    + + The formula used to Evaluate the second operand of the comparison when + comparison type is {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS} and operator + is either {@link NPOI.ss.usermodel.ComparisonOperator#BETWEEN} or {@link NPOI.ss.usermodel.ComparisonOperator#NOT_BETWEEN} + + @return the second formula + + + High level representation for Icon / Multi-State / Databar / + Colour Scale change thresholds + + + A connection shape Drawing element. A connection shape is a line, etc. + that connects two other shapes in this Drawing. + + @author Yegor Kozlov + + + Construct a new XSSFConnector object. + + @param Drawing the XSSFDrawing that owns this shape + @param ctShape the shape bean that holds all the shape properties + + + Initialize default structure of a new auto-shape + + + + Gets the shape type, one of the constants defined in {@link NPOI.ss.usermodel.ShapeTypes}. + + @return the shape type + @see NPOI.ss.usermodel.ShapeTypes + + + Creates a new XSSFRichTextString for you. + + + Creates a XSSFFormulaEvaluator, the object that Evaluates formula cells. + + @return a XSSFFormulaEvaluator instance + + + Creates a XSSFClientAnchor. Use this object to position Drawing object in + a sheet + + @return a XSSFClientAnchor instance + @see NPOI.ss.usermodel.Drawing + + + High level representation for DataBar / Data Bar Formatting + component of Conditional Formatting Settings + + + Handles data formats for XSSF. + Per Microsoft Excel 2007+ format limitations: + Workbooks support between 200 and 250 "number formats" + (POI calls them "data formats") So short or even byte + would be acceptable data types to use for referring to + data format indices. + https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3 + + + + Get the format index that matches the given format + string, creating a new format entry if required. + Aliases text to the proper format as required. + + @param format string matching a built in format + @return index of format. + + + Get the format string that matches the given format index + @param index of a format + @return string represented at index of format or null if there is not a format at that index + + + get the format string that matches the given format index + @param index of a format + @return string represented at index of format or null if there is not a format at that index + + + Add a number format with a specific ID into the number format style table. + If a format with the same ID already exists, overwrite the format code + with fmt + This may be used to override built-in number formats. + + @param index the number format ID + @param format the number format code + + + @author Radhakrishnan J + + + + @author Radhakrishnan J + + + + Excel validation constraints with static lists are delimited with optional whitespace and the Windows List Separator, + which is typically comma, but can be changed by users. POI will just assume comma. + + + + This is the constructor called using the OOXML raw data. Excel overloads formula1 to also encode explicit value lists, + so this constructor has to check for and parse that syntax. + + + + Overloaded: formula1 or list of explicit values + formula1 is a list of explicit values, this is ignored: use null + + + @author Radhakrishnan J + + + + Represents a SpreadsheetML Drawing + + @author Yegor Kozlov + + + Root element of the SpreadsheetML Drawing part + + + Create a new SpreadsheetML Drawing + + @see NPOI.xssf.usermodel.XSSFSheet#CreateDrawingPatriarch() + + + Construct a SpreadsheetML Drawing from a namespace part + + @param part the namespace part holding the Drawing data, + the content type must be application/vnd.openxmlformats-officedocument.Drawing+xml + @param rel the namespace relationship holding this Drawing, + the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing + + + Construct a new CT_Drawing bean. By default, it's just an empty placeholder for Drawing objects + + @return a new CT_Drawing bean + + + Return the underlying CT_Drawing bean, the root element of the SpreadsheetML Drawing part. + + @return the underlying CT_Drawing bean + + + Constructs a textbox under the Drawing. + + @param anchor the client anchor describes how this group is attached + to the sheet. + @return the newly Created textbox. + + + Creates a picture. + + @param anchor the client anchor describes how this picture is attached to the sheet. + @param pictureIndex the index of the picture in the workbook collection of pictures, + {@link NPOI.xssf.usermodel.XSSFWorkbook#getAllPictures()} . + + @return the newly Created picture shape. + + + + Creates a chart. + + the client anchor describes how this chart is attached to + the newly created chart + + + Add the indexed picture to this Drawing relations + + @param pictureIndex the index of the picture in the workbook collection of pictures, + {@link NPOI.xssf.usermodel.XSSFWorkbook#getAllPictures()} . + + + Creates a simple shape. This includes such shapes as lines, rectangles, + and ovals. + + @param anchor the client anchor describes how this group is attached + to the sheet. + @return the newly Created shape. + + + Creates a simple shape. This includes such shapes as lines, rectangles, + and ovals. + + @param anchor the client anchor describes how this group is attached + to the sheet. + @return the newly Created shape. + + + Creates a simple shape. This includes such shapes as lines, rectangles, + and ovals. + + @param anchor the client anchor describes how this group is attached + to the sheet. + @return the newly Created shape. + + + Creates a comment. + @param anchor the client anchor describes how this comment is attached + to the sheet. + @return the newly Created comment. + + + Creates a new graphic frame. + + @param anchor the client anchor describes how this frame is attached + to the sheet + @return the newly Created graphic frame + + + Returns all charts in this Drawing. + + + Create and Initialize a CT_TwoCellAnchor that anchors a shape against top-left and bottom-right cells. + + @return a new CT_TwoCellAnchor + + + + @return list of shapes in this drawing + + + XSSF wrapper for a cell under Evaluation + + @author Josh Micich + + + XSSF wrapper for a sheet under Evaluation + + @author Josh Micich + + + Internal POI use only + + @author Josh Micich + + + + Even page footer value. Corresponds to even printed pages. + Even page(s) in the sheet may not be printed, for example, if the print area is specified to be + a range such that it falls outside an even page's scope. + If no even footer is specified, then the odd footer's value is assumed for even page footers. + + + + Create an instance of XSSFEvenFooter from the supplied XML bean + @see XSSFSheet#GetEvenFooter() + @param headerFooter + + + Get the content text representing the footer + @return text + + +

    + Even page header value. Corresponds to even printed pages. + Even page(s) in the sheet may not be printed, for example, if the print area is specified to be + a range such that it falls outside an even page's scope. + If no even header is specified, then odd header value is assumed for even page headers. +

    + +
    + + Create an instance of XSSFEvenHeader from the supplied XML bean + @see XSSFSheet#GetEvenHeader() + @param headerFooter + + + Get the content text representing this header + @return text + + + Instantiates sub-classes of POIXMLDocumentPart depending on their relationship type + + @author Yegor Kozlov + + + @since POI 3.14-Beta1 + + + @since POI 3.14-Beta1 + + + + First page footer content. Corresponds to first printed page. + The first logical page in the sheet may not be printed, for example, if the print area is specified to + be a range such that it falls outside the first page's scope. + + + + Create an instance of XSSFFirstFooter from the supplied XML bean + @see XSSFSheet#getFirstFooter() + @param headerFooter + + + Get the content text representing the footer + @return text + + + + First page header content. Corresponds to first printed page. + The first logical page in the sheet may not be printed, for example, if the print area is specified to + be a range such that it falls outside the first page's scope. + + + + Create an instance of XSSFFirstHeader from the supplied XML bean + @see XSSFSheet#getFirstHeader() + @param headerFooter + + + Get the content text representing this header + @return text + + + Represents a font used in a workbook. + + @author Gisella Bronzetti + + + By default, Microsoft Office Excel 2007 uses the Calibry font in font size 11 + + + By default, Microsoft Office Excel 2007 uses the Calibry font in font size 11 + + + Default font color is black + @see NPOI.SS.usermodel.IndexedColors#BLACK + + + Create a new XSSFFont + + @param font the underlying CT_Font bean + + + Create a new XSSFont. This method is protected to be used only by XSSFWorkbook + + + get the underlying CT_Font font + + + get a bool value for the boldness to use. + + @return bool - bold + + + get character-set to use. + + @return int - character-set (0-255) + @see NPOI.SS.usermodel.FontCharset + + + get the indexed color value for the font + References a color defined in IndexedColors. + + @return short - indexed color to use + @see IndexedColors + + + get the color value for the font + References a color defined as Standard Alpha Red Green Blue color value (ARGB). + + @return XSSFColor - rgb color to use + + + get the color value for the font + References a color defined in theme. + + @return short - theme defined to use + + + + Get the font height in unit's of 1/20th of a point. + + + + + Get the font height in points. + + + + get the name of the font (i.e. Arial) + + @return String - a string representing the name of the font to use + + + get a bool value that specify whether to use italics or not + + @return bool - value for italic + + + get a bool value that specify whether to use a strikeout horizontal line through the text or not + + @return bool - value for strikeout + + + get normal,super or subscript. + + @return short - offset type to use (none,super,sub) + @see Font#SS_NONE + @see Font#SS_SUPER + @see Font#SS_SUB + + + get type of text underlining to use + + @return byte - underlining type + @see NPOI.SS.usermodel.FontUnderline + + + get the boldness to use + @return boldweight + @see #BOLDWEIGHT_NORMAL + @see #BOLDWEIGHT_BOLD + + + set character-set to use. + + @param charset - charset + @see FontCharset + + + set character-set to use. + + @param charset - charset + @see FontCharset + + + set character-set to use. + + @param charSet + + + set the color for the font in Standard Alpha Red Green Blue color value + + @param color - color to use + + + set the theme color for the font to use + + @param theme - theme color to use + + + set an enumeration representing the style of underlining that is used. + The none style is equivalent to not using underlining at all. + The possible values for this attribute are defined by the FontUnderline + + @param underline - FontUnderline enum value + + + ** + + + Records the Themes Table that is associated with + the current font, used when looking up theme + based colours and properties. + + + get the font scheme property. + is used only in StylesTable to create the default instance of font + + @return FontScheme + @see NPOI.XSSF.model.StylesTable#CreateDefaultFont() + + + set font scheme property + + @param scheme - FontScheme enum value + @see FontScheme + + + get the font family to use. + + @return the font family to use + @see NPOI.SS.usermodel.FontFamily + + + set an enumeration representing the font family this font belongs to. + A font family is a set of fonts having common stroke width and serif characteristics. + + @param family font family + @link #SetFamily(int value) + + + get the index within the XSSFWorkbook (sequence within the collection of Font objects) + @return unique index number of the underlying record this Font represents (probably you don't care + unless you're comparing which one is which) + + + @author Yegor Kozlov + + + Get the type of super or subscript for the font + + @return super or subscript option + @see #SS_NONE + @see #SS_SUPER + @see #SS_SUB + + + @return font color index + + + Gets the height of the font in 1/20th point units + + @return fontheight (in points/20); or -1 if not modified + + + Get the type of underlining for the font + + @return font underlining type + + @see #U_NONE + @see #U_SINGLE + @see #U_DOUBLE + @see #U_SINGLE_ACCOUNTING + @see #U_DOUBLE_ACCOUNTING + + + Get whether the font weight is Set to bold or not + + @return bold - whether the font is bold or not + + + @return true if font style was Set to italic + + + Set font style options. + + @param italic - if true, Set posture style to italic, otherwise to normal + @param bold if true, Set font weight to bold, otherwise to normal + + + Set font style options to default values (non-italic, non-bold) + + + Evaluates formula cells.

    + + For performance reasons, this class keeps a cache of all previously calculated intermediate + cell values. Be sure to call {@link #ClearAllCachedResultValues()} if any workbook cells are Changed between + calls to Evaluate~ methods on this class. + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + @author Josh Micich + + + @param stabilityClassifier used to optimise caching performance. Pass null + for the (conservative) assumption that any cell may have its defInition Changed After + Evaluation begins. + @param udfFinder pass null for default (AnalysisToolPak only) + + + Loops over all cells in all sheets of the supplied + workbook. + For cells that contain formulas, their formulas are + Evaluated, and the results are saved. These cells + remain as formula cells. + For cells that do not contain formulas, no Changes + are made. + This is a helpful wrapper around looping over all + cells, and calling EvaluateFormulaCell on each one. + + + Loops over all cells in all sheets of the supplied + workbook. + For cells that contain formulas, their formulas are + Evaluated, and the results are saved. These cells + remain as formula cells. + For cells that do not contain formulas, no Changes + are made. + This is a helpful wrapper around looping over all + cells, and calling EvaluateFormulaCell on each one. + + + Turns a XSSFCell into a XSSFEvaluationCell + + + Represents DrawingML GraphicalObjectFrame. + + @author Roman Kashitsyn + + + Construct a new XSSFGraphicFrame object. + + @param Drawing the XSSFDrawing that owns this frame + @param ctGraphicFrame the XML bean that stores this frame content + + + Initialize default structure of a new graphic frame + + + Sets the frame macro. + + + Returns the frame name. + @return name of the frame + + + Returns the frame anchor. + @return the anchor this frame is attached to + + + Assign a DrawingML chart to the graphic frame. + + + Gets the frame id. + + + + High level representation for Icon / Multi-State Formatting + component of Conditional Formatting Settings + + + Always . You cannot change text of a line break. + + + This class : the Map element (Open Office XML Part 4: + chapter 3.16.2) + + This element Contains all of the properties related to the XML map, + and the behaviors expected during data refresh operations. + + @author Roberto Manicardi + + + @return the list of Single Xml Cells that provide a map rule to this mapping. + + + @return the list of all Tables that provide a map rule to this mapping + + + Represents a defined named range in a SpreadsheetML workbook. +

    + Defined names are descriptive text that is used to represents a cell, range of cells, formula, or constant value. + Use easy-to-understand names, such as Products, to refer to hard to understand ranges, such as Sales!C20:C30. +

    + Example: +
    + XSSFWorkbook wb = new XSSFWorkbook(); + XSSFSheet sh = wb.CreateSheet("Sheet1"); + + //applies to the entire workbook + XSSFName name1 = wb.CreateName(); + name1.SetNameName("FMLA"); + name1.SetRefersToFormula("Sheet1!$B$3"); + + //applies to Sheet1 + XSSFName name2 = wb.CreateName(); + name2.SetNameName("SheetLevelName"); + name2.SetComment("This name is scoped to Sheet1"); + name2.SetLocalSheetId(0); + name2.SetRefersToFormula("Sheet1!$B$3"); + +
    + + @author Nick Burch + @author Yegor Kozlov +
    + + A built-in defined name that specifies the workbook's print area + + + A built-in defined name that specifies the row(s) or column(s) to repeat + at the top of each printed page. + + + A built-in defined name that refers to a range Containing the criteria values + to be used in Applying an advanced filter to a range of data + + + this defined name refers to the range Containing the filtered + output values resulting from Applying an advanced filter criteria to a source + range + + + ?an be one of the following + 1 this defined name refers to a range to which an advanced filter has been + applied. This represents the source data range, unfiltered. + 2 This defined name refers to a range to which an AutoFilter has been + applied + + + A built-in defined name that refers to a consolidation area + + + A built-in defined name that specified that the range specified is from a database data source + + + A built-in defined name that refers to a sheet title. + + + Creates an XSSFName object - called internally by XSSFWorkbook. + + @param name - the xml bean that holds data represenring this defined name. + @param workbook - the workbook object associated with the name + @see NPOI.XSSF.usermodel.XSSFWorkbook#CreateName() + + + Returns the underlying named range object + + + Returns the name that will appear in the user interface for the defined name. + + @return text name of this defined name + + + Returns the sheet index this name applies to. + + @return the sheet index this name applies to, -1 if this name applies to the entire workbook + + + Indicates that the defined name refers to a user-defined function. + This attribute is used when there is an Add-in or other code project associated with the file. + + @return true indicates the name refers to a function. + + + Returns the function group index if the defined name refers to a function. The function + group defines the general category for the function. This attribute is used when there is + an Add-in or other code project associated with the file. + + @return the function group index that defines the general category for the function + + + Get the sheets name which this named range is referenced to + + @return sheet name, which this named range referred to. + Empty string if the referenced sheet name weas not found. + + + Is the name refers to a user-defined function ? + + @return true if this name refers to a user-defined function + + + Returns the comment the user provided when the name was Created. + + @return the user comment for this named range + + + Compares this name to the specified object. + The result is true if the argument is XSSFName and the + underlying CTDefinedName bean Equals to the CTDefinedName representing this name + + @param o the object to compare this XSSFName against. + @return true if the XSSFName are Equal; + false otherwise. + + + XSSF Implementation of a Hyperlink. + Note - unlike with HSSF, many kinds of hyperlink + are largely stored as relations of the sheet + + + Create a new XSSFHyperlink. This method is protected to be used only by XSSFCreationHelper + + @param type - the type of hyperlink to create + + + Create a XSSFHyperlink amd Initialize it from the supplied CTHyperlink bean and namespace relationship + + @param ctHyperlink the xml bean Containing xml properties + @param hyperlinkRel the relationship in the underlying OPC namespace which stores the actual link's Address + + + Create a new XSSFHyperlink. This method is for Internal use only. + XSSFHyperlinks can be created by XSSFCreationHelper. + + @param type - the type of hyperlink to create, see {@link Hyperlink} + + + @return the underlying CTHyperlink object + + + Do we need to a relation too, to represent + this hyperlink? + + + Generates the relation if required + + + Return the type of this hyperlink + + @return the type of this hyperlink + + + Get the reference of the cell this applies to, + es A55 + + + Hyperlink Address. Depending on the hyperlink type it can be URL, e-mail, path to a file + + @return the Address of this hyperlink + + + Return text label for this hyperlink + + @return text to display + + + Location within target. If target is a workbook (or this workbook) this shall refer to a + sheet and cell or a defined name. Can also be an HTML anchor if target is HTML file. + + @return location + + + Assigns this hyperlink to the given cell reference + + + Return the column of the first cell that Contains the hyperlink + + @return the 0-based column of the first cell that Contains the hyperlink + + + Return the column of the last cell that Contains the hyperlink + For XSSF, a Hyperlink may only reference one cell + + @return the 0-based column of the last cell that Contains the hyperlink + + + Return the row of the first cell that Contains the hyperlink + + @return the 0-based row of the cell that Contains the hyperlink + + + Return the row of the last cell that Contains the hyperlink + For XSSF, a Hyperlink may only reference one cell + + @return the 0-based row of the last cell that Contains the hyperlink + + + + get or set additional text to help the user understand more about the hyperlink + + + + Odd page footer value. Corresponds to odd printed pages. + Odd page(s) in the sheet may not be printed, for example, if the print area is specified to be + a range such that it falls outside an odd page's scope. + + + + Create an instance of XSSFOddFooter from the supplied XML bean + @see XSSFSheet#GetOddFooter() + @param headerFooter + + + Get the content text representing the footer + @return text + + + Odd page header value. Corresponds to odd printed pages. + Odd page(s) in the sheet may not be printed, for example, if the print area is specified to be + a range such that it falls outside an odd page's scope. + + + + Create an instance of XSSFOddHeader from the supplied XML bean + @see XSSFSheet#GetOddHeader() + @param headerFooter + + + Get the content text representing this header + @return text + + + @author Yegor Kozlov + + + Represents a picture shape in a SpreadsheetML Drawing. + + @author Yegor Kozlov + + + A default instance of CTShape used for creating new shapes. + + + This object specifies a picture object and all its properties + + + Construct a new XSSFPicture object. This constructor is called from + {@link XSSFDrawing#CreatePicture(XSSFClientAnchor, int)} + + @param Drawing the XSSFDrawing that owns this picture + + + Returns a prototype that is used to construct new shapes + + @return a prototype that is used to construct new shapes + + + Link this shape with the picture data + + @param rel relationship referring the picture data + + + Return the underlying CT_Picture bean that holds all properties for this picture + + @return the underlying CT_Picture bean + + + Reset the image to the original size. + +

    + Please note, that this method works correctly only for workbooks + with the default font size (Calibri 11pt for .xlsx). + If the default font is Changed the resized image can be streched vertically or horizontally. +

    +
    + + Resize the image proportionally. + + @see #resize(double, double) + + + Resize the image relatively to its current size. +

    + Please note, that this method works correctly only for workbooks + with the default font size (Calibri 11pt for .xlsx). + If the default font is changed the resized image can be streched vertically or horizontally. +

    +

    + resize(1.0,1.0) keeps the original size,
    + resize(0.5,0.5) resize to 50% of the original,
    + resize(2.0,2.0) resizes to 200% of the original.
    + resize({@link Double#MAX_VALUE},{@link Double#MAX_VALUE}) resizes to the dimension of the embedded image. +

    + + @param scaleX the amount by which the image width is multiplied relative to the original width, + when set to {@link java.lang.Double#MAX_VALUE} the width of the embedded image is used + @param scaleY the amount by which the image height is multiplied relative to the original height, + when set to {@link java.lang.Double#MAX_VALUE} the height of the embedded image is used +
    + + Calculate the preferred size for this picture. + + @return XSSFClientAnchor with the preferred size for this image + + + Calculate the preferred size for this picture. + + @param scale the amount by which image dimensions are multiplied relative to the original size. + @return XSSFClientAnchor with the preferred size for this image + + + Calculate the preferred size for this picture. + + @param scaleX the amount by which image width is multiplied relative to the original width. + @param scaleY the amount by which image height is multiplied relative to the original height. + @return XSSFClientAnchor with the preferred size for this image + + + Return the dimension of this image + + @param part the namespace part holding raw picture data + @param type type of the picture: {@link Workbook#PICTURE_TYPE_JPEG}, + {@link Workbook#PICTURE_TYPE_PNG} or {@link Workbook#PICTURE_TYPE_DIB} + + @return image dimension in pixels + + + Return the dimension of the embedded image in pixel + + @return image dimension in pixels + + + @return the anchor that is used by this shape. + + + @return the sheet which contains the picture shape + + + Raw picture data, normally attached to a SpreadsheetML Drawing. + As a rule, pictures are stored in the /xl/media/ part of a SpreadsheetML package. + + + Relationships for each known picture type + + + Create a new XSSFPictureData node + + @see NPOI.xssf.usermodel.XSSFWorkbook#AddPicture(byte[], int) + + + Construct XSSFPictureData from a namespace part + + @param part the namespace part holding the Drawing data, + @param rel the namespace relationship holding this Drawing, + the relationship type must be http://schemas.Openxmlformats.org/officeDocument/2006/relationships/image + + + Suggests a file extension for this image. + + @return the file extension. + + + Return an integer constant that specifies type of this picture + + @return an integer constant that specifies type of this picture + @see NPOI.ss.usermodel.Workbook#PICTURE_TYPE_EMF + @see NPOI.ss.usermodel.Workbook#PICTURE_TYPE_WMF + @see NPOI.ss.usermodel.Workbook#PICTURE_TYPE_PICT + @see NPOI.ss.usermodel.Workbook#PICTURE_TYPE_JPEG + @see NPOI.ss.usermodel.Workbook#PICTURE_TYPE_PNG + @see NPOI.ss.usermodel.Workbook#PICTURE_TYPE_DIB + + + + Gets the picture data as a byte array. + + + + *PictureData objects store the actual content in the part directly without keeping a + copy like all others therefore we need to handle them differently. + + + Creates n XSSFPivotCache representing the given package part and relationship. + Should only be called when Reading in an existing file. + + @param part - The package part that holds xml data representing this pivot cache defInition. + @param rel - the relationship of the given package part in the underlying OPC package + + + Creates an XSSFPivotCacheDefintion representing the given package part and relationship. + Should only be called when Reading in an existing file. + + @param part - The package part that holds xml data representing this pivot cache defInition. + @param rel - the relationship of the given package part in the underlying OPC package + + + Find the 2D base data area for the pivot table, either from its direct reference or named table/range. + @return AreaReference representing the current area defined by the pivot table + @ if the ref1 attribute is not contiguous or the name attribute is not found. + + + Generates a cache field for each column in the reference area for the pivot table. + @param sheet The sheet where the data i collected from + + + Creates an XSSFPivotCacheRecords representing the given package part and relationship. + Should only be called when Reading in an existing file. + + @param part - The package part that holds xml data representing this pivot cache records. + @param rel - the relationship of the given package part in the underlying OPC package + + + Creates an XSSFPivotTable representing the given package part and relationship. + Should only be called when Reading in an existing file. + + @param part - The package part that holds xml data representing this pivot table. + @param rel - the relationship of the given package part in the underlying OPC package + + + Set default values for the table defInition. + + + Verify column index (relative to first column in1 pivot area) is within the + pivot area + + @param columnIndex + @ + + + Add a row label using data from the given column. + @param columnIndex the index of the column to be used as row label. + + + Add a column label using data from the given column and specified function + @param columnIndex the index of the column to be used as column label. + @param function the function to be used on the data + The following functions exists: + Sum, Count, Average, Max, Min, Product, Count numbers, StdDev, StdDevp, Var, Varp + @param valueFieldName the name of pivot table value field + + + Add a column label using data from the given column and specified function + @param columnIndex the index of the column to be used as column label. + @param function the function to be used on the data + The following functions exists: + Sum, Count, Average, Max, Min, Product, Count numbers, StdDev, StdDevp, Var, Varp + + + Add data field with data from the given column and specified function. + @param function the function to be used on the data + The following functions exists: + Sum, Count, Average, Max, Min, Product, Count numbers, StdDev, StdDevp, Var, Varp + @param columnIndex the index of the column to be used as column label. + @param valueFieldName the name of pivot table value field + + + Add column Containing data from the referenced area. + @param columnIndex the index of the column Containing the data + @param isDataField true if the data should be displayed in the pivot table. + + + Add filter for the column with the corresponding index and cell value + @param columnIndex index of column to filter on + + + Creates cacheSource and workSheetSource for pivot table and sets the source reference as well assets the location of the pivot table + @param sourceRef Source for data for pivot table - mutually exclusive with sourceName + @param sourceName Source for data for pivot table - mutually exclusive with sourceRef + @param position Position for pivot table in sheet + @param sourceSheet Sheet where the source will be collected from + + + Configure the name or area reference for the pivot table + @param wsSource CTWorksheetSource that needs the pivot source reference assignment + + + Page Setup and page margins Settings for the worksheet. + + + Set the paper size as enum value. + + @param size value for the paper size. + + + Orientation of the page: landscape - portrait. + + @return Orientation of the page + @see PrintOrientation + + + Get print page order. + + @return PageOrder + + + Returns the paper size. + + @return short - paper size + + + Returns the paper size as enum. + + @return PaperSize paper size + @see PaperSize + + + Returns the scale. + + @return short - scale + + + Set the page numbering start. + Page number for first printed page. If no value is specified, then 'automatic' is assumed. + + @return page number for first printed page + + + Returns the number of pages wide to fit sheet in. + + @return number of pages wide to fit sheet in + + + Returns the number of pages high to fit the sheet in. + + @return number of pages high to fit the sheet in + + + Returns the left to right print order. + + @return left to right print order + + + Returns the landscape mode. + + @return landscape mode + + + Use the printer's defaults Settings for page Setup values and don't use the default values + specified in the schema. For example, if dpi is not present or specified in the XML, the + application shall not assume 600dpi as specified in the schema as a default and instead + shall let the printer specify the default dpi. + + @return valid Settings + + + Returns the black and white Setting. + + @return black and white Setting + + + Returns the draft mode. + + @return draft mode + + + Returns the print notes. + + @return print notes + + + Returns the no orientation. + + @return no orientation + + + Returns the use page numbers. + + @return use page numbers + + + Returns the horizontal resolution. + + @return horizontal resolution + + + Returns the vertical resolution. + + @return vertical resolution + + + Returns the header margin. + + @return header margin + + + Returns the footer margin. + + @return footer margin + + + Returns the number of copies. + + @return number of copies + + + + Defines namespaces, content types and normal file names / naming + patterns, for the well-known XSSF format parts. + + + + A map to lookup POIXMLRelation by its relation type + + + JPG is an intentional duplicate of JPEG, to handle documents generated by other software. * + + + Fetches the InputStream to read the contents, based + of the specified core part, for which we are defined + as a suitable relationship + + + Get POIXMLRelation by relation type + + @param rel relation type, for example, + http://schemas.openxmlformats.org/officeDocument/2006/relationships/image + @return registered POIXMLRelation or null if not found + + + + Removes the relation from the internal table. + Following readings of files will ignoring the removed relation. + + Relation to remove + + + + Adds the relation to the internal table. + Following readings of files will process the given relation. + + Relation to add + + + Rich text unicode string. These strings can have fonts applied to arbitary parts of the string. + +

    + Most strings in a workbook have formatting applied at the cell level, that is, the entire string in the cell has the + same formatting applied. In these cases, the formatting for the cell is stored in the styles part, + and the string for the cell can be shared across the workbook. The following code illustrates the example. +

    + +
    +
    +                 cell1.SetCellValue(new XSSFRichTextString("Apache POI"));
    +                 cell2.SetCellValue(new XSSFRichTextString("Apache POI"));
    +                 cell3.SetCellValue(new XSSFRichTextString("Apache POI"));
    +             
    +
    + In the above example all three cells will use the same string cached on workbook level. + +

    + Some strings in the workbook may have formatting applied at a level that is more granular than the cell level. + For instance, specific characters within the string may be bolded, have coloring, italicizing, etc. + In these cases, the formatting is stored along with the text in the string table, and is treated as + a unique entry in the workbook. The following xml and code snippet illustrate this. +

    + +
    +
    +                 XSSFRichTextString s1 = new XSSFRichTextString("Apache POI");
    +                 s1.ApplyFont(boldArial);
    +                 cell1.SetCellValue(s1);
    +            
    +                 XSSFRichTextString s2 = new XSSFRichTextString("Apache POI");
    +                 s2.ApplyFont(italicCourier);
    +                 cell2.SetCellValue(s2);
    +             
    +
    + + + @author Yegor Kozlov +
    + + Create a rich text string + + + Create empty rich text string and Initialize it with empty string + + + Create a rich text string from the supplied XML bean + + + Applies a font to the specified characters of a string. + + @param startIndex The start index to apply the font to (inclusive) + @param endIndex The end index to apply the font to (exclusive) + @param fontIndex The font to use. + + + Applies a font to the specified characters of a string. + + @param startIndex The start index to apply the font to (inclusive) + @param endIndex The end index to apply to font to (exclusive) + @param font The index of the font to use. + + + Sets the font of the entire string. + @param font The font to use. + + + Applies the specified font to the entire string. + + @param fontIndex the font to Apply. + + + Append new text to this text run and apply the specify font to it + + @param text the text to append + @param font the font to apply to the Appended text or null if no formatting is required + + + Append new text to this text run + + @param text the text to append + + + Copy font attributes from CTFont bean into CTRPrElt bean + + + Does this string have any explicit formatting applied, or is + it just text in the default style? + + + Removes any formatting that may have been applied to the string. + + + The index within the string to which the specified formatting run applies. + + @param index the index of the formatting run + @return the index within the string. + + + Returns the number of characters this format run covers. + + @param index the index of the formatting run + @return the number of characters this format run covers + + + Returns the plain string representation. + + + Returns the number of characters in this string. + + + @return The number of formatting Runs used. + + + Gets a copy of the font used in a particular formatting Run. + + @param index the index of the formatting run + @return A copy of the font used or null if no formatting is applied to the specified text Run. + + + Return a copy of the font in use at a particular index. + + @param index The index. + @return A copy of the font that's currently being applied at that + index or null if no font is being applied or the + index is out of range. + + + Return the underlying xml bean + + + + CTRPrElt --> CTFont adapter + + + ** + + + For all characters which cannot be represented in XML as defined by the XML 1.0 specification, + the characters are escaped using the Unicode numerical character representation escape character + format _xHHHH_, where H represents a hexadecimal character in the character's value. +

    + Example: The Unicode character 0D is invalid in an XML 1.0 document, + so it shall be escaped as _x000D_. +

    + See section 3.18.9 in the OOXML spec. + + @param value the string to decode + @return the decoded string +
    + + High level representation of a row of a spreadsheet. + + + the xml bean Containing all cell defInitions for this row + + + Cells of this row keyed by their column indexes. + The TreeMap ensures that the cells are ordered by columnIndex in the ascending order. + + + the parent sheet + + + Construct a XSSFRow. + + @param row the xml bean Containing all cell defInitions for this row. + @param sheet the parent sheet. + + + Returns the XSSFSheet this row belongs to + + @return the XSSFSheet that owns this row + + + + Alias for {@link #cellIterator()} to allow foreach loops: +
    +             for(Cell cell : row){
    +                 ...
    +             }
    +             
    + + @return an iterator over cells in this row. +
    + + Compares two XSSFRow objects. Two rows are equal if they belong to the same worksheet and + their row indexes are equal. + + @param row the XSSFRow to be compared. + @return
      +
    • + the value 0 if the row number of this XSSFRow is + equal to the row number of the argument XSSFRow +
    • +
    • + a value less than 0 if the row number of this this XSSFRow is + numerically less than the row number of the argument XSSFRow +
    • +
    • + a value greater than 0 if the row number of this this XSSFRow is + numerically greater than the row number of the argument XSSFRow +
    • +
    + @throws IllegalArgumentException if the argument row belongs to a different worksheet +
    + + + + Returns the cell at the given (0 based) index, + with the {@link NPOI.SS.usermodel.Row.MissingCellPolicy} from the parent Workbook. + + @return the cell at the given (0 based) index + + + + Get the hssfcell representing a given column (logical cell) + 0-based. If you ask for a cell that is not defined, then + you Get a null. + This is the basic call, with no policies applied + + 0 based column number + Cell representing that column or null if Undefined. + + + + Get the number of the first cell Contained in this row. + + @return short representing the first logical cell in the row, + or -1 if the row does not contain any cells. + + + Gets the index of the last cell Contained in this row PLUS ONE. The result also + happens to be the 1-based column number of the last cell. This value can be used as a + standard upper bound when iterating over cells: +
    +             short minColIx = row.GetFirstCellNum();
    +             short maxColIx = row.GetLastCellNum();
    +             for(short colIx=minColIx; colIx<maxColIx; colIx++) {
    +               XSSFCell cell = row.GetCell(colIx);
    +               if(cell == null) {
    +                 continue;
    +               }
    +               //... do something with cell
    +             }
    +             
    + + @return short representing the last logical cell in the row PLUS ONE, + or -1 if the row does not contain any cells. +
    + + Get the row's height measured in twips (1/20th of a point). If the height is not Set, the default worksheet value is returned, + See {@link NPOI.XSSF.usermodel.XSSFSheet#GetDefaultRowHeightInPoints()} + + @return row height measured in twips (1/20th of a point) + + + Returns row height measured in point size. If the height is not Set, the default worksheet value is returned, + See {@link NPOI.XSSF.usermodel.XSSFSheet#GetDefaultRowHeightInPoints()} + + @return row height measured in point size + @see NPOI.XSSF.usermodel.XSSFSheet#GetDefaultRowHeightInPoints() + + + Gets the number of defined cells (NOT number of cells in the actual row!). + That is to say if only columns 0,4,5 have values then there would be 3. + + @return int representing the number of defined cells in the row. + + + Get row number this row represents + + @return the row number (0 based) + + + Get whether or not to display this row with 0 height + + @return - height is zero or not. + + + Is this row formatted? Most aren't, but some rows + do have whole-row styles. For those that do, you + can get the formatting from {@link #GetRowStyle()} + + + Returns the whole-row cell style. Most rows won't + have one of these, so will return null. Call + {@link #isFormatted()} to check first. + + + Applies a whole-row cell styling to the row. + If the value is null then the style information is Removed, + causing the cell to used the default workbook style. + + + Remove the Cell from this row. + + @param cell the cell to remove + + + Returns the underlying CT_Row xml bean Containing all cell defInitions in this row + + @return the underlying CT_Row xml bean + + + Fired when the document is written to an output stream. + + @see NPOI.XSSF.usermodel.XSSFSheet#Write(java.io.OutputStream) () + + + @return formatted xml representation of this row + + + update cell references when Shifting rows + + @param n the number of rows to move + + + Copy the cells from srcRow to this row + If this row is not a blank row, this will merge the two rows, overwriting + the cells in this row with the cells in srcRow + If srcRow is null, overwrite cells in destination row with blank values, styles, etc per cell copy policy + srcRow may be from a different sheet in the same workbook + @param srcRow the rows to copy from + @param policy the policy to determine what gets copied + + + Represents a shape in a SpreadsheetML Drawing. + + @author Yegor Kozlov + + + Parent Drawing + + + The parent shape, always not-null for shapes in groups + + + anchor that is used by this shape + + + Return the Drawing that owns this shape + + @return the parent Drawing that owns this shape + + + Gets the parent shape. + + + @return the anchor that is used by this shape. + + + Returns xml bean with shape properties. + + @return xml bean with shape properties. + + + Whether this shape is not Filled with a color + + @return true if this shape is not Filled with a color. + + + Sets the color used to fill this shape using the solid fill pattern. + + + The color applied to the lines of this shape. + + + This object specifies a group shape that represents many shapes grouped together. This shape is to be treated + just as if it were a regular shape but instead of being described by a single geometry it is made up of all the + shape geometries encompassed within it. Within a group shape each of the shapes that make up the group are + specified just as they normally would. + + @author Yegor Kozlov + + + Construct a new XSSFSimpleShape object. + + @param Drawing the XSSFDrawing that owns this shape + @param ctGroup the XML bean that stores this group content + + + Initialize default structure of a new shape group + + + Constructs a textbox. + + @param anchor the child anchor describes how this shape is attached + to the group. + @return the newly Created textbox. + + + Creates a simple shape. This includes such shapes as lines, rectangles, + and ovals. + + @param anchor the child anchor describes how this shape is attached + to the group. + @return the newly Created shape. + + + Creates a simple shape. This includes such shapes as lines, rectangles, + and ovals. + + @param anchor the child anchor describes how this shape is attached + to the group. + @return the newly Created shape. + + + Creates a picture. + + @param anchor the client anchor describes how this picture is attached to the sheet. + @param pictureIndex the index of the picture in the workbook collection of pictures, + {@link XSSFWorkbook#getAllPictures()} . + @return the newly Created picture shape. + + + Sets the coordinate space of this group. All children are constrained + to these coordinates. + + + High level representation of a SpreadsheetML worksheet. + +

    + Sheets are the central structures within a workbook, and are where a user does most of his spreadsheet work. + The most common type of sheet is the worksheet, which is represented as a grid of cells. Worksheet cells can + contain text, numbers, dates, and formulas. Cells can also be formatted. +

    +
    + + cache of master shared formulas in this sheet. + Master shared formula is the first formula in a group of shared formulas is saved in the f element. + + + Creates new XSSFSheet - called by XSSFWorkbook to create a sheet from scratch. + + @see NPOI.XSSF.usermodel.XSSFWorkbook#CreateSheet() + + + Creates an XSSFSheet representing the given namespace part and relationship. + Should only be called by XSSFWorkbook when Reading in an exisiting file. + + @param part - The namespace part that holds xml data represenring this sheet. + @param rel - the relationship of the given namespace part in the underlying OPC namespace + + + Returns the parent XSSFWorkbook + + @return the parent XSSFWorkbook + + + Initialize worksheet data when Reading in an exisiting file. + + + Initialize worksheet data when creating a new sheet. + + + Read hyperlink relations, link them with CT_Hyperlink beans in this worksheet + and Initialize the internal array of XSSFHyperlink objects + + + Create a new CT_Worksheet instance with all values set to defaults + + @return a new instance + + + Provide access to the CT_Worksheet bean holding this sheet's data + + @return the CT_Worksheet bean holding this sheet's data + + + Returns the name of this sheet + + @return the name of this sheet + + + + Adds a merged region of cells on a sheet. + + region to merge + index of this region + if region contains fewer than 2 cells + if region intersects with an existing merged region + or multi-cell array formula on this sheet + + + + Adds a merged region of cells (hence those cells form one). + Skips validation.It is possible to create overlapping merged regions + or create a merged region that intersects a multi-cell array formula + with this formula, which may result in a corrupt workbook. + + region to merge + index of this region + if region contains fewer than 2 cells + + + + Adds a merged region of cells (hence those cells form one). + + region (rowfrom/colfrom-rowto/colto) to merge + whether to validate merged region + index of this region + if region intersects with a multi-cell array formula or + if region intersects with an existing region on this sheet + if region contains fewer than 2 cells + + + Verify that the candidate region does not intersect with an existing multi-cell array formula in this sheet + + @param region + @throws InvalidOperationException if candidate region intersects an existing array formula in this sheet + + + Verify that none of the merged regions intersect a multi-cell array formula in this sheet + + @param region + @throws InvalidOperationException if candidate region intersects an existing array formula in this sheet + + + Verify that candidate region does not intersect with an existing merged region in this sheet + + @param candidateRegion + @throws InvalidOperationException if candidate region intersects an existing merged region in this sheet + + + Verify that no merged regions intersect another merged region in this sheet. + + @throws InvalidOperationException if at least one region intersects with another merged region in this sheet + + + Verify that merged regions do not intersect multi-cell array formulas and + no merged regions intersect another merged region in this sheet. + + @throws InvalidOperationException if region intersects with a multi-cell array formula + @throws InvalidOperationException if at least one region intersects with another merged region in this sheet + + + Adjusts the column width to fit the contents. + + This process can be relatively slow on large sheets, so this should + normally only be called once per column, at the end of your + Processing. + + @param column the column index + + + Adjusts the column width to fit the contents. +

    + This process can be relatively slow on large sheets, so this should + normally only be called once per column, at the end of your + Processing. +

    + You can specify whether the content of merged cells should be considered or ignored. + Default is to ignore merged cells. + + @param column the column index + @param useMergedCells whether to use the contents of merged cells when calculating the width of the column +
    + + Return the sheet's existing Drawing, or null if there isn't yet one. + + Use {@link #CreateDrawingPatriarch()} to Get or create + + @return a SpreadsheetML Drawing + + + Create a new SpreadsheetML Drawing. If this sheet already Contains a Drawing - return that. + + @return a SpreadsheetML Drawing + + + Get VML drawing for this sheet (aka 'legacy' drawig) + + @param autoCreate if true, then a new VML drawing part is Created + + @return the VML drawing of null if the drawing was not found and autoCreate=false + + + Creates a split (freezepane). Any existing freezepane or split pane is overwritten. + @param colSplit Horizonatal position of split. + @param rowSplit Vertical position of split. + + + Creates a split (freezepane). Any existing freezepane or split pane is overwritten. + +

    + If both colSplit and rowSplit are zero then the existing freeze pane is Removed +

    + + @param colSplit Horizonatal position of split. + @param rowSplit Vertical position of split. + @param leftmostColumn Left column visible in right pane. + @param topRow Top row visible in bottom pane +
    + + Create a new row within the sheet and return the high level representation + + @param rownum row number + @return High level {@link XSSFRow} object representing a row in the sheet + @see #RemoveRow(NPOI.SS.usermodel.Row) + + + Creates a split pane. Any existing freezepane or split pane is overwritten. + @param xSplitPos Horizonatal position of split (in 1/20th of a point). + @param ySplitPos Vertical position of split (in 1/20th of a point). + @param topRow Top row visible in bottom pane + @param leftmostColumn Left column visible in right pane. + @param activePane Active pane. One of: PANE_LOWER_RIGHT, + PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT + @see NPOI.SS.usermodel.Sheet#PANE_LOWER_LEFT + @see NPOI.SS.usermodel.Sheet#PANE_LOWER_RIGHT + @see NPOI.SS.usermodel.Sheet#PANE_UPPER_LEFT + @see NPOI.SS.usermodel.Sheet#PANE_UPPER_RIGHT + + + + Returns cell comment for the specified row and column + + The row. + The column. + cell comment or null if not found + + + + Returns cell comment for the specified location + + cell location + return cell comment or null if not found + + + + Returns all cell comments on this sheet. + + return A Dictionary of each Comment in the sheet, keyed on the cell address where the comment is located. + + + + Get a Hyperlink in this sheet anchored at row, column + + + + return hyperlink if there is a hyperlink anchored at row, column; otherwise returns null + + + + Get a Hyperlink in this sheet located in a cell specified by {code addr} + + The address of the cell containing the hyperlink + return hyperlink if there is a hyperlink anchored at {@code addr}; otherwise returns {@code null} + + + + Get a list of Hyperlinks in this sheet + + + + + Vertical page break information used for print layout view, page layout view, drawing print breaks + in normal view, and for printing the worksheet. + + @return column indexes of all the vertical page breaks, never null + + + Get the actual column width (in units of 1/256th of a character width ) + +

    + Note, the returned value is always gerater that {@link #GetDefaultColumnWidth()} because the latter does not include margins. + Actual column width measured as the number of characters of the maximum digit width of the + numbers 0, 1, 2, ..., 9 as rendered in the normal style's font. There are 4 pixels of margin + pAdding (two on each side), plus 1 pixel pAdding for the gridlines. +

    + + @param columnIndex - the column to set (0-based) + @return width - the width in units of 1/256th of a character width +
    + + Get the actual column width in pixels + +

    + Please note, that this method works correctly only for workbooks + with the default font size (Calibri 11pt for .xlsx). +

    +
    + + Get the default column width for the sheet (if the columns do not define their own width) in + characters. +

    + Note, this value is different from {@link #GetColumnWidth(int)}. The latter is always greater and includes + 4 pixels of margin pAdding (two on each side), plus 1 pixel pAdding for the gridlines. +

    + @return column width, default value is 8 +
    + + Get the default row height for the sheet (if the rows do not define their own height) in + twips (1/20 of a point) + + @return default row height + + + Get the default row height for the sheet measued in point size (if the rows do not define their own height). + + @return default row height in points + + + Returns the CellStyle that applies to the given + (0 based) column, or null if no style has been + set for that column + + + Whether the text is displayed in right-to-left mode in the window + + @return whether the text is displayed in right-to-left mode in the window + + + Get whether to display the guts or not, + default value is true + + @return bool - guts or no guts + + + Gets the flag indicating whether the window should show 0 (zero) in cells Containing zero value. + When false, cells with zero value appear blank instead of Showing the number zero. + + @return whether all zero values on the worksheet are displayed + + + Gets the first row on the sheet + + @return the number of the first logical row on the sheet, zero based + + + Flag indicating whether the Fit to Page print option is enabled. + + @return true + + + Returns the default footer for the sheet, + creating one as needed. + You may also want to look at + {@link #GetFirstFooter()}, + {@link #GetOddFooter()} and + {@link #GetEvenFooter()} + + + Returns the default header for the sheet, + creating one as needed. + You may also want to look at + {@link #GetFirstHeader()}, + {@link #GetOddHeader()} and + {@link #GetEvenHeader()} + + + Returns the odd footer. Used on all pages unless + other footers also present, when used on only + odd pages. + + + Returns the even footer. Not there by default, but + when Set, used on even pages. + + + Returns the first page footer. Not there by + default, but when Set, used on the first page. + + + Returns the odd header. Used on all pages unless + other headers also present, when used on only + odd pages. + + + Returns the even header. Not there by default, but + when Set, used on even pages. + + + Returns the first page header. Not there by + default, but when Set, used on the first page. + + + Determine whether printed output for this sheet will be horizontally centered. + + + Gets the size of the margin in inches. + + @param margin which margin to get + @return the size of the margin + @see Sheet#LeftMargin + @see Sheet#RightMargin + @see Sheet#TopMargin + @see Sheet#BottomMargin + @see Sheet#HeaderMargin + @see Sheet#FooterMargin + + + Sets the size of the margin in inches. + + @param margin which margin to get + @param size the size of the margin + @see Sheet#LeftMargin + @see Sheet#RightMargin + @see Sheet#TopMargin + @see Sheet#BottomMargin + @see Sheet#HeaderMargin + @see Sheet#FooterMargin + + + @return the merged region at the specified index + @throws InvalidOperationException if this worksheet does not contain merged regions + + + Returns the list of merged regions. If you want multiple regions, this is + faster than calling {@link #getMergedRegion(int)} each time. + + @return the list of merged regions + @throws InvalidOperationException if this worksheet does not contain merged regions + + + Returns the number of merged regions defined in this worksheet + + @return number of merged regions in this worksheet + + + Returns the information regarding the currently configured pane (split or freeze). + + @return null if no pane configured, or the pane information. + + + Returns the number of phsyically defined rows (NOT the number of rows in the sheet) + + @return the number of phsyically defined rows + + + Gets the print Setup object. + + @return The user model for the print Setup object. + + + Answer whether protection is enabled or disabled + + @return true => protection enabled; false => protection disabled + + + Enables sheet protection and Sets the password for the sheet. + Also Sets some attributes on the {@link CT_SheetProtection} that correspond to + the default values used by Excel + + @param password to set for protection. Pass null to remove protection + + + Sets the sheet password. + + @param password if null, the password will be removed + @param hashAlgo if null, the password will be set as XOR password (Excel 2010 and earlier) + otherwise the given algorithm is used for calculating the hash password (Excel 2013) + + + Validate the password against the stored hash, the hashing method will be determined + by the existing password attributes + @return true, if the hashes match (... though original password may differ ...) + + + Returns the logical row ( 0-based). If you ask for a row that is not + defined you get a null. This is to say row 4 represents the fifth row on a sheet. + + @param rownum row to get + @return XSSFRow representing the rownumber or null if its not defined on the sheet + + + returns all rows between startRow and endRow, inclusive. + Rows between startRow and endRow that haven't been created are not included + in result unless createRowIfMissing is true + + @param startRow the first row number in this sheet to return + @param endRow the last row number in this sheet to return + @param createRowIfMissing + @return + @throws IllegalArgumentException if startRowNum and endRowNum are not in ascending order + + + Horizontal page break information used for print layout view, page layout view, drawing print breaks in normal + view, and for printing the worksheet. + + @return row indexes of all the horizontal page breaks, never null + + + Flag indicating whether summary rows appear below detail in an outline, when Applying an outline. + +

    + When true a summary row is inserted below the detailed data being summarized and a + new outline level is established on that row. +

    +

    + When false a summary row is inserted above the detailed data being summarized and a new outline level + is established on that row. +

    + @return true if row summaries appear below detail in the outline +
    + + Flag indicating whether summary columns appear to the right of detail in an outline, when Applying an outline. + +

    + When true a summary column is inserted to the right of the detailed data being summarized + and a new outline level is established on that column. +

    +

    + When false a summary column is inserted to the left of the detailed data being + summarized and a new outline level is established on that column. +

    + @return true if col summaries appear right of the detail in the outline +
    + + Ensure CT_Worksheet.CT_SheetPr.CT_OutlinePr + + + + A flag indicating whether scenarios are locked when the sheet is protected. + + + + + The top row in the visible view when the sheet is first viewed after opening it in a viewer + + + + Determine whether printed output for this sheet will be vertically centered. + + @return whether printed output for this sheet will be vertically centered. + + + Group between (0 based) columns + + + Do not leave the width attribute undefined (see #52186). + + + Tie a range of cell toGether so that they can be collapsed or expanded + + @param fromRow start row (0-based) + @param toRow end row (0-based) + + + Determines if there is a page break at the indicated column + + + Get the hidden state for a given column. + + @param columnIndex - the column to set (0-based) + @return hidden - false if the column is visible + + + Gets the flag indicating whether this sheet should display formulas. + + @return true if this sheet should display formulas. + + + Gets the flag indicating whether this sheet displays the lines + between rows and columns to make editing and Reading easier. + + @return true if this sheet displays gridlines. + @see #isPrintGridlines() to check if printing of gridlines is turned on or off + + + Gets the flag indicating whether this sheet should display row and column headings. +

    + Row heading are the row numbers to the side of the sheet +

    +

    + Column heading are the letters or numbers that appear above the columns of the sheet +

    + + @return true if this sheet should display row and column headings. +
    + + Returns whether gridlines are printed. + + @return whether gridlines are printed + + + Returns whether row and column headings are printed. + + @return whether row and column headings are printed + + + Tests if there is a page break at the indicated row + + @param row index of the row to test + @return true if there is a page break at the indicated row + + + Sets a page break at the indicated row + Breaks occur above the specified row and left of the specified column inclusive. + + For example, sheet.SetColumnBreak(2); breaks the sheet into two parts + with columns A,B,C in the first and D,E,... in the second. Simuilar, sheet.SetRowBreak(2); + breaks the sheet into two parts with first three rows (rownum=1...3) in the first part + and rows starting with rownum=4 in the second. + + @param row the row to break, inclusive + + + Removes a page break at the indicated column + + + Removes a merged region of cells (hence letting them free) + + @param index of the region to unmerge + + + Removes a number of merged regions of cells (hence letting them free) + + This method can be used to bulk-remove merged regions in a way + much faster than calling RemoveMergedRegion() for every single + merged region. + + @param indices A Set of the regions to unmerge + + + Remove a row from this sheet. All cells Contained in the row are Removed as well + + @param row the row to Remove. + + + Removes the page break at the indicated row + + + Whether Excel will be asked to recalculate all formulas when the + workbook is opened. + + + Flag indicating whether the sheet displays Automatic Page Breaks. + + @return true if the sheet displays Automatic Page Breaks. + + + Sets a page break at the indicated column. + Breaks occur above the specified row and left of the specified column inclusive. + + For example, sheet.SetColumnBreak(2); breaks the sheet into two parts + with columns A,B,C in the first and D,E,... in the second. Simuilar, sheet.SetRowBreak(2); + breaks the sheet into two parts with first three rows (rownum=1...3) in the first part + and rows starting with rownum=4 in the second. + + @param column the column to break, inclusive + + + Sets all adjacent columns of the same outline level to the specified + hidden status. + + @param pIdx + the col info index of the start of the outline group + @return the column index of the last column in the outline group + + + 'Collapsed' state is stored in a single column col info record + immediately after the outline group + + @param idx + @return a bool represented if the column is collapsed + + + Get the visibility state for a given column. + + @param columnIndex - the column to get (0-based) + @param hidden - the visiblity state of the column + + + * Set the width (in units of 1/256th of a character width) + * + *

    + * The maximum column width for an individual cell is 255 characters. + * This value represents the number of characters that can be displayed + * in a cell that is formatted with the standard font (first font in the workbook). + *

    + * + *

    + * Character width is defined as the maximum digit width + * of the numbers 0, 1, 2, ... 9 as rendered + * using the default font (first font in the workbook). + *
    + * Unless you are using a very special font, the default character is '0' (zero), + * this is true for Arial (default font font in HSSF) and Calibri (default font in XSSF) + *

    + * + *

    + * Please note, that the width set by this method includes 4 pixels of margin pAdding (two on each side), + * plus 1 pixel pAdding for the gridlines (Section 3.3.1.12 of the OOXML spec). + * This results is a slightly less value of visible characters than passed to this method (approx. 1/2 of a character). + *

    + *

    + * To compute the actual number of visible characters, + * Excel uses the following formula (Section 3.3.1.12 of the OOXML spec): + *

    + * + * width = TRuncate([{Number of Visible Characters} * + * {Maximum Digit Width} + {5 pixel pAdding}]/{Maximum Digit Width}*256)/256 + * + *

    Using the Calibri font as an example, the maximum digit width of 11 point font size is 7 pixels (at 96 dpi). + * If you set a column width to be eight characters wide, e.g. SetColumnWidth(columnIndex, 8*256), + * then the actual value of visible characters (the value Shown in Excel) is derived from the following equation: + * + TRuncate([numChars*7+5]/7*256)/256 = 8; + * + * + * which gives 7.29. + *

    + * @param columnIndex - the column to set (0-based) + * @param width - the width in units of 1/256th of a character width + * @throws ArgumentException if width > 255*256 (the maximum column width in Excel is 255 characters) +
    + + group the row It is possible for collapsed to be false and yet still have + the rows in question hidden. This can be achieved by having a lower + outline level collapsed, thus hiding all the child rows. Note that in + this case, if the lowest level were expanded, the middle level would + remain collapsed. + + @param rowIndex - + the row involved, 0 based + @param collapse - + bool value for collapse + + + @param rowIndex the zero based row index to collapse + + + @param rowIndex the zero based row index to find from + + + @param rowNumber the zero based row index to expand + + + @param row the zero based row index to find from + + + @param row the zero based row index to find from + + + @param row the zero based row index to find from + + + Sets the zoom magnification for the sheet. The zoom is expressed as a + fraction. For example to express a zoom of 75% use 3 for the numerator + and 4 for the denominator. + + @param numerator The numerator for the zoom magnification. + @param denominator The denominator for the zoom magnification. + @see #SetZoom(int) + + + Window zoom magnification for current view representing percent values. + Valid values range from 10 to 400. Horizontal & Vertical scale toGether. + + For example: +
    +             10 - 10%
    +             20 - 20%
    +             ...
    +             100 - 100%
    +             ...
    +             400 - 400%
    +             
    + + Current view can be Normal, Page Layout, or Page Break Preview. + + @param scale window zoom magnification + @throws ArgumentException if scale is invalid +
    + + copyRows rows from srcRows to this sheet starting at destStartRow + + Additionally copies merged regions that are completely defined in these + rows (ie. merged 2 cells on a row to be shifted). + @param srcRows the rows to copy. Formulas will be offset by the difference + in the row number of the first row in srcRows and destStartRow (even if srcRows + are from a different sheet). + @param destStartRow the row in this sheet to paste the first row of srcRows + the remainder of srcRows will be pasted below destStartRow per the cell copy policy + @param policy is the cell copy policy, which can be used to merge the source and destination + when the source is blank, copy styles only, paste as value, etc + + + Copies rows between srcStartRow and srcEndRow to the same sheet, starting at destStartRow + Convenience function for {@link #copyRows(List, int, CellCopyPolicy)} + + Equivalent to copyRows(getRows(srcStartRow, srcEndRow, false), destStartRow, cellCopyPolicy) + + @param srcStartRow the index of the first row to copy the cells from in this sheet + @param srcEndRow the index of the last row to copy the cells from in this sheet + @param destStartRow the index of the first row to copy the cells to in this sheet + @param cellCopyPolicy the policy to use to determine how cells are copied + + + Shifts rows between startRow and endRow n number of rows. + If you use a negative number, it will shift rows up. + Code ensures that rows don't wrap around. + + Calls ShiftRows(startRow, endRow, n, false, false); + +

    + Additionally Shifts merged regions that are completely defined in these + rows (ie. merged 2 cells on a row to be Shifted).

    + @param startRow the row to start Shifting + @param endRow the row to end Shifting + @param n the number of rows to shift +
    + + Shifts rows between startRow and endRow n number of rows. + If you use a negative number, it will shift rows up. + Code ensures that rows don't wrap around + +

    + Additionally Shifts merged regions that are completely defined in these + rows (ie. merged 2 cells on a row to be Shifted).

    + + @param startRow the row to start Shifting + @param endRow the row to end Shifting + @param n the number of rows to shift + @param copyRowHeight whether to copy the row height during the shift + @param reSetOriginalRowHeight whether to set the original row's height to the default +
    + + Ungroup a range of rows that were previously groupped + + @param fromRow start row (0-based) + @param toRow end row (0-based) + + + Returns a flag indicating whether this sheet is selected. +

    + When only 1 sheet is selected and active, this value should be in synch with the activeTab value. + In case of a conflict, the Start Part Setting wins and Sets the active sheet tab. +

    + Note: multiple sheets can be selected, but only one sheet can be active at one time. + + @return true if this sheet is selected +
    + + Register a hyperlink in the collection of hyperlinks on this sheet + + @param hyperlink the link to add + + + Removes a hyperlink in the collection of hyperlinks on this sheet + + @param row row index + @param column column index + + + Return location of the active cell, e.g. A1. + + @return the location of the active cell. + + + Does this sheet have any comments on it? We need to know, + so we can decide about writing it to disk or not + + + Return the default sheet view. This is the last one if the sheet's views, according to sec. 3.3.1.83 + of the OOXML spec: "A single sheet view defInition. When more than 1 sheet view is defined in the file, + it means that when opening the workbook, each sheet view corresponds to a separate window within the + spreadsheet application, where each window is Showing the particular sheet. Containing the same + workbookViewId value, the last sheetView defInition is loaded, and the others are discarded. + When multiple windows are viewing the same sheet, multiple sheetView elements (with corresponding + workbookView entries) are saved." + + + Returns the sheet's comments object if there is one, + or null if not + + @param create create a new comments table if it does not exist + + + Return a master shared formula by index + + @param sid shared group index + @return a CT_CellFormula bean holding shared formula or null if not found + + + @return true when Autofilters are locked and the sheet is protected. + + + @return true when Deleting columns is locked and the sheet is protected. + + + @return true when Deleting rows is locked and the sheet is protected. + + + @return true when Formatting cells is locked and the sheet is protected. + + + @return true when Formatting columns is locked and the sheet is protected. + + + @return true when Formatting rows is locked and the sheet is protected. + + + @return true when Inserting columns is locked and the sheet is protected. + + + @return true when Inserting hyperlinks is locked and the sheet is protected. + + + @return true when Inserting rows is locked and the sheet is protected. + + + @return true when Pivot tables are locked and the sheet is protected. + + + @return true when Sorting is locked and the sheet is protected. + + + @return true when Objects are locked and the sheet is protected. + + + @return true when Scenarios are locked and the sheet is protected. + + + @return true when Selection of locked cells is locked and the sheet is protected. + + + @return true when Selection of unlocked cells is locked and the sheet is protected. + + + @return true when Sheet is Protected. + + + Enable sheet protection + + + Disable sheet protection + + + Enable or disable Autofilters locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Enable or disable Deleting columns locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Enable or disable Deleting rows locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Enable or disable Formatting cells locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Enable or disable Formatting columns locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Enable or disable Formatting rows locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Enable or disable Inserting columns locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Enable or disable Inserting hyperlinks locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Enable or disable Inserting rows locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Enable or disable Pivot Tables locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Enable or disable Sort locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Enable or disable Objects locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Enable or disable Scenarios locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Enable or disable Selection of locked cells locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Enable or disable Selection of unlocked cells locking. + This does not modify sheet protection status. + To enforce this un-/locking, call {@link #disableLocking()} or {@link #enableLocking()} + + + Also Creates cells if they don't exist + + + Creates a new Table, and associates it with this Sheet + + + Returns any tables associated with this Sheet + + + Set background color of the sheet tab + + @param colorIndex the indexed color to set, must be a constant from {@link IndexedColors} + + + + Get or set background color of the sheet tab. + The value is null if no sheet tab color is set. + + + + Creates an empty XSSFPivotTable and Sets up all its relationships + including: pivotCacheDefInition, pivotCacheRecords + @return returns a pivotTable + + + Create a pivot table using the AreaReference range on sourceSheet, at the given position. + If the source reference contains a sheet name, it must match the sourceSheet + @param source location of pivot data + @param position A reference to the top left cell where the pivot table will start + @param sourceSheet The sheet containing the source data, if the source reference doesn't contain a sheet name + @throws IllegalArgumentException if source references a sheet different than sourceSheet + @return The pivot table + + + Create a pivot table using the AreaReference or named/table range on sourceSheet, at the given position. + If the source reference contains a sheet name, it must match the sourceSheet. + @param sourceRef location of pivot data - mutually exclusive with SourceName + @param sourceName range or table name for pivot data - mutually exclusive with SourceRef + @param position A reference to the top left cell where the pivot table will start + @param sourceSheet The sheet containing the source data, if the source reference doesn't contain a sheet name + @throws IllegalArgumentException if source references a sheet different than sourceSheet + @return The pivot table + + + Create a pivot table using the AreaReference range, at the given position. + If the source reference contains a sheet name, that sheet is used, otherwise this sheet is assumed as the source sheet. + @param source location of pivot data + @param position A reference to the top left cell where the pivot table will start + @return The pivot table + + + Create a pivot table using the Name range reference on sourceSheet, at the given position. + If the source reference contains a sheet name, it must match the sourceSheet + @param source location of pivot data + @param position A reference to the top left cell where the pivot table will start + @param sourceSheet The sheet containing the source data, if the source reference doesn't contain a sheet name + @ if source references a sheet different than sourceSheet + @return The pivot table + + + Create a pivot table using the Name range, at the given position. + If the source reference contains a sheet name, that sheet is used, otherwise this sheet is assumed as the source sheet. + @param source location of pivot data + @param position A reference to the top left cell where the pivot table will start + @return The pivot table + + + Create a pivot table using the Table, at the given position. + Tables are required to have a sheet reference, so no additional logic around reference sheet is needed. + @param source location of pivot data + @param position A reference to the top left cell where the pivot table will start + @return The pivot table + + + Returns all the pivot tables for this Sheet + + + Add ignored errors (usually to suppress them in the UI of a consuming + application). + + @param cell Cell. + @param ignoredErrorTypes Types of error to ignore there. + + + Ignore errors across a range of cells. + + @param region Range of cells. + @param ignoredErrorTypes Types of error to ignore there. + + + Returns the errors currently being ignored and the ranges + where they are ignored. + + @return Map of error type to the range(s) where they are ignored. + + + XSSF Conditional Formattings + + + Office 2010 Conditional Formatting extensions namespace + + + A factory method allowing to create a conditional formatting rule + with a cell comparison operator

    + TODO - formulas Containing cell references are currently not Parsed properly + + @param comparisonOperation - a constant value from + {@link NPOI.hssf.record.CFRuleRecord.ComparisonOperator}:

    +

      +
    • BETWEEN
    • +
    • NOT_BETWEEN
    • +
    • EQUAL
    • +
    • NOT_EQUAL
    • +
    • GT
    • +
    • LT
    • +
    • GE
    • +
    • LE
    • +
    +

    + @param formula1 - formula for the valued, Compared with the cell + @param formula2 - second formula (only used with + {@link NPOI.ss.usermodel.ComparisonOperator#BETWEEN}) and + {@link NPOI.ss.usermodel.ComparisonOperator#NOT_BETWEEN} operations) +
    + + + A factory method allowing the creation of conditional formatting + rules using an Icon Set / Multi-State formatting. + The thresholds for it will be created, but will be empty + and require configuring with + {@link XSSFConditionalFormattingRule#getMultiStateFormatting()} + then + {@link XSSFIconMultiStateFormatting#getThresholds()} + + + + + + Gets Conditional Formatting object at a particular index + + @param index + of the Conditional Formatting object to fetch + @return Conditional Formatting object + + + @return number of Conditional Formatting objects of the sheet + + + Removes a Conditional Formatting object by index + @param index of a Conditional Formatting object to remove + + + Represents a shape with a predefined geometry in a SpreadsheetML Drawing. + Possible shape types are defined in {@link NPOI.SS.UserModel.ShapeTypes} + + + List of the paragraphs that make up the text in this shape + + + A default instance of CTShape used for creating new shapes. + + + Xml bean that stores properties of this shape + + + Prototype with the default structure of a new auto-shape. + + + Returns the text from all paragraphs in the shape. Paragraphs are Separated by new lines. + + @return text Contained within this shape or empty string + + + + + + Returns a string Containing an appropriate prefix for an auto-numbering bullet + @param scheme the auto-numbering scheme used by the bullet + @param value the value of the bullet + @return appropriate prefix for an auto-numbering bullet + + + Convert an integer to its alpha equivalent e.g. 1 = A, 2 = B, 27 = AA etc + + + Convert an integer to its roman equivalent e.g. 1 = I, 9 = IX etc + + + Clear all text from this shape + + + Set a single paragraph of text on the shape. Note this will replace all existing paragraphs Created on the shape. + @param text string representing the paragraph text + + + Set a single paragraph of text on the shape. Note this will replace all existing paragraphs Created on the shape. + @param str rich text string representing the paragraph text + + + Returns a collection of the XSSFTextParagraphs that are attached to this shape + + @return text paragraphs in this shape + + + Add a new paragraph run to this shape + + @return Created paragraph run + + + Add a new paragraph run to this shape, Set to the provided string + + @return Created paragraph run + + + Add a new paragraph run to this shape, Set to the provided rich text string + + @return Created paragraph run + + + Returns the type of horizontal overflow for the text. + + @return the type of horizontal overflow + + + Returns the type of vertical overflow for the text. + + @return the type of vertical overflow + + + Returns the type of vertical alignment for the text within the shape. + + @return the type of vertical alignment + + + Gets the vertical orientation of the text + + @return vertical orientation of the text + + + Returns the distance (in points) between the bottom of the text frame + and the bottom of the inscribed rectangle of the shape that Contains the text. + + @return the bottom inset in points + + + Returns the distance (in points) between the left edge of the text frame + and the left edge of the inscribed rectangle of the shape that Contains + the text. + + @return the left inset in points + + + Returns the distance (in points) between the right edge of the + text frame and the right edge of the inscribed rectangle of the shape + that Contains the text. + + @return the right inset in points + + + Returns the distance (in points) between the top of the text frame + and the top of the inscribed rectangle of the shape that Contains the text. + + @return the top inset in points + + + @return whether to wrap words within the bounding rectangle + + + + Specifies that a shape should be auto-fit to fully contain the text described within it. + Auto-fitting is when text within a shape is scaled in order to contain all the text inside + + @param value type of autofit + @return type of autofit + + + Gets the shape type, one of the constants defined in {@link NPOI.SS.UserModel.ShapeTypes}. + + @return the shape type + @see NPOI.SS.UserModel.ShapeTypes + + + org.Openxmlformats.schemas.spreadsheetml.x2006.main.CTRPrElt to + org.Openxmlformats.schemas.Drawingml.x2006.main.CTFont adapter + + + + This class : the Table Part (Open Office XML Part 4: + chapter 3.5.1) + + This implementation works under the assumption that a table Contains mappings to a subtree of an XML. + The root element of this subtree an occur multiple times (one for each row of the table). The child nodes + of the root element can be only attributes or element with maxOccurs=1 property set + + + @author Roberto Manicardi + + + Checks if this Table element Contains even a single mapping to the map identified by id + @param id the XSSFMap ID + @return true if the Table element contain mappings + + + + Calculates the xpath of the root element for the table. This will be the common part + of all the mapping's xpaths + + @return the xpath of the table's root element + + + Note this list is static - once read, it does not notice later changes to the underlying column structures + @return List of XSSFXmlColumnPr + + + @return the name of the Table, if set + + + @return the display name of the Table, if set + + + @return the number of mapped table columns (see Open Office XML Part 4: chapter 3.5.1.4) + + + @return The reference for the cell in the top-left part of the table + (see Open Office XML Part 4: chapter 3.5.1.2, attribute ref) + + To synchronize with changes to the underlying CTTable, + call {@link #updateReferences()}. + + + @return The reference for the cell in the bottom-right part of the table + (see Open Office XML Part 4: chapter 3.5.1.2, attribute ref) + + Does not track updates to underlying changes to CTTable + To synchronize with changes to the underlying CTTable, + call {@link #updateReferences()}. + + + @since POI 3.15 beta 3 + + + Clears the cached values set by {@link #getStartCellReference()} + and {@link #getEndCellReference()}. + The next call to {@link #getStartCellReference()} and + {@link #getEndCellReference()} will synchronize the + cell references with the underlying CTTable. + Thus, {@link #updateReferences()} is inexpensive. + + @since POI 3.15 beta 3 + + + @return the total number of rows in the selection. (Note: in this version autofiltering is ignored) + Returns 0 if the start or end cell references are not set. + + To synchronize with changes to the underlying CTTable, + call {@link #updateReferences()}. + + + Synchronize table headers with cell values in the parent sheet. + Headers must be in sync, otherwise Excel will display a + "Found unreadable content" message on startup. + + If calling both {@link #updateReferences()} and + {@link #updateHeaders()}, {@link #updateReferences()} + should be called first. + + + Gets the relative column index of a column in this table having the header name column. + The column index is relative to the left-most column in the table, 0-indexed. + Returns -1 if column is not a header name in table. + + Column Header names are case-insensitive + + Note: this function caches column names for performance. To flush the cache (because columns + have been moved or column headers have been changed), {@link #updateHeaders()} must be called. + + @since 3.15 beta 2 + + + Represents a text box in a SpreadsheetML Drawing. + + @author Yegor Kozlov + + + Represents a paragraph of text within the Containing text body. + The paragraph is the highest level text separation mechanism. + + + Add a new run of text + + @return a new run of text + + + Insert a line break + + @return text run representing this line break ('\n') + + + get or set the alignment that is to be applied to the paragraph. + Possible values for this include left, right, centered, justified and distributed, + If this attribute is omitted, then a value of left is implied. + @return alignment that is applied to the paragraph + + + Determines where vertically on a line of text the actual words are positioned. This deals + with vertical placement of the characters with respect to the baselines. For instance + having text anchored to the top baseline, anchored to the bottom baseline, centered in + between, etc. + If this attribute is omitted, then a value of baseline is implied. + @return alignment that is applied to the paragraph + + + @return the font to be used on bullet characters within a given paragraph + + + @return the character to be used in place of the standard bullet point + + + + @return the color of bullet characters within a given paragraph. + A null value means to use the text font color. + + + + + @return the indent applied to the first line of text in the paragraph. + + + Specifies the left margin of the paragraph. This is specified in Addition to the text body + inset and applies only to this text paragraph. That is the text body inset and the LeftMargin + attributes are Additive with respect to the text position. + + @param value the left margin of the paragraph, -1 to clear the margin and use the default of 0. + + + Specifies the right margin of the paragraph. This is specified in Addition to the text body + inset and applies only to this text paragraph. That is the text body inset and the marR + attributes are Additive with respect to the text position. + + @param value the right margin of the paragraph, -1 to clear the margin and use the default of 0. + + + + @return the default size for a tab character within this paragraph in points + + + Add a single tab stop to be used on a line of text when there are one or more tab characters + present within the text. + + @param value the position of the tab stop relative to the left margin + + + + + + Specifies the particular level text properties that this paragraph will follow. + The value for this attribute formats the text according to the corresponding level + paragraph properties defined in the list of styles associated with the body of text + that this paragraph belongs to (therefore in the parent shape). +

    + Note that the closest properties object to the text is used, therefore if there is + a conflict between the text paragraph properties and the list style properties for + this level then the text paragraph properties will take precedence. +

    + Returns the level of text properties that this paragraph will follow. + + @return the text level of this paragraph (0-based). Default is 0. +
    + + Returns whether this paragraph has bullets + + + Set or unset this paragraph as a bullet point + + @param flag whether text in this paragraph has bullets + + + Set this paragraph as an automatic numbered bullet point + + @param scheme type of auto-numbering + @param startAt the number that will start number for a given sequence of automatically + numbered bullets (1-based). + + + Set this paragraph as an automatic numbered bullet point + + @param scheme type of auto-numbering + + + Returns whether this paragraph has automatic numbered bullets + + + Returns the starting number if this paragraph has automatic numbered bullets, otherwise returns 0 + + + Returns the auto number scheme if this paragraph has automatic numbered bullets, otherwise returns ListAutoNumber.ARABIC_PLAIN + + + Represents a run of text within the Containing text body. The run element is the + lowest level text separation mechanism within a text body. + + + @return font size in points or -1 if font size is not Set. + + + + @return the spacing between characters within a text Run, + If this attribute is omitted then a value of 0 or no adjustment is assumed. + + + Specifies the typeface, or name of the font that is to be used for this text Run. + + @param typeface the font to apply to this text Run. + The value of null unsets the Typeface attribute from the underlying xml. + + + @return font family or null if not Set + + + get or set whether a run of text will be formatted as strikethrough text. Default is false. + + + get or set whether a run of text will be formatted as a superscript text. Default is false. + Default base line offset is 30% + + + Set the baseline for both the superscript and subscript fonts. +

    + The size is specified using a percentage. + Positive values indicate superscript, negative values indicate subscript. +

    + + @param baselineOffset +
    + + get or set whether a run of text will be formatted as a superscript text. Default is false. + Default base line offset is -25%. + + + @return whether a run of text will be formatted as a superscript text. Default is false. + + + get or set whether this run of text is formatted as bold text + + + get or set whether this run of text is formatted as italic text + + + get or set whether this run of text is formatted as underlined text + + + Create a new XSSFVBAPart node + + + Construct XSSFVBAPart from a package part + + @param part the package part holding the VBA data, + @param rel the package relationship holding this part + + + Like *PictureData, VBA objects store the actual content in the part + directly without keeping a copy like all others therefore we need to + handle them differently. + + + Represents a SpreadsheetML VML Drawing. + +

    + In Excel 2007 VML Drawings are used to describe properties of cell comments, + although the spec says that VML is deprecated: +

    +

    + The VML format is a legacy format originally introduced with Office 2000 and is included and fully defined + in this Standard for backwards compatibility reasons. The DrawingML format is a newer and richer format + Created with the goal of eventually replacing any uses of VML in the Office Open XML formats. VML should be + considered a deprecated format included in Office Open XML for legacy reasons only and new applications that + need a file format for Drawings are strongly encouraged to use preferentially DrawingML +

    + +

    + Warning - Excel is known to Put invalid XML into these files! + For example, >br< without being closed or escaped crops up. +

    + + See 6.4 VML - SpreadsheetML Drawing in Office Open XML Part 4 - Markup Language Reference.pdf + + @author Yegor Kozlov +
    + + regexp to parse shape ids, in VML they have weird form of id="_x0000_s1026" + + + Create a new SpreadsheetML Drawing + + @see XSSFSheet#CreateDrawingPatriarch() + + + Construct a SpreadsheetML Drawing from a namespace part + + @param part the namespace part holding the Drawing data, + the content type must be application/vnd.Openxmlformats-officedocument.Drawing+xml + @param rel the namespace relationship holding this Drawing, + the relationship type must be http://schemas.Openxmlformats.org/officeDocument/2006/relationships/drawing + + + Initialize a new Speadsheet VML Drawing + + + Find a shape with ClientData of type "NOTE" and the specified row and column + + @return the comment shape or null + + + High level representation of a SpreadsheetML workbook. This is the first object most users + will construct whether they are Reading or writing a workbook. It is also the + top level object for creating new sheets/etc. + + + Width of one character of the default font in pixels. Same for Calibry and Arial. + + + Excel silently tRuncates long sheet names to 31 chars. + This constant is used to ensure uniqueness in the first 31 chars + + + Extended windows meta file + + + Windows Meta File + + + Mac PICT format + + + JPEG format + + + PNG format + + + Device independent bitmap + + + Images formats supported by XSSF but not by HSSF + + + The underlying XML bean + + + this holds the XSSFSheet objects attached to this workbook + + + this holds the XSSFName objects attached to this workbook, keyed by lower-case name + + + this holds the XSSFName objects attached to this workbook + + + shared string table - a cache of strings in this workbook + + + A collection of shared objects used for styling content, + e.g. fonts, cell styles, colors, etc. + + + The locator of user-defined functions. + By default includes functions from the Excel Analysis Toolpack + + + TODO + + + External Links, for referencing names or cells in other workbooks. + + + A collection of custom XML mappings + + + Used to keep track of the data formatter so that all + CreateDataFormatter calls return the same one for a given + book. This ensures that updates from one places is visible + someplace else. + + + The policy to apply in the event of missing or + blank cells when fetching from a row. + See {@link NPOI.ss.usermodel.Row.MissingCellPolicy} + + + array of pictures for this workbook + + + cached instance of XSSFCreationHelper for this workbook + @see {@link #getCreationHelper()} + + + List of all pivot tables in workbook + + + Create a new SpreadsheetML workbook. + + + Create a new SpreadsheetML workbook. + @param workbookType The type of workbook to make (.xlsx or .xlsm). + + + Constructs a XSSFWorkbook object given a OpenXML4J Package object, + see http://poi.apache.org/oxml4j/. + + Once you have finished working with the Workbook, you should close the package + by calling pkg.close, to avoid leaving file handles open. + + Creating a XSSFWorkbook from a file-backed OPC Package has a lower memory + footprint than an InputStream backed one. + + @param pkg the OpenXML4J OPC Package object. + + + Constructs a XSSFWorkbook object, by buffering the whole stream into memory + and then opening an {@link OPCPackage} object for it. + + Using an {@link InputStream} requires more memory than using a File, so + if a {@link File} is available then you should instead do something like +
    
    +                  OPCPackage pkg = OPCPackage.open(path);
    +                  XSSFWorkbook wb = new XSSFWorkbook(pkg);
    +                  // work with the wb object
    +                  ......
    +                  pkg.close(); // gracefully closes the underlying zip file
    +              
    +
    + + + + Not normally to be called externally, but possibly to be overridden to avoid + the DOM based parse of large sheets (see examples). + + + Create a new CT_Workbook with all values Set to default + + + Create a new SpreadsheetML namespace and Setup the default minimal content + + + Return the underlying XML bean + + @return the underlying CT_Workbook bean + + + Adds a picture to the workbook. + + @param pictureData The bytes of the picture + @param format The format of the picture. + + @return the index to this picture (0 based), the Added picture can be obtained from {@link #getAllPictures()} . + @see Workbook#PICTURE_TYPE_EMF + @see Workbook#PICTURE_TYPE_WMF + @see Workbook#PICTURE_TYPE_PICT + @see Workbook#PICTURE_TYPE_JPEG + @see Workbook#PICTURE_TYPE_PNG + @see Workbook#PICTURE_TYPE_DIB + @see #getAllPictures() + + + Adds a picture to the workbook. + + @param is The sream to read image from + @param format The format of the picture. + + @return the index to this picture (0 based), the Added picture can be obtained from {@link #getAllPictures()} . + @see Workbook#PICTURE_TYPE_EMF + @see Workbook#PICTURE_TYPE_WMF + @see Workbook#PICTURE_TYPE_PICT + @see Workbook#PICTURE_TYPE_JPEG + @see Workbook#PICTURE_TYPE_PNG + @see Workbook#PICTURE_TYPE_DIB + @see #getAllPictures() + + + Create an XSSFSheet from an existing sheet in the XSSFWorkbook. + The Cloned sheet is a deep copy of the original. + + @param sheetNum The index of the sheet to clone + @return XSSFSheet representing the Cloned sheet. + @throws ArgumentException if the sheet index in invalid + @throws POIXMLException if there were errors when cloning + + + Create an XSSFSheet from an existing sheet in the XSSFWorkbook. + The cloned sheet is a deep copy of the original but with a new given + name. + + @param sheetNum The index of the sheet to clone + @param newName The name to set for the newly created sheet + @return XSSFSheet representing the cloned sheet. + @throws IllegalArgumentException if the sheet index or the sheet + name is invalid + @throws POIXMLException if there were errors when cloning + + + @since 3.14-Beta1 + + + Generate a valid sheet name based on the existing one. Used when cloning sheets. + + @param srcName the original sheet name to + @return clone sheet name + + + + Create a new XSSFCellStyle and add it to the workbook's style table + + the new XSSFCellStyle object + + + + Returns the workbook's data format table (a factory for creating data format strings). + + the XSSFDataFormat object + + + + Create a new Font and add it to the workbook's font table + + + + + Create an XSSFSheet for this workbook, Adds it to the sheets and returns + the high level representation. Use this to create new sheets. + + @return XSSFSheet representing the new sheet. + + + Create a new sheet for this Workbook and return the high level representation. + Use this to create new sheets. + +

    + Note that Excel allows sheet names up to 31 chars in length but other applications + (such as OpenOffice) allow more. Some versions of Excel crash with names longer than 31 chars, + others - tRuncate such names to 31 character. +

    +

    + POI's SpreadsheetAPI silently tRuncates the input argument to 31 characters. + Example: + +

    
    +                 Sheet sheet = workbook.CreateSheet("My very long sheet name which is longer than 31 chars"); // will be tRuncated
    +                 assert 31 == sheet.SheetName.Length;
    +                 assert "My very long sheet name which i" == sheet.SheetName;
    +                 
    +

    + + Except the 31-character constraint, Excel applies some other rules: +

    + Sheet name MUST be unique in the workbook and MUST NOT contain the any of the following characters: +

      +
    • 0x0000
    • +
    • 0x0003
    • +
    • colon (:)
    • +
    • backslash (\)
    • +
    • asterisk (*)
    • +
    • question mark (?)
    • +
    • forward slash (/)
    • +
    • opening square bracket ([)
    • +
    • closing square bracket (])
    • +
    + The string MUST NOT begin or end with the single quote (') character. +

    + +

    + See {@link org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal)} + for a safe way to create valid names +

    + @param sheetname sheetname to set for the sheet. + @return Sheet representing the new sheet. + @throws IllegalArgumentException if the name is null or invalid + or workbook already contains a sheet with this name + @see org.apache.poi.ss.util.WorkbookUtil#createSafeSheetName(String nameProposal) +
    + + Finds a font that matches the one with the supplied attributes + + + Finds a font that matches the one with the supplied attributes + + + Convenience method to Get the active sheet. The active sheet is is the sheet + which is currently displayed when the workbook is viewed in Excel. + 'Selected' sheet(s) is a distinct concept. + + + Gets all pictures from the Workbook. + + @return the list of pictures (a list of {@link XSSFPictureData} objects.) + @see #AddPicture(byte[], int) + + + Get the cell style object at the given index + + @param idx index within the set of styles + @return XSSFCellStyle object at the index + + + Get the font at the given index number + + @param idx index number + @return XSSFFont at the index + + + + Get the first named range with the given name. + Note: names of named ranges are not unique as they are scoped by sheet. + {@link #getNames(String name)} returns all named ranges with the given name. + + named range name + return XSSFName with the given name. null is returned no named range could be found. + + + + Get the named ranges with the given name. + Note:Excel named ranges are case-insensitive and + this method performs a case-insensitive search. + + named range name + return list of XSSFNames with the given name. An empty list if no named ranges could be found + + + + Get a list of all the named ranges in the workbook. + + return list of XSSFNames in the workbook + + + Gets the named range index by his name + Note:Excel named ranges are case-insensitive and + this method performs a case-insensitive search. + + @param name named range name + @return named range index + + + Get the number of styles the workbook Contains + + @return count of cell styles + + + Get the number of fonts in the this workbook + + @return number of fonts + + + Get the number of named ranges in the this workbook + + @return number of named ranges + + + Get the number of worksheets in the this workbook + + @return number of worksheets + + + Retrieves the reference for the printarea of the specified sheet, the sheet name is Appended to the reference even if it was not specified. + @param sheetIndex Zero-based sheet index (0 Represents the first sheet to keep consistent with java) + @return String Null if no print area has been defined + + + Get sheet with the given name (case insensitive match) + + @param name of the sheet + @return XSSFSheet with the name provided or null if it does not exist + + + + + Returns the index of the sheet by his name (case insensitive match) + + the sheet name + index of the sheet (0 based) or -1 if not found + + + Returns the index of the given sheet + + @param sheet the sheet to look up + @return index of the sheet (0 based). -1 if not found + + + Get the sheet name + + @param sheetIx Number + @return Sheet name + + + Allows foreach loops: +
    
    +             XSSFWorkbook wb = new XSSFWorkbook(package);
    +             for(XSSFSheet sheet : wb){
    +            
    +             }
    +             
    +
    + + Are we a normal workbook (.xlsx), or a + macro enabled workbook (.xlsm)? + + + As {@link #removeName(String)} is not necessarily unique + (name + sheet index is unique), this method is more accurate. + + @param name the name to remove. + + + Delete the printarea for the sheet specified + + @param sheetIndex 0-based sheet index (0 = First Sheet) + + + Removes sheet at the given index.

    + + Care must be taken if the Removed sheet is the currently active or only selected sheet in + the workbook. There are a few situations when Excel must have a selection and/or active + sheet. (For example when printing - see Bug 40414).
    + + This method Makes sure that if the Removed sheet was active, another sheet will become + active in its place. Furthermore, if the Removed sheet was the only selected sheet, another + sheet will become selected. The newly active/selected sheet will have the same index, or + one less if the Removed sheet was the last in the workbook. + + @param index of the sheet (0-based) + + + Gracefully remove references to the sheet being deleted + + @param index the 0-based index of the sheet to delete + + + Retrieves the current policy on what to do when + Getting missing or blank cells from a row. + The default is to return blank and null cells. + {@link MissingCellPolicy} + + + Validate sheet index + + @param index the index to validate + @throws ArgumentException if the index is out of range (index + < 0 || index >= NumberOfSheets). + + + Gets the first tab that is displayed in the list of tabs in excel. + + @return integer that Contains the index to the active sheet in this book view. + + + + For the Convenience of Java Programmers maintaining pointers. + @see #setPrintArea(int, String) + @param sheetIndex Zero-based sheet index (0 = First Sheet) + @param startColumn Column to begin printarea + @param endColumn Column to end the printarea + @param startRow Row to begin the printarea + @param endRow Row to end the printarea + + + Generates a NameRecord to represent a built-in region + + @return a new NameRecord + @throws ArgumentException if sheetNumber is invalid + @throws POIXMLException if such a name already exists in the workbook + + + We only Set one sheet as selected for compatibility with HSSF. + + + Set the sheet name. + + @param sheetIndex sheet number (0 based) + @param sheetname the new sheet name + @throws ArgumentException if the name is null or invalid + or workbook already Contains a sheet with this name + @see {@link #CreateSheet(String)} + @see {@link NPOI.ss.util.WorkbookUtil#CreateSafeSheetName(String nameProposal)} + for a safe way to create valid names + + + Sets the order of appearance for a given sheet. + + @param sheetname the name of the sheet to reorder + @param pos the position that we want to insert the sheet into (0 based) + + + marshal named ranges from the {@link #namedRanges} collection to the underlying CT_Workbook bean + + +

    + Write the document to the specified stream, and optionally leave the stream open without closing it. + +
    + + Returns SharedStringsTable - the cache of strings for this workbook + + @return the shared string table + + + Return a object representing a collection of shared objects used for styling content, + e.g. fonts, cell styles, colors, etc. + + + Returns the Theme of current workbook. + + + Returns an object that handles instantiating concrete + classes of the various instances for XSSF. + + + Determines whether a workbook Contains the provided sheet name. + For the purpose of comparison, long names are tRuncated to 31 chars. + + @param name the name to Test (case insensitive match) + @param excludeSheetIdx the sheet to exclude from the check or -1 to include all sheets in the Check. + @return true if the sheet Contains the name, false otherwise. + + + + Gets a bool value that indicates whether the date systems used in the workbook starts in 1904. + The default value is false, meaning that the workbook uses the 1900 date system, + where 1/1/1900 is the first day in the system. + + True if the date systems used in the workbook starts in 1904 + + + Get the document's embedded files. + + + Check whether a sheet is hidden. +

    + Note that a sheet could instead be Set to be very hidden, which is different + ({@link #isSheetVeryHidden(int)}) +

    + @param sheetIx Number + @return true if sheet is hidden +
    + + Check whether a sheet is very hidden. +

    + This is different from the normal hidden status + ({@link #isSheetHidden(int)}) +

    + @param sheetIx sheet index to check + @return true if sheet is very hidden +
    + + Sets the visible state of this sheet. +

    + Calling setSheetHidden(sheetIndex, true) is equivalent to + setSheetHidden(sheetIndex, Workbook.SHEET_STATE_HIDDEN). +
    + Calling setSheetHidden(sheetIndex, false) is equivalent to + setSheetHidden(sheetIndex, Workbook.SHEET_STATE_VISIBLE). +

    + + @param sheetIx the 0-based index of the sheet + @param hidden whether this sheet is hidden + @see #setSheetHidden(int, int) +
    + + Hide or unhide a sheet. + +
      +
    • 0 - visible.
    • +
    • 1 - hidden.
    • +
    • 2 - very hidden.
    • +
    + @param sheetIx the sheet index (0-based) + @param state one of the following Workbook constants: + Workbook.SHEET_STATE_VISIBLE, + Workbook.SHEET_STATE_HIDDEN, or + Workbook.SHEET_STATE_VERY_HIDDEN. + @throws ArgumentException if the supplied sheet index or state is invalid +
    + + + Hide or unhide a sheet. + + The sheet number + 0 for not hidden, 1 for hidden, 2 for very hidden + + + Fired when a formula is deleted from this workbook, + for example when calling cell.SetCellFormula(null) + + @see XSSFCell#setCellFormula(String) + + + Return the CalculationChain object for this workbook +

    + The calculation chain object specifies the order in which the cells in a workbook were last calculated +

    + + @return the CalculationChain object or null if not defined +
    + + * Returns the list of {@link ExternalLinksTable} object for this workbook + * + *

    The external links table specifies details of named ranges etc + * that are referenced from other workbooks, along with the last seen + * values of what they point to.

    + * + *

    Note that Excel uses index 0 for the current workbook, so the first + * External Links in a formula would be '[1]Foo' which corresponds to + * entry 0 in this list.

    + + * @return the ExternalLinksTable list, which may be empty +
    + + + @return a collection of custom XML mappings defined in this workbook + + + + @return the helper class used to query the custom XML mapping defined in this workbook + + + Adds the External Link Table part and relations required to allow formulas + referencing the specified external workbook to be added to this one. Allows + formulas such as "[MyOtherWorkbook.xlsx]Sheet3!$A$5" to be added to the + file, for workbooks not already linked / referenced. + + @param name The name the workbook will be referenced as in formulas + @param workbook The open workbook to fetch the link required information from + + + Specifies a bool value that indicates whether structure of workbook is locked.
    + A value true indicates the structure of the workbook is locked. Worksheets in the workbook can't be Moved, + deleted, hidden, unhidden, or Renamed, and new worksheets can't be inserted.
    + A value of false indicates the structure of the workbook is not locked.
    + + @return true if structure of workbook is locked +
    + + Specifies a bool value that indicates whether the windows that comprise the workbook are locked.
    + A value of true indicates the workbook windows are locked. Windows are the same size and position each time the + workbook is opened.
    + A value of false indicates the workbook windows are not locked. + + @return true if windows that comprise the workbook are locked +
    + + Specifies a bool value that indicates whether the workbook is locked for revisions. + + @return true if the workbook is locked for revisions. + + + Locks the structure of workbook. + + + Unlocks the structure of workbook. + + + Locks the windows that comprise the workbook. + + + Unlocks the windows that comprise the workbook. + + + Locks the workbook for revisions. + + + Unlocks the workbook for revisions. + + + Remove Pivot Tables and PivotCaches from the workbooka + + + + Returns the locator of user-defined functions. +

    + The default instance : the built-in functions with the Excel Analysis Tool Pack. + To Set / Evaluate custom functions you need to register them as follows: + + + +

    + @return wrapped instance of UDFFinder that allows seeking functions both by index and name +
    + + Register a new toolpack in this workbook. + + @param toopack the toolpack to register + + + Whether the application shall perform a full recalculation when the workbook is opened. +

    + Typically you want to force formula recalculation when you modify cell formulas or values + of a workbook previously Created by Excel. When Set to true, this flag will tell Excel + that it needs to recalculate all formulas in the workbook the next time the file is opened. +

    +

    + Note, that recalculation updates cached formula results and, thus, modifies the workbook. + Depending on the version, Excel may prompt you with "Do you want to save the Changes in filename?" + on close. +

    + + @param value true if the application will perform a full recalculation of + workbook values when the workbook is opened + @since 3.8 +
    + + Whether Excel will be asked to recalculate all formulas when the workbook is opened. + + @since 3.8 + + + + Returns the spreadsheet version (EXCLE2007) of this workbook + + + + Returns the data table with the given name (case insensitive). + + @param name the data table name (case-insensitive) + @return The Data table in the workbook named name, or null if no table is named name. + @since 3.15 beta 2 + + + Add pivotCache to the workbook + + + Adds a vbaProject.bin file to the workbook. This will change the workbook + type if necessary. + + @throws IOException + + + Adds a vbaProject.bin file taken from another, given workbook to this one. + @throws IOException + @throws InvalidFormatException + + + This is a seriously sick fix for the fact that some .xlsx + files contain raw bits of HTML, without being escaped + or properly turned into XML. + The result is that they contain things like >br<, + which breaks the XML parsing. + This very sick InputStream wrapper attempts to spot + these go past, and fix them. + Only works for UTF-8 and US-ASCII based streams! + It should only be used where experience Shows the problem + can occur... + + + Warning - doesn't fix! + + + Reads into the buffer from the spare bytes + + + We don't support .xlsb files, sorry + + + Helper class to extract text from an OOXML Word file + + + Should we also fetch the hyperlinks, when fetching + the text content? Default is to only output the + hyperlink label, and not the contents + + + Base class for XWPF paragraphs + + @author Yury Batrakov (batrakov at gmail.com) + + + + Decorator class for XWPFParagraph allowing to add comments + found in paragraph to its text + + @author Yury Batrakov (batrakov at gmail.com) + + + + A .docx file can have no headers/footers, the same header/footer + on each page, odd/even page footers, and optionally also + a different header/footer on the first page. + This class handles sorting out what there is, and giving you + the right headers and footers for the document. + + + Figures out the policy for the given document, + and Creates any header and footer objects + as required. + + + Figures out the policy for the given document, + and Creates any header and footer objects + as required. + + + MB 24 May 2010. Created this overloaded buildHdrFtr() method because testing demonstrated + that the XWPFFooter or XWPFHeader object returned by calls to the CreateHeader(int, XWPFParagraph[]) + and CreateFooter(int, XWPFParagraph[]) methods or the GetXXXXXHeader/Footer methods where + headers or footers had been Added to a document since it had been Created/opened, returned + an object that Contained no XWPFParagraph objects even if the header/footer itself did contain + text. The reason was that this line of code; CTHdrFtr ftr = CTHdrFtr.Factory.NewInstance(); + Created a brand new instance of the CTHDRFtr class which was then populated with data when + it should have recovered the CTHdrFtr object encapsulated within the XWPFHeaderFooter object + that had previoulsy been instantiated in the CreateHeader(int, XWPFParagraph[]) or + CreateFooter(int, XWPFParagraph[]) methods. + + + Returns the odd page header. This is + also the same as the default one... + + + Returns the odd page footer. This is + also the same as the default one... + + + Get the header that applies to the given + (1 based) page. + @param pageNumber The one based page number + + + Get the footer that applies to the given + (1 based) page. + @param pageNumber The one based page number + + + Base decorator class for XWPFParagraph + + + Experimental abstract class that is a base for XWPFSDT and XWPFSDTCell +

    + WARNING - APIs expected to change rapidly. +

    + These classes have so far been built only for Read-only Processing. + + + @return first SDT Title + + + @return first SDT Tag + + + @return the content object + + + @return null + + + @return document part + + + @return partType + + + @return element type + + +

    + 9 Jan 2010 +

    +

    + // TODO insert Javadoc here! +

    + @author epp + +
    + + The different kinds of {@link IBody} that exist + + + Specifies all types of borders which can be specified for WordProcessingML + objects which have a border. Borders can be Separated into two types: +
      +
    • Line borders: which specify a pattern to be used when Drawing a line around the + specified object. +
    • +
    • Art borders: which specify a repeated image to be used + when Drawing a border around the specified object. Line borders may be + specified on any object which allows a border, however, art borders may only + be used as a border at the page level - the borders under the pgBorders + element +
    • +
    + @author Gisella Bronzetti +
    + + Specifies a line border consisting of a single line around the parent + object. + + + specifies an art border consisting of a repeated image of an apple + + + specifies an art border consisting of a repeated image of a shell pattern + + + specifies an art border consisting of a repeated image of a baby pacifier + + + specifies an art border consisting of a repeated image of a baby rattle + + + specifies an art border consisting of a repeated image of a set of + balloons + + + specifies an art border consisting of a repeated image of a hot air + balloon + + + specifies an art border consisting of a repeating image of a black and + white background. + + + specifies an art border consisting of a repeating image of a black dot on + a white background. + + + specifies an art border consisting of a repeating image of a black and + white background + + + specifies an art border consisting of a repeating image of a black and + white background. + + + specifies an art border consisting of a repeating image of a black and + white background. + + + specifies an art border consisting of a repeating image of a white dot on + a black background. + + + specifies an art border consisting of a repeating image of a black and + white background. + + + specifies an art border consisting of a repeating image of a black and + white background. + + + specifies an art border consisting of a repeating image of a black and + white background + + + specifies an art border consisting of a repeating image of a black and + white background + + + specifies an art border consisting of a repeated image of bats + + + specifies an art border consisting of repeating images of birds + + + specifies an art border consisting of a repeated image of birds flying + + + specifies an art border consisting of a repeated image of a cabin + + + specifies an art border consisting of a repeated image of a piece of cake + + + specifies an art border consisting of a repeated image of candy corn + + + specifies an art border consisting of a repeated image of a knot work + pattern + + + specifies an art border consisting of a banner. +

    + if the border is on the left or right, no border is displayed. +

    +
    + + specifies an art border consisting of a repeating image of a chain link + pattern. + + + specifies an art border consisting of a repeated image of a champagne + bottle + + + specifies an art border consisting of repeating images of a compass + + + specifies an art border consisting of a repeating image of a colored + pattern. + + + specifies an art border consisting of a repeated image of a checkerboard + + + specifies an art border consisting of a repeated image of a christmas + tree + + + specifies an art border consisting of repeating images of lines and + circles + + + specifies an art border consisting of a repeated image of a rectangular + pattern + + + specifies an art border consisting of a repeated image of a wave + + + specifies an art border consisting of a repeated image of a clock + + + specifies an art border consisting of repeating images of a compass + + + specifies an art border consisting of a repeated image of confetti + + + specifies an art border consisting of a repeated image of confetti + + + specifies an art border consisting of a repeated image of confetti + + + specifies an art border consisting of a repeated image of confetti + streamers + + + specifies an art border consisting of a repeated image of confetti + + + specifies an art border consisting of a repeated image + + + specifies an art border consisting of a dashed line + + + specifies an art border consisting of a dotted line + + + specifies an art border consisting of a repeated image of a maze-like + pattern + + + specifies an art border consisting of a repeated image of a butterfly + + + specifies an art border consisting of a repeated image of a fish + + + specifies an art border consisting of repeating images of insects. + + + specifies an art border consisting of a repeated image of a ladybug + + + specifies an art border consisting of repeating images of a cross-stitch + pattern + + + specifies an art border consisting of a repeated image of cupid + + + Specifies the Set of possible restart locations which may be used as to + determine the next available line when a break's type attribute has a value + of textWrapping. + + @author Gisella Bronzetti + + + Specifies that the text wrapping break shall advance the text to the next + line in the WordProcessingML document, regardless of its position left to + right or the presence of any floating objects which intersect with the + line, + + This is the Setting for a typical line break in a document. + + + Specifies that the text wrapping break shall behave as follows: +
      +
    • If this line is broken into multiple regions (a floating object in + the center of the page has text wrapping on both sides: +
        +
      • If this is the leftmost region of text flow on this line, advance + the text to the next position on the line
      • +
      • Otherwise, treat this as a text wrapping break of type all.
      • +
      +
    • +
    • If this line is not broken into multiple regions, then treat this + break as a text wrapping break of type none.
    • +
    +
  • If the parent paragraph is right to left, then these behaviors are + also reversed.
  • +
    + + + Specifies that the text wrapping break shall advance the text to the next + line in the WordProcessingML document which spans the full width of the + line. + + + Specifies the possible types of break characters in a WordProcessingML + document. + The break type determines the next location where text shall be + placed After this manual break is applied to the text contents + + @author Gisella Bronzetti + + + Specifies that the current break shall restart itself on the next page of + the document when the document is displayed in page view. + + + Specifies that the current break shall restart itself on the next column + available on the current page when the document is displayed in page + view. +

    + If the current section is not divided into columns, or the column break + occurs in the last column on the current page when displayed, then the + restart location for text shall be the next page in the document. +

    +
    + + Specifies that the current break shall restart itself on the next line in + the document when the document is displayed in page view. + The determine of the next line shall be done subject to the value of the clear + attribute on the specified break character. + + + Extended windows meta file + + + Windows Meta File + + + Mac PICT format + + + JPEG format + + + PNG format + + + Device independent bitmap + + + GIF image format + + + Tag Image File (.tiff) + + + Encapsulated Postscript (.eps) + + + Windows Bitmap (.bmp) + + + WordPerfect graphics (.wpg) + + + Scalable Vector Graphics (.svg) + + + An IBody represents the different parts of the document which + can contain collections of Paragraphs and Tables. It provides a + common way to work with these and their contents. + Typically, this is something like a XWPFDocument, or one of + the parts in it like XWPFHeader, XWPFFooter, XWPFTableCell + + + + returns the Part, to which the body belongs, which you need for Adding relationship to other parts + Actually it is needed of the class XWPFTableCell. Because you have to know to which part the tableCell + belongs. + @return the Part, to which the body belongs + + + Get the PartType of the body, for example + DOCUMENT, HEADER, FOOTER, FOOTNOTE, + @return the PartType of the body + + + Returns an Iterator with paragraphs and tables, + in the order that they occur in the text. + + + Returns the paragraph(s) that holds + the text of the header or footer. + + + Return the table(s) that holds the text + of the IBodyPart, for complex cases + where a paragraph isn't used. + + + if there is a corresponding {@link XWPFParagraph} of the parameter ctTable in the paragraphList of this header or footer + the method will return this paragraph + if there is no corresponding {@link XWPFParagraph} the method will return null + @param p is instance of CTP and is searching for an XWPFParagraph + @return null if there is no XWPFParagraph with an corresponding CTPparagraph in the paragraphList of this header or footer + XWPFParagraph with the correspondig CTP p + + + if there is a corresponding {@link XWPFTable} of the parameter ctTable in the tableList of this header + the method will return this table + if there is no corresponding {@link XWPFTable} the method will return null + @param ctTable + + + Returns the paragraph that of position pos + + + Returns the table at position pos + + + inserts a new paragraph at position of the cursor + @param cursor + + + inserts a new Table at the cursor position. + @param cursor + + + inserts a new Table at position pos + @param pos + @param table + + + returns the TableCell to which the Table belongs + @param cell + + + Return XWPFDocument + + + 9 Jan 2010 + @author Philipp Epp + + + + + Simple interface describing both {@link XWPFParagraph} + and {@link XWPFSDT} + + + Common interface for things that can occur + where a run (text with common stylings) can, + eg {@link XWPFRun} or {@link XWPFSDT}. + More methods to follow shortly! + + + Experimental interface to offer rudimentary Read-only Processing of + of the contentblock of an SDT/ContentControl. +

    +

    +

    + WARNING - APIs expected to change rapidly + + + Interface for anything that can be within an STD: + {@link XWPFRun}, {@link XWPFTable}, {@link XWPFParagraph}, + {@link XWPFSDT} etc + + + Specifies the logic which shall be used to calculate the line spacing of the + parent object when it is displayed in the document. + + @author Gisella Bronzetti + + + Specifies that the line spacing of the parent object shall be + automatically determined by the size of its contents, with no + predetermined minimum or maximum size. + + + Specifies that the height of the line shall be exactly the value + specified, regardless of the size of the contents If the contents are too + large for the specified height, then they shall be clipped as necessary. + + + Specifies that the height of the line shall be at least the value + specified, but may be expanded to fit its content as needed. + + + Specifies all types of alignment which are available to be applied to objects in a + WordProcessingML document + + @author Yegor Kozlov + + + * postion of a character in a paragrapho + * 1st RunPositon + * 2nd TextPosition + * 3rd CharacterPosition + * + * + + + Specifies all types of vertical alignment which are available to be applied to of all text + on each line displayed within a paragraph. + + @author Gisella Bronzetti + + + Specifies that all text in the parent object shall be + aligned to the top of each character when displayed + + + Specifies that all text in the parent object shall be + aligned to the center of each character when displayed. + + + Specifies that all text in the parent object shall be + aligned to the baseline of each character when displayed. + + + Specifies that all text in the parent object shall be + aligned to the bottom of each character when displayed. + + + Specifies that all text in the parent object shall be + aligned automatically when displayed. + + + saves the begin and end position of a text in a Paragraph + + +

    + The index of the start run + +
    + + + The index of the start CT_Text + + + + + The index of the start text character + + + + + the index of the end CT_Text + + + + + the index of the end text character + + + + Specifies the types of patterns which may be used to create the underline + applied beneath the text in a Run. + + @author Gisella Bronzetti + + + Specifies an underline consisting of a single line beneath all characters + in this Run. + + + Specifies an underline consisting of a single line beneath all non-space + characters in the Run. There shall be no underline beneath any space + character (breaking or non-breaking). + + + Specifies an underline consisting of two lines beneath all characters in + this run + + + Specifies an underline consisting of a single thick line beneath all + characters in this Run. + + + Specifies an underline consisting of a series of dot characters beneath + all characters in this Run. + + + Specifies an underline consisting of a series of thick dot characters + beneath all characters in this Run. + + + Specifies an underline consisting of a dashed line beneath all characters + in this Run. + + + Specifies an underline consisting of a series of thick dashes beneath all + characters in this Run. + + + Specifies an underline consisting of long dashed characters beneath all + characters in this Run. + + + Specifies an underline consisting of thick long dashed characters beneath + all characters in this Run. + + + Specifies an underline consisting of a series of dash, dot characters + beneath all characters in this Run. + + + Specifies an underline consisting of a series of thick dash, dot + characters beneath all characters in this Run. + + + Specifies an underline consisting of a series of dash, dot, dot + characters beneath all characters in this Run. + + + Specifies an underline consisting of a series of thick dash, dot, dot + characters beneath all characters in this Run. + + + Specifies an underline consisting of a single wavy line beneath all + characters in this Run. + + + Specifies an underline consisting of a single thick wavy line beneath all + characters in this Run. + + + Specifies an underline consisting of a pair of wavy lines beneath all + characters in this Run. + + + Specifies no underline beneath this Run. + + + Specifies possible values for the alignment of the contents of this run in + relation to the default appearance of the Run's text. This allows the text to + be repositioned as subscript or superscript without altering the font size of + the run properties. + + @author Gisella Bronzetti + + + Specifies that the text in the parent run shall be located at the + baseline and presented in the same size as surrounding text. + + + Specifies that this text should be subscript. This Setting shall lower + the text in this run below the baseline and change it to a smaller size, + if a smaller size is available. + + + Specifies that this text should be superscript. This Setting shall raise + the text in this run above the baseline and change it to a smaller size, + if a smaller size is available. + + + @author Philipp Epp + + + + + Abstract Numbering Definition Type + + + + + Numbering Definition Type + + + + + Single Level Numbering Definition + + + + + Multilevel Numbering Definition + + + + + Hybrid Multilevel Numbering Definition + + + + + Numbering Format + + + + + Decimal Numbers + + + + + Uppercase Roman Numerals + + + + + Lowercase Roman Numerals + + + + + Uppercase Latin Alphabet + + + + + Lowercase Latin Alphabet + + + + + Ordinal + + + + + Cardinal Text + + + + + Ordinal Text + + + + + Hexadecimal Numbering + + + + + Chicago Manual of Style + + + + + Ideographs + + + + + Japanese Counting System + + + + + AIUEO Order Hiragana + + + + + Iroha Ordered Katakana + + + + + Double Byte Arabic Numerals + + + + + Single Byte Arabic Numerals + + + + + Japanese Legal Numbering + + + + + Japanese Digital Ten Thousand Counting System + + + + + Decimal Numbers Enclosed in a Circle + + + + + Double Byte Arabic Numerals Alternate + + + + + Full-Width AIUEO Order Hiragana + + + + + Full-Width Iroha Ordered Katakana + + + + + Initial Zero Arabic Numerals + + + + + Bullet + + + + + Korean Ganada Numbering + + + + + Korean Chosung Numbering + + + + + Decimal Numbers Followed by a Period + + + + + Decimal Numbers Enclosed in Parenthesis + + + + + Decimal Numbers Enclosed in a Circle + + + + + Ideographs Enclosed in a Circle + + + + + Traditional Ideograph Format + + + + + Zodiac Ideograph Format + + + + + Traditional Zodiac Ideograph Format + + + + + Taiwanese Counting System + + + + + Traditional Legal Ideograph Format + + + + + Taiwanese Counting Thousand System + + + + + Taiwanese Digital Counting System + + + + + Chinese Counting System + + + + + Chinese Legal Simplified Format + + + + + Chinese Counting Thousand System + + + + + Korean Digital Counting System + + + + + Korean Counting System + + + + + Korean Legal Numbering + + + + + Korean Digital Counting System Alternate + + + + + Vietnamese Numerals + + + + + Lowercase Russian Alphabet + + + + + Uppercase Russian Alphabet + + + + + No Numbering + + + + + Number With Dashes + + + + + Hebrew Numerals + + + + + Hebrew Alphabet + + + + + Arabic Alphabet + + + + + Arabic Abjad Numerals + + + + + Hindi Vowels + + + + + Hindi Consonants + + + + + Hindi Numbers + + + + + Hindi Counting System + + + + + Thai Letters + + + + + Thai Numerals + + + + + Thai Counting System + + + + * Sketch of XWPF comment class + * + * @author Yury Batrakov (batrakov at gmail.com) + * + + + Default Paragraph style, from which other styles will override + TODO Share logic with {@link XWPFParagraph} which also uses CTPPr + + + Default Character Run style, from which other styles will override + TODO Share logic with {@link XWPFRun} which also uses CTRPr + + +

    High(ish) level class for working with .docx files.

    + +

    This class tries to hide some of the complexity + of the underlying file format, but as it's not a + mature and stable API yet, certain parts of the + XML structure come through. You'll therefore almost + certainly need to refer to the OOXML specifications + from + http://www.ecma-international.org/publications/standards/Ecma-376.htm + at some point in your use.

    +
    + + Keeps track on all id-values used in this document and included parts, like headers, footers, etc. + + + Handles the joy of different headers/footers for different pages + + + Create a new WordProcessingML package and Setup the default minimal content + + + Create a new CT_Document with all values Set to default + + + Returns the low level document base object + + + Sets columns on document base object + + + Sets Text Direction of Document + + + returns an Iterator with paragraphs and tables + @see NPOI.XWPF.UserModel.IBody#getBodyElements() + + + @see NPOI.XWPF.UserModel.IBody#getParagraphs() + + + @see NPOI.XWPF.UserModel.IBody#getTables() + + + @see NPOI.XWPF.UserModel.IBody#getTableArray(int) + + + + @return the list of footers + + + + @return the list of headers + + + Get the document part that's defined as the + given relationship of the core document. + + + Returns the policy on headers and footers, which + also provides a way to Get at them. + + + Returns the styles object used + + + Get the document's embedded files. + + + Finds that for example the 2nd entry in the body list is the 1st paragraph + + + Look up the paragraph at the specified position in the body elemnts list + and return this paragraphs position in the paragraphs list + + @param pos + The position of the relevant paragraph in the body elements + list + @return the position of the paragraph in the paragraphs list, if there is + a paragraph at the position in the bodyelements list. Else it + will return -1 + + + + Get with the position of a table in the bodyelement array list + the position of this table in the table array list + @param pos position of the table in the bodyelement array list + @return if there is a table at the position in the bodyelement array list, + else it will return null. + + + Add a new paragraph at position of the cursor. The cursor must be on the + {@link org.apache.xmlbeans.XmlCursor.TokenType#START} tag of an subelement + of the documents body. When this method is done, the cursor passed as + parameter points to the {@link org.apache.xmlbeans.XmlCursor.TokenType#END} + of the newly inserted paragraph. + + @param cursor + @return the {@link XWPFParagraph} object representing the newly inserted + CTP object + + + verifies that cursor is on the right position + @param cursor + + + Get the position of the paragraph, within the list + of all the body elements. + @param p The paragraph to find + @return The location, or -1 if the paragraph couldn't be found + + + Get the position of the table, within the list of + all the body elements. + @param t The table to find + @return The location, or -1 if the table couldn't be found + + + Commit and saves the document + + + Gets the index of the relation we're trying to create + @param relation + @return i + + + Appends a new paragraph to this document + @return a new paragraph + + + Creates an empty numbering if one does not already exist and Sets the numbering member + @return numbering + + + Creates an empty styles for the document if one does not already exist + @return styles + + + Creates an empty footnotes element for the document if one does not already exist + @return footnotes + + + remove a BodyElement from bodyElements array list + @param pos + @return true if removing was successfully, else return false + + + copies content of a paragraph to a existing paragraph in the list paragraphs at position pos + @param paragraph + @param pos + + + @return the LastParagraph of the document + + + Create an empty table with one row and one column as default. + @return a new table + + + Create an empty table with a number of rows and cols specified + @param rows + @param cols + @return table + + + + Create a Table of Contents (TOC) at the end of the document. + Please set paragraphs style to "Heading{#}" and document + styles for TOC . + Otherwise, it renders an empty one. + + + + Replace content of table in array tables at position pos with a + @param pos + @param table + + + Verifies that the documentProtection tag in settings.xml file
    + specifies that the protection is enforced (w:enforcement="1")
    +
    + sample snippet from settings.xml +
    +                 <w:settings  ... >
    +                     <w:documentProtection w:edit="readOnly" w:enforcement="1"/>
    +             
    + + @return true if documentProtection is enforced with option any +
    + + Verifies that the documentProtection tag in Settings.xml file
    + specifies that the protection is enforced (w:enforcement="1")
    + and that the kind of protection is ReadOnly (w:edit="readOnly")
    +
    + sample snippet from Settings.xml +
    +                <w:settings  ... >
    +                    <w:documentProtection w:edit="readOnly" w:enforcement="1"/>
    +            
    + + @return true if documentProtection is enforced with option ReadOnly +
    + + Verifies that the documentProtection tag in Settings.xml file
    + specifies that the protection is enforced (w:enforcement="1")
    + and that the kind of protection is forms (w:edit="forms")
    +
    + sample snippet from Settings.xml +
    +                <w:settings  ... >
    +                    <w:documentProtection w:edit="forms" w:enforcement="1"/>
    +            
    + + @return true if documentProtection is enforced with option forms +
    + + Verifies that the documentProtection tag in Settings.xml file
    + specifies that the protection is enforced (w:enforcement="1")
    + and that the kind of protection is comments (w:edit="comments")
    +
    + sample snippet from Settings.xml +
    +                <w:settings  ... >
    +                    <w:documentProtection w:edit="comments" w:enforcement="1"/>
    +            
    + + @return true if documentProtection is enforced with option comments +
    + + Verifies that the documentProtection tag in Settings.xml file
    + specifies that the protection is enforced (w:enforcement="1")
    + and that the kind of protection is trackedChanges (w:edit="trackedChanges")
    +
    + sample snippet from Settings.xml +
    +                <w:settings  ... >
    +                    <w:documentProtection w:edit="trackedChanges" w:enforcement="1"/>
    +            
    + + @return true if documentProtection is enforced with option trackedChanges +
    + + Enforces the ReadOnly protection.
    + In the documentProtection tag inside Settings.xml file,
    + it Sets the value of enforcement to "1" (w:enforcement="1")
    + and the value of edit to ReadOnly (w:edit="readOnly")
    +
    + sample snippet from Settings.xml +
    +                <w:settings  ... >
    +                    <w:documentProtection w:edit="readOnly" w:enforcement="1"/>
    +            
    +
    + + Enforce the Filling Forms protection.
    + In the documentProtection tag inside Settings.xml file,
    + it Sets the value of enforcement to "1" (w:enforcement="1")
    + and the value of edit to forms (w:edit="forms")
    +
    + sample snippet from Settings.xml +
    +                <w:settings  ... >
    +                    <w:documentProtection w:edit="forms" w:enforcement="1"/>
    +            
    +
    + + Enforce the Comments protection.
    + In the documentProtection tag inside Settings.xml file,
    + it Sets the value of enforcement to "1" (w:enforcement="1")
    + and the value of edit to comments (w:edit="comments")
    +
    + sample snippet from Settings.xml +
    +                <w:settings  ... >
    +                    <w:documentProtection w:edit="comments" w:enforcement="1"/>
    +            
    +
    + + Enforce the Tracked Changes protection.
    + In the documentProtection tag inside Settings.xml file,
    + it Sets the value of enforcement to "1" (w:enforcement="1")
    + and the value of edit to trackedChanges (w:edit="trackedChanges")
    +
    + sample snippet from Settings.xml +
    +                <w:settings  ... >
    +                    <w:documentProtection w:edit="trackedChanges" w:enforcement="1"/>
    +            
    +
    + + Remove protection enforcement.
    + In the documentProtection tag inside Settings.xml file
    + it Sets the value of enforcement to "0" (w:enforcement="0")
    +
    + + Enforces fields update on document open (in Word). + In the settings.xml file
    + sets the updateSettings value to true (w:updateSettings w:val="true") + + NOTICES: +
      +
    • Causing Word to ask on open: "This document contains fields that may refer to other files. Do you want to update the fields in this document?" + (if "Update automatic links at open" is enabled)
    • +
    • Flag is removed after saving with changes in Word
    • +
    +
    + + Check if revision tracking is turned on. + + @return true if revision tracking is turned on + + + inserts an existing XWPFTable to the arrays bodyElements and tables + @param pos + @param table + + + Returns all Pictures, which are referenced from the document itself. + @return a {@link List} of {@link XWPFPictureData}. The returned {@link List} is unmodifiable. Use #a + + + @return all Pictures in this package + + + Get the next free ImageNumber + @param format + @return the next free ImageNumber + @throws InvalidFormatException + + + returns the PictureData by blipID + @param blipID + @return XWPFPictureData of a specificID + + + GetNumbering + @return numbering + + + Get Styles + @return styles for this document + + + Get the paragraph with the CTP class p + + @param p + @return the paragraph with the CTP class p + + + Get a table by its CTTbl-Object + @param ctTbl + @see NPOI.XWPF.UserModel.IBody#getTable(org.Openxmlformats.schemas.wordProcessingml.x2006.main.CTTbl) + @return a table by its CTTbl-Object or null + + + + Change orientation of a Word file + + + https://stackoverflow.com/questions/26483837/landscape-and-portrait-pages-in-the-same-word-document-using-apache-poi-xwpf-in + + + Returns the paragraph that of position pos + @see NPOI.XWPF.UserModel.IBody#getParagraphArray(int) + + + returns the Part, to which the body belongs, which you need for Adding relationship to other parts + Actually it is needed of the class XWPFTableCell. Because you have to know to which part the tableCell + belongs. + @see NPOI.XWPF.UserModel.IBody#getPart() + + + Get the PartType of the body, for example + DOCUMENT, HEADER, FOOTER, FOOTNOTE, + + @see NPOI.XWPF.UserModel.IBody#getPartType() + + + Get the TableCell which belongs to the TableCell + @param cell + + + @author Yegor Kozlov + + + @since POI 3.14-Beta1 + + + @since POI 3.14-Beta1 + + + A run of text which is part of a field, such as Title + of Page number or Author. + Any given Field may be made up of multiple of these. + + + Sketch of XWPF footer class + + + save and Commit footer + + + Get the PartType of the body + @see NPOI.XWPF.UserModel.IBody#getPartType() + + + + + + position in table array + The table at position pos + + + + inserts an existing XWPFTable to the arrays bodyElements and tables + + + + + + if there is a corresponding {@link XWPFTable} of the parameter ctTable in the tableList of this header + the method will return this table + if there is no corresponding {@link XWPFTable} the method will return null + @param ctTable + @see NPOI.XWPF.UserModel.IBody#getTable(CTTbl ctTable) + + + if there is a corresponding {@link XWPFParagraph} of the parameter ctTable in the paragraphList of this header or footer + the method will return this paragraph + if there is no corresponding {@link XWPFParagraph} the method will return null + @param p is instance of CTP and is searching for an XWPFParagraph + @return null if there is no XWPFParagraph with an corresponding CTPparagraph in the paragraphList of this header or footer + XWPFParagraph with the correspondig CTP p + @see NPOI.XWPF.UserModel.IBody#getParagraph(CTP p) + + + + Returns the paragraph that holds the text of the header or footer. + + + + + + + Get the TableCell which belongs to the TableCell + + + + + + verifies that cursor is on the right position + @param cursor + + + + @param cursor + @return the inserted table + @see NPOI.XWPF.UserModel.IBody#insertNewTbl(XmlCursor cursor) + + + add a new paragraph at position of the cursor + @param cursor + @return the inserted paragraph + @see NPOI.XWPF.UserModel.IBody#insertNewParagraph(XmlCursor cursor) + + + add a new table to the end of the footnote + @param table + @return the Added XWPFTable + + + add a new paragraph to the end of the footnote + @param paragraph + @return the Added XWPFParagraph + + + @see NPOI.XWPF.UserModel.IBody#getXWPFDocument() + + + returns the Part, to which the body belongs, which you need for Adding relationship to other parts + @see NPOI.XWPF.UserModel.IBody#getPart() + + + Get the PartType of the body + @see NPOI.XWPF.UserModel.IBody#getPartType() + + + Looks After the collection of Footnotes for a document + + @author Mike McEuen (mceuen@hp.com) + + + Construct XWPFFootnotes from a package part + + @param part the package part holding the data of the footnotes, + @param rel the package relationship of type "http://schemas.Openxmlformats.org/officeDocument/2006/relationships/footnotes" + + + Construct XWPFFootnotes from scratch for a new document. + + + Read document + + + Sets the ctFootnotes + @param footnotes + + + add an XWPFFootnote to the document + @param footnote + @throws IOException + + + add a footnote to the document + @param note + @throws IOException + + + @see NPOI.XWPF.UserModel.IBody#getPart() + + + Sketch of XWPF header class + + + + Save and commit footer + + + + + Read the document + + + + + Get the PartType of the body + + + + Parent of XWPF headers and footers + + + Returns the paragraph(s) that holds + the text of the header or footer. + Normally there is only the one paragraph, but + there could be more in certain cases, or + a table. + + + Return the table(s) that holds the text + of the header or footer, for complex cases + where a paragraph isn't used. + Normally there's just one paragraph, but some + complex headers/footers have a table or two + in Addition. + + + Returns the textual content of the header/footer, + by flattening out the text of its paragraph(s) + + + Set a new headerFooter + + + if there is a corresponding {@link XWPFTable} of the parameter ctTable in the tableList of this header + the method will return this table + if there is no corresponding {@link XWPFTable} the method will return null + @param ctTable + + + if there is a corresponding {@link XWPFParagraph} of the parameter ctTable in the paragraphList of this header or footer + the method will return this paragraph + if there is no corresponding {@link XWPFParagraph} the method will return null + @param p is instance of CTP and is searching for an XWPFParagraph + @return null if there is no XWPFParagraph with an corresponding CTPparagraph in the paragraphList of this header or footer + XWPFParagraph with the correspondig CTP p + + + Returns the paragraph that holds + the text of the header or footer. + + + Get a List of all Paragraphs + @return a list of {@link XWPFParagraph} + + + Get all Pictures in this package + @return all Pictures in this package + + + Adds a picture to the document. + + @param pictureData The picture data + @param format The format of the picture. + + @return the index to this picture (0 based), the Added picture can be obtained from {@link #getAllPictures()} . + @throws InvalidFormatException + + + Adds a picture to the document. + + @param is The stream to read image from + @param format The format of the picture. + + @return the index to this picture (0 based), the Added picture can be obtained from {@link #getAllPictures()} . + @throws InvalidFormatException + @ + + + returns the PictureData by blipID + @param blipID + @return XWPFPictureData of a specificID + @throws Exception + + + verifies that cursor is on the right position + @param cursor + + + Returns the table at position pos + @see NPOI.XWPF.UserModel.IBody#getTableArray(int) + + + inserts an existing XWPFTable to the arrays bodyElements and tables + @param pos + @param table + + + Get the TableCell which belongs to the TableCell + @param cell + + + returns the Part, to which the body belongs, which you need for Adding relationship to other parts + @see NPOI.XWPF.UserModel.IBody#getPart() + + + Adds a new paragraph at the end of the header or footer + + + * Sketch of XWPF hyperlink class + * + * @author Yury Batrakov (batrakov at gmail.com) + * + + + A run of text with a Hyperlink applied to it. + Any given Hyperlink may be made up of multiple of these. + + + Returns the ID of the hyperlink, if one is Set. + + + If this Hyperlink is an external reference hyperlink, + return the object for it. + + + checks whether specific LatentStyleID is a latentStyle + + + @author Philipp Epp + + + + @author Philipp Epp + + + + create a new styles object with an existing document + + + create a new XWPFNumbering object for use in a new document + + + read numbering form an existing package + + + save and Commit numbering + + + Sets the ctNumbering + @param numbering + + + Checks whether number with numID exists + @param numID + @return bool true if num exist, false if num not exist + + + add a new number to the numbering document + @param num + + + Add a new num with an abstractNumID + @return return NumId of the Added num + + + Add a new num with an abstractNumID and a numID + @param abstractNumID + @param numID + + + Get Num by NumID + @param numID + @return abstractNum with NumId if no Num exists with that NumID + null will be returned + + + Get AbstractNum by abstractNumID + @param abstractNumID + @return abstractNum with abstractNumId if no abstractNum exists with that abstractNumID + null will be returned + + + Compare AbstractNum with abstractNums of this numbering document. + If the content of abstractNum Equals with an abstractNum of the List in numbering + the Bigint Value of it will be returned. + If no equal abstractNum is existing null will be returned + + @param abstractNum + @return Bigint + + + add a new AbstractNum and return its AbstractNumID + @param abstractNum + + + + Add a new AbstractNum + + + @author antony liu + + + remove an existing abstractNum + @param abstractNumID + @return true if abstractNum with abstractNumID exists in NumberingArray, + false if abstractNum with abstractNumID not exists + + + return the abstractNumID + If the AbstractNumID not exists + return null + @param numID + @return abstractNumID + + +

    A Paragraph within a Document, Table, Header etc.

    + +

    A paragraph has a lot of styling information, but the + actual text (possibly along with more styling) is held on + the child {@link XWPFRun}s.

    +
    + + For access to the document's hyperlink, comments, tables etc + + + Identifies (in order) the parts of the paragraph / + sub-paragraph that correspond to character text + runs, and builds the appropriate runs for these. + + + + Return the textual content of the paragraph, including text from pictures + and std element in it. + + + Return styleID of the paragraph if style exist for this paragraph + if not, null will be returned + @return styleID as String + + + If style exist for this paragraph + NumId of the paragraph will be returned. + If style not exist null will be returned + @return NumID as Bigint + + + + setNumILvl of Paragraph + + + + + + Returns Ilvl of the numeric style for this paragraph. + + + + + + Returns numbering format for this paragraph, eg bullet or lowerLetter. + + + + + + Returns the text that should be used around the paragraph level numbers. + + + + + Gets the numstartOverride for the paragraph numbering for this paragraph. + + + + + + SetNumID of Paragraph + + + + + + Set NumID and level of Paragraph + + + + + + + Returns the text of the paragraph, but not of any objects in the paragraph + + + + + Returns any text from any suitable pictures in the paragraph + + + + + Returns the footnote text of the paragraph + + + + + Returns the paragraph alignment which shall be applied to text in this paragraph. + + + + + The raw alignment value + + + + Returns the text vertical alignment which shall be applied to text in + this paragraph. +

    + If the line height (before any Added spacing) is larger than one or more + characters on the line, all characters will be aligned to each other as + specified by this element. +

    +

    + If this element is omitted on a given paragraph, its value is determined + by the Setting previously Set at any level of the style hierarchy (i.e. + that previous Setting remains unChanged). If this Setting is never + specified in the style hierarchy, then the vertical alignment of all + characters on the line shall be automatically determined by the consumer. +

    + + @return the vertical alignment of this paragraph. +
    + + + the top border for the paragraph + + + + + Specifies the border which shall be displayed below a Set of + paragraphs which have the same Set of paragraph border Settings. + + the bottom border for the paragraph + + + + Specifies the border which shall be displayed on the left side of the + page around the specified paragraph. + + the left border for the paragraph + + + Specifies the border which shall be displayed on the right side of the + page around the specified paragraph. + + @return ParagraphBorder - the right border for the paragraph + @see #setBorderRight(Borders) + @see Borders for a list of all possible borders + + + Specifies the border which shall be displayed between each paragraph in a + Set of paragraphs which have the same Set of paragraph border Settings. + + @return ParagraphBorder - the between border for the paragraph + @see #setBorderBetween(Borders) + @see Borders for a list of all possible borders + + + Specifies that when rendering this document in a paginated + view, the contents of this paragraph are rendered on the start of a new + page in the document. +

    + If this element is omitted on a given paragraph, + its value is determined by the Setting previously Set at any level of the + style hierarchy (i.e. that previous Setting remains unChanged). If this + Setting is never specified in the style hierarchy, then this property + shall not be applied. Since the paragraph is specified to start on a new + page, it begins page two even though it could have fit on page one. +

    + + @return bool - if page break is Set +
    + + Specifies the spacing that should be Added After the last line in this + paragraph in the document in absolute units. + + @return int - value representing the spacing After the paragraph + + + Specifies the spacing that should be Added After the last line in this + paragraph in the document in absolute units. + + @return bigint - value representing the spacing After the paragraph + @see #setSpacingAfterLines(int) + + + Specifies the spacing that should be Added above the first line in this + paragraph in the document in absolute units. + + @return the spacing that should be Added above the first line + @see #setSpacingBefore(int) + + + Specifies the spacing that should be Added before the first line in this paragraph in the + document in line units. + The value of this attribute is specified in one hundredths of a line. + + @return the spacing that should be Added before the first line in this paragraph + @see #setSpacingBeforeLines(int) + + + + Specifies how the spacing between lines is calculated as stored in the + line attribute. If this attribute is omitted, then it shall be assumed to + be of a value auto if a line attribute value is present. + + + + + Return the spacing between lines of a paragraph. The units of the return value depends on the + . If AUTO, the return value is in lines, otherwise the return + value is in points + + a double specifying points or lines. + + + + Specifies the indentation which shall be placed between the left text + margin for this paragraph and the left edge of that paragraph's content + in a left to right paragraph, and the right text margin and the right + edge of that paragraph's text in a right to left paragraph +

    + If this attribute is omitted, its value shall be assumed to be zero. + Negative values are defined such that the text is Moved past the text margin, + positive values Move the text inside the text margin. +

    + + @return indentation or null if indentation is not Set +
    + + Specifies the indentation which shall be placed between the right text + margin for this paragraph and the right edge of that paragraph's content + in a left to right paragraph, and the right text margin and the right + edge of that paragraph's text in a right to left paragraph +

    + If this attribute is omitted, its value shall be assumed to be zero. + Negative values are defined such that the text is Moved past the text margin, + positive values Move the text inside the text margin. +

    + + @return indentation or null if indentation is not Set +
    + + Specifies the indentation which shall be Removed from the first line of + the parent paragraph, by moving the indentation on the first line back + towards the beginning of the direction of text flow. + This indentation is + specified relative to the paragraph indentation which is specified for + all other lines in the parent paragraph. + The firstLine and hanging + attributes are mutually exclusive, if both are specified, then the + firstLine value is ignored. + + @return indentation or null if indentation is not Set + + + Specifies the Additional indentation which shall be applied to the first + line of the parent paragraph. This Additional indentation is specified + relative to the paragraph indentation which is specified for all other + lines in the parent paragraph. + The firstLine and hanging attributes are + mutually exclusive, if both are specified, then the firstLine value is + ignored. + If the firstLineChars attribute is also specified, then this + value is ignored. + If this attribute is omitted, then its value shall be + assumed to be zero (if needed). + + @return indentation or null if indentation is not Set + + + This element specifies whether a consumer shall break Latin text which + exceeds the text extents of a line by breaking the word across two lines + (breaking on the character level) or by moving the word to the following + line (breaking on the word level). + + @return bool + + + @return the style of the paragraph + + + Get a copy of the currently used CTPBrd, if none is used, return + a new instance. + + + Get a copy of the currently used CTSpacing, if none is used, + return a new instance. + + + Get a copy of the currently used CTPInd, if none is used, return + a new instance. + + + Get a copy of the currently used CTPPr, if none is used, return + a new instance. + + + add a new run at the end of the position of + the content of parameter run + @param run + + + + Replace text inside each run (cross run is not supported yet) + + target text + replacement text + + + + this methods parse the paragraph and search for the string searched. + If it finds the string, it will return true and the position of the String will be saved in the parameter startPos. + + + + + + + Appends a new run to this paragraph + + @return a new text run + + + Appends a new OMath to this paragraph + + @return a new text run + + + + insert a new Run in RunArray + + The position at which the new run should be added. + the inserted run or null if the given pos is out of bounds. + + + Get a Text + @param segment + + + Removes a Run at the position pos in the paragraph + @param pos + @return true if the run was Removed + + + returns the type of the BodyElement Paragraph + @see NPOI.XWPF.UserModel.IBodyElement#getElementType() + + + returns the part of the bodyElement + @see NPOI.XWPF.UserModel.IBody#getPart() + + + returns the partType of the bodyPart which owns the bodyElement + + @see NPOI.XWPF.UserModel.IBody#getPartType() + + + Adds a new Run to the Paragraph + + @param r + + + return the XWPFRun-Element which owns the CTR Run-Element + + @param r + + + + Appends a new hyperlink run to this paragraph + + a new hyperlink run + + + + @author Philipp Epp + + + Link Picture with PictureData + @param rel + + + Return the underlying CTPicture bean that holds all properties for this picture + + @return the underlying CTPicture bean + + + Get the PictureData of the Picture, if present. + Note - not all kinds of picture have data + + + + Returns the width of the picture (in points). + + + + + Returns the depth of the picture (in points). + + + + + Raw picture data, normally attached to a WordProcessingML Drawing. As a rule, pictures are stored in the /word/media/ part of a WordProcessingML package. + + + @author Philipp Epp + + + + Relationships for each known picture type + + + Create a new XWPFGraphicData node + + + + Construct XWPFPictureData from a package part + + @param part the package part holding the Drawing data, + @param rel the package relationship holding this Drawing, + the relationship type must be http://schemas.Openxmlformats.org/officeDocument/2006/relationships/image + + + Gets the picture data as a byte array. +

    + Note, that this call might be expensive since all the picture data is copied into a temporary byte array. + You can grab the picture data directly from the underlying package part as follows: +
    + + InputStream is1 = GetPackagePart().InputStream; + +

    + @return the Picture data. +
    + + Returns the file name of the image, eg image7.jpg . The original filename + isn't always available, but if it can be found it's likely to be in the + CTDrawing + + + Suggests a file extension for this image. + @return the file extension. + + + Return an integer constant that specifies type of this picture + + @return an integer constant that specifies type of this picture + @see NPOI.XWPF.UserModel.PictureTypeEMF + @see NPOI.XWPF.UserModel.PictureTypeWMF + @see NPOI.XWPF.UserModel.PictureTypePICT + @see NPOI.XWPF.UserModel.PictureTypeJPEG + @see NPOI.XWPF.UserModel.PictureTypePNG + @see NPOI.XWPF.UserModel.PictureTypeDIB + + + *PictureData objects store the actual content in the part directly without keeping a + copy like all others therefore we need to handle them differently. + + + @author Yegor Kozlov + + + A map to lookup POIXMLRelation by its relation type + + + Supported image formats + + + Get POIXMLRelation by relation type + + @param rel relation type, for example, + http://schemas.openxmlformats.org/officeDocument/2006/relationships/image + @return registered POIXMLRelation or null if not found + + + @see [MS-OI29500] Run Fonts + + + XWPFrun.object defines a region of text with a common Set of properties + + @author Yegor Kozlov + @author Gregg Morris (gregg dot morris at gmail dot com) - added getColor(), setColor() + + + @param r the CT_R bean which holds the run.attributes + @param p the parent paragraph + + + @deprecated Use {@link XWPFRun#XWPFRun(CTR, IRunBody)} + + + Get the currently used CT_R object + @return CT_R object + + + Get the currently referenced paragraph/SDT object + @return current parent + + + Get the currently referenced paragraph, or null if a SDT object + @deprecated use {@link XWPFRun#getParent()} instead + + + @return The {@link XWPFDocument} instance, this run.belongs to, or + null if parent structure (paragraph > document) is not properly Set. + + + For isBold, isItalic etc + + + Whether the bold property shall be applied to all non-complex script + characters in the contents of this run.when displayed in a document. +

    + This formatting property is a toggle property, which specifies that its + behavior differs between its use within a style defInition and its use as + direct formatting. When used as part of a style defInition, Setting this + property shall toggle the current state of that property as specified up + to this point in the hierarchy (i.e. applied to not applied, and vice + versa). Setting it to false (or an equivalent) shall + result in the current Setting remaining unChanged. However, when used as + direct formatting, Setting this property to true or false shall Set the + absolute state of the resulting property. +

    +

    + If this element is not present, the default value is to leave the + formatting applied at previous level in the style hierarchy. If this + element is never applied in the style hierarchy, then bold shall not be + applied to non-complex script characters. +

    + + @param value true if the bold property is applied to + this run +
    + + Get text color. The returned value is a string in the hex form "RRGGBB". + + + Set text color. + @param rgbStr - the desired color, in the hex form "RRGGBB". + + + Return the string content of this text run + + @return the text of this text run.or null if not Set + + + Returns text embedded in pictures + + + + Sets the text of this text run + + the literal text which shall be displayed in the document + + + + Sets the text of this text run.in the + + the literal text which shall be displayed in the document + position in the text array (NB: 0 based) + + + Whether the italic property should be applied to all non-complex script + characters in the contents of this run.when displayed in a document. + + @return true if the italic property is applied + + + Specifies that the contents of this run.should be displayed along with an + underline appearing directly below the character heigh + + @return the Underline pattern Applyed to this run + @see UnderlinePatterns + + + + insert text at start index in the run + + insert text + start index of the insertion in the run text + + + Specifies that the contents of this run.should be displayed along with an + underline appearing directly below the character heigh + If this element is not present, the default value is to leave the + formatting applied at previous level in the style hierarchy. If this + element is never applied in the style hierarchy, then an underline shall + not be applied to the contents of this run. + + @param value - + underline type + @see UnderlinePatterns : all possible patterns that could be applied + + + Specifies that the contents of this run.shall be displayed with a single + horizontal line through the center of the line. + + @return true if the strike property is applied + + + Specifies that the contents of this run.shall be displayed with a single + horizontal line through the center of the line. +

    + This formatting property is a toggle property, which specifies that its + behavior differs between its use within a style defInition and its use as + direct formatting. When used as part of a style defInition, Setting this + property shall toggle the current state of that property as specified up + to this point in the hierarchy (i.e. applied to not applied, and vice + versa). Setting it to false (or an equivalent) shall result in the + current Setting remaining unChanged. However, when used as direct + formatting, Setting this property to true or false shall Set the absolute + state of the resulting property. +

    +

    + If this element is not present, the default value is to leave the + formatting applied at previous level in the style hierarchy. If this + element is never applied in the style hierarchy, then strikethrough shall + not be applied to the contents of this run. +

    + + @param value true if the strike property is applied to + this run +
    + + Specifies that the contents of this run shall be displayed with a double + horizontal line through the center of the line. + + @return true if the double strike property is applied + + + Specifies the alignment which shall be applied to the contents of this + run.in relation to the default appearance of the run.s text. + This allows the text to be repositioned as subscript or superscript without + altering the font size of the run.properties. + + @return VerticalAlign + @see VerticalAlign all possible value that could be Applyed to this run + + + Specifies the fonts which shall be used to display the text contents of + this run. Specifies a font which shall be used to format all characters + in the ASCII range (0 - 127) within the parent run + + @return a string representing the font family + + + Gets the font family for the specified font char range. + If fcr is null, the font char range "ascii" is used + + @param fcr the font char range, defaults to "ansi" + @return a string representing the font famil + + + Specifies the fonts which shall be used to display the text contents of + this run. The default handling for fcr == null is to overwrite the + ascii font char range with the given font family and also set all not + specified font ranges + + @param fontFamily + @param fcr FontCharRange or null for default handling + + + Specifies the font size which shall be applied to all non complex script + characters in the contents of this run.when displayed. + + @return value representing the font size + + + This element specifies the amount by which text shall be raised or + lowered for this run.in relation to the default baseline of the + surrounding non-positioned text. This allows the text to be repositioned + without altering the font size of the contents. + + If the val attribute is positive, then the parent run.shall be raised + above the baseline of the surrounding text by the specified number of + half-points. If the val attribute is negative, then the parent run.shall + be lowered below the baseline of the surrounding text by the specified + number of half-points. + * + If this element is not present, the default value is to leave the + formatting applied at previous level in the style hierarchy. If this + element is never applied in the style hierarchy, then the text shall not + be raised or lowered relative to the default baseline location for the + contents of this run. + + @return a big integer representing the amount of text shall be "moved" + + + + + + Specifies that a break shall be placed at the current location in the run + content. + A break is a special character which is used to override the + normal line breaking that would be performed based on the normal layout + of the document's contents. + @see #AddCarriageReturn() + + + Specifies that a break shall be placed at the current location in the run + content. + A break is a special character which is used to override the + normal line breaking that would be performed based on the normal layout + of the document's contents. +

    + The behavior of this break character (the + location where text shall be restarted After this break) shall be + determined by its type values. +

    + @see BreakType +
    + + Specifies that a break shall be placed at the current location in the run + content. A break is a special character which is used to override the + normal line breaking that would be performed based on the normal layout + of the document's contents. +

    + The behavior of this break character (the + location where text shall be restarted After this break) shall be + determined by its type (in this case is BreakType.TEXT_WRAPPING as default) and clear attribute values. +

    + @see BreakClear +
    + + Specifies that a tab shall be placed at the current location in + the run content. + + + Specifies that a carriage return shall be placed at the + current location in the run.content. + A carriage return is used to end the current line of text in + WordProcess. + The behavior of a carriage return in run.content shall be + identical to a break character with null type and clear attributes, which + shall end the current line and find the next available line on which to + continue. + The carriage return character forced the following text to be + restarted on the next available line in the document. + + + Adds a picture to the run. This method handles + attaching the picture data to the overall file. + + @see NPOI.XWPF.UserModel.Document#PICTURE_TYPE_EMF + @see NPOI.XWPF.UserModel.Document#PICTURE_TYPE_WMF + @see NPOI.XWPF.UserModel.Document#PICTURE_TYPE_PICT + @see NPOI.XWPF.UserModel.Document#PICTURE_TYPE_JPEG + @see NPOI.XWPF.UserModel.Document#PICTURE_TYPE_PNG + @see NPOI.XWPF.UserModel.Document#PICTURE_TYPE_DIB + + @param pictureData The raw picture data + @param pictureType The type of the picture, eg {@link Document#PICTURE_TYPE_JPEG} + @param width width in EMUs. To convert to / from points use {@link org.apache.poi.util.Units} + @param height height in EMUs. To convert to / from points use {@link org.apache.poi.util.Units} + @throws NPOI.Openxml4j.exceptions.InvalidFormatException + @throws IOException + + + Returns the embedded pictures of the run. These + are pictures which reference an external, + embedded picture image such as a .png or .jpg + + + + Return this run's style ID. If this run has no style (no run properties or properties without a style), an empty string is returned. + + + + + Add the xml:spaces="preserve" attribute if the string has leading or trailing white spaces + + @param xs the string to check + + + Returns the string version of the text, with tabs and + carriage returns in place of their xml equivalents. + + + Experimental class to offer rudimentary Read-only Processing of + of StructuredDocumentTags/ContentControl + + + + WARNING - APIs expected to change rapidly + + + + Experimental class to offer rudimentary Read-only Processing of + of StructuredDocumentTags/ContentControl that can appear + in a table row as if a table cell. +

    + These can contain one or more cells or other SDTs within them. +

    + WARNING - APIs expected to change rapidly + + + Experimental class to offer rudimentary Read-only Processing of + of the contentblock of an SDT/ContentControl. + + + + WARNING - APIs expected to change rapidly + + + + Experimental class to offer rudimentary Read-only Processing of + of the XWPFSDTCellContent. +

    + WARNING - APIs expected to change rapidly + + + In the zoom tag inside Settings.xml file
    + it Sets the value of zoom + @return percentage as an integer of zoom level +
    + +

    + Set zoom. In the zoom tag inside settings.xml file it sets the value of zoom + + + + sample snippet from Settings.xml + + <w:zoom w:percent="50" /> + +
    + + Verifies the documentProtection tag inside settings.xml file
    + if the protection is enforced (w:enforcement="1")
    +

    +
    + sample snippet from settings.xml +

    +                 <w:settings  ... >
    +                     <w:documentProtection w:edit="readOnly" w:enforcement="1"/>
    +             
    + + @return true if documentProtection is enforced with option any +
    + + Verifies the documentProtection tag inside Settings.xml file
    + if the protection is enforced (w:enforcement="1")
    + and if the kind of protection Equals to passed (STDocProtect.Enum editValue)
    + +
    + sample snippet from Settings.xml +
    +                <w:settings  ... >
    +                    <w:documentProtection w:edit="readOnly" w:enforcement="1"/>
    +            
    + + @return true if documentProtection is enforced with option ReadOnly +
    + + Enforces the protection with the option specified by passed editValue.
    +
    + In the documentProtection tag inside Settings.xml file
    + it Sets the value of enforcement to "1" (w:enforcement="1")
    + and the value of edit to the passed editValue (w:edit="[passed editValue]")
    +
    + sample snippet from Settings.xml +
    +                <w:settings  ... >
    +                    <w:documentProtection w:edit="[passed editValue]" w:enforcement="1"/>
    +            
    +
    + + Removes protection enforcement.
    + In the documentProtection tag inside Settings.xml file
    + it Sets the value of enforcement to "0" (w:enforcement="0")
    +
    + + Enforces fields update on document open (in Word). + In the settings.xml file
    + sets the updateSettings value to true (w:updateSettings w:val="true") + + NOTICES: +
      +
    • Causing Word to ask on open: "This document contains fields that may refer to other files. Do you want to update the fields in this document?" + (if "Update automatic links at open" is enabled)
    • +
    • Flag is removed after saving with changes in Word
    • +
    +
    + + get or set revision tracking + + + @author Philipp Epp + + + + constructor + @param style + + + constructor + @param style + @param styles + + + Get StyleID of the style + @return styleID StyleID of the style + + + Get Type of the Style + @return ctType + + + Set style + @param style + + + Get ctStyle + @return ctStyle + + + Get styles + @return styles the styles to which this style belongs + + + Get StyleID of the linked Style + + + Get StyleID of the next style + + + Compares the names of the Styles + @param compStyle + + + Holds details of built-in, default and user styles, which + apply to tables / paragraphs / lists etc. + Text within one of those with custom stylings has the style + information stored in the {@link XWPFRun} + + + Construct XWPFStyles from a package part + + @param part the package part holding the data of the styles, + @param rel the package relationship of type "http://schemas.Openxmlformats.org/officeDocument/2006/relationships/styles" + + + Construct XWPFStyles from scratch for a new document. + + + Read document + + + Sets the ctStyles + @param styles + + + Checks whether style with styleID exist + @param styleID styleID of the Style in the style-Document + @return true if style exist, false if style not exist + + + add a style to the document + @param style + @throws IOException + + + get style by a styleID + @param styleID styleID of the searched style + @return style + + + get the style with the specified name, if any. + @param styleName The name of the style to get, e.g., "Heading 1" + @return style + + + Get the styles which are related to the parameter style and their relatives + this method can be used to copy all styles from one document to another document + @param style + @return a list of all styles which were used by this method + + + Get the styles which are related to parameter style + @param style + @return all Styles of the parameterList + + + Sets the default spelling language on ctStyles DocDefaults parameter + @param strSpellingLanguage + + + Sets the default East Asia spelling language on ctStyles DocDefaults parameter + @param strEastAsia + + + Sets the default font on ctStyles DocDefaults parameter + TODO Replace this with specific Setters for each type, possibly + on XWPFDefaultRunStyle + + + Get the style with the same name + if this style is not existing, return null + + + Get the default style which applies text runs in the document + + + Get the default paragraph style which applies to the document + + + Get the definition of all the Latent Styles + + +

    Sketch of XWPFTable class. Only table's text is being hold.

    +

    Specifies the contents of a table present in the document. A table is a set + of paragraphs (and other block-level content) arranged in rows and columns.

    +
    + + @return ctTbl object + + + + add a new column for each row in this table + + + create a new XWPFTableRow object with as many cells as the number of columns defined in that moment + + @return tableRow + + + @param pos - index of the row + @return the row at the position specified or null if no rows is defined or if the position is greather than the max size of rows array + + + @return width value + + + @return number of rows in table + + + Get the StyleID of the table + @return style-ID of the table + + + add a new Row to the table + + @param row the row which should be Added + + + add a new Row to the table + at position pos + @param row the row which should be Added + + + inserts a new tablerow + @param pos + @return the inserted row + + + Remove a row at position pos from the table + @param pos position the Row in the Table + + + returns the type of the BodyElement Table + @see NPOI.XWPF.UserModel.IBodyElement#getElementType() + + + returns the part of the bodyElement + @see NPOI.XWPF.UserModel.IBody#getPart() + + + returns the partType of the bodyPart which owns the bodyElement + @see NPOI.XWPF.UserModel.IBody#getPartType() + + + returns the XWPFRow which belongs to the CTRow row + if this row is not existing in the table null will be returned + + + Represents a Cell within a {@link XWPFTable}. The + Cell is the thing that holds the actual content (paragraphs etc) + + + If a table cell does not include at least one block-level element, then this document shall be considered corrupt + + + returns an Iterator with paragraphs and tables + @see NPOI.XWPF.UserModel.IBody#getBodyElements() + + + returns a list of paragraphs + + + Add a Paragraph to this Table Cell + @return The paragraph which was Added + + + add a Paragraph to this TableCell + @param p the paragaph which has to be Added + + + Removes a paragraph of this tablecell + @param pos + + + if there is a corresponding {@link XWPFParagraph} of the parameter ctTable in the paragraphList of this table + the method will return this paragraph + if there is no corresponding {@link XWPFParagraph} the method will return null + @param p is instance of CTP and is searching for an XWPFParagraph + @return null if there is no XWPFParagraph with an corresponding CTPparagraph in the paragraphList of this table + XWPFParagraph with the correspondig CTP p + + + + Add bottom border to cell + + Border Style + Border Width + Border Spacing Measurement + Border Color + + + + Add top border to cell + + Border Style + Border Width + Border Spacing Measurement + Border Color + + + + Add left border to cell + + Border Style + Border Width + Border Spacing Measurement + Border Color + + + + Add right border to cell + + Border Style + Border Width + + Border Color + + + + Creates border with parameters + + Border Style + Border Width + Border Spacing Measurement + Border Color + CT_Border object + + + Set cell color. This sets some associated values; for finer control + you may want to access these elements individually. + @param rgbStr - the desired cell color, in the hex form "RRGGBB". + + + Get cell color. Note that this method only returns the "fill" value. + @return RGB string of cell color + + + Set the vertical alignment of the cell. + @param vAlign - the desired alignment enum value + + + Get the vertical alignment of the cell. + @return the cell alignment enum value or null if no vertical alignment is set + + + add a new paragraph at position of the cursor + @param cursor + @return the inserted paragraph + + + verifies that cursor is on the right position + + + @see NPOI.XWPF.UserModel.IBody#getParagraphArray(int) + + + Get the to which the TableCell belongs + + @see NPOI.XWPF.UserModel.IBody#getPart() + + + @see NPOI.XWPF.UserModel.IBody#getPartType() + + + Get a table by its CTTbl-Object + @see NPOI.XWPF.UserModel.IBody#getTable(org.Openxmlformats.schemas.wordProcessingml.x2006.main.CTTbl) + + + @see NPOI.XWPF.UserModel.IBody#getTableArray(int) + + + @see NPOI.XWPF.UserModel.IBody#getTables() + + + inserts an existing XWPFTable to the arrays bodyElements and tables + @see NPOI.XWPF.UserModel.IBody#insertTable(int, NPOI.XWPF.UserModel.XWPFTable) + + + extracts all text recursively through embedded tables and embedded SDTs + + + Get the TableCell which belongs to the TableCell + + + A row within an {@link XWPFTable}. Rows mostly just have + sizings and stylings, the interesting content lives inside + the child {@link XWPFTableCell}s + + + create a new XWPFTableCell and add it to the tableCell-list of this tableRow + @return the newly Created XWPFTableCell + + + Adds a new TableCell at the end of this tableRow + + + This element specifies the height of the current table row within the + current table. This height shall be used to determine the resulting + height of the table row, which may be absolute or relative (depending on + its attribute values). If omitted, then the table row shall automatically + resize its height to the height required by its contents (the equivalent + of an hRule value of auto). + + @return height + + + create and return a list of all XWPFTableCell + who belongs to this row + @return a list of {@link XWPFTableCell} + + + create and return a list of all XWPFTableCell + who belongs to this row + @return a list of {@link XWPFTableCell} + + + returns the XWPFTableCell which belongs to the CTTC cell + if there is no XWPFTableCell which belongs to the parameter CTTc cell null will be returned + + + Return true if the "can't split row" value is true. The logic for this + attribute is a little unusual: a TRUE value means DON'T allow rows to + split, FALSE means allow rows to split. + @return true if rows can't be split, false otherwise. + + + Return true if a table's header row should be repeated at the top of a + table split across pages. + @return true if table's header row should be repeated at the top of each + page of table, false otherwise. + + + + Create Accent + + + + + + Create n-ary Operator Object + + + + + + Subscript Object + + + + + + Superscript Object + + + + + + Fraction Object + + + + + + Radical Object + + + + + + Accent + This element specifies the accent function, consisting of a base + and a combining diacritical mark. If accPr is + omitted, the default accent is U+0302 (COMBINING CIRCUMFLEX ACCENT). + + + + + Single char or UTF, like: ̃ + + + + + This tag, which is an abbreviation for “element”, serves several functions (18 total) including that of the base + argument of a mathematical object or function, the elements in an array, and the elements in boxes.If all + subelements are omitted, this element specifies the presence of an empty argument. + + + + + Radical Object + This element specifies the radical object, consisting of a radical, a base e, and an optional degree deg. [Example: + Example of rad are √𝑥 + + + + + This element specifies the degree in the mathematical radical. This element is optional. When omitted, the + square root function, as in √𝑥, is assumed. + + + + + Radical expression element. + + + + + Fraction Object + This element specifies the fraction object, consisting of a numerator and denominator separated by a fraction + bar.The fraction bar can be horizontal or diagonal, depending on the fraction properties.The fraction object is + also used to represent the stack function, which places one element above another, with no fraction bar. + + + + + This element specifies the properties of the fraction object f. Properties of the Fraction object include the type + or style of the fraction.The fraction bar can be horizontal or diagonal, depending on the fraction properties.The + fraction object is also used to represent the stack function, which places one element above another, with no + fraction bar. + + + + + This element specifies the numerator of the Fraction object f + + + + + This element specifies the denominator of a fraction + + + + + n-ary Operator Object + This element specifies an n-ary object, consisting of an n-ary object, a base (or operand), and optional upper and + lower limits + + + + + This tag, which is an abbreviation for “element”, serves several functions (18 total) including that of the base + argument of a mathematical object or function, the elements in an array, and the elements in boxes.If all + subelements are omitted, this element specifies the presence of an empty argument. + + + + + This element specifies the subscript of the Pre-Sub-Superscript object sPre + + + + + This element specifies the superscript of the superscript object sSup. + + + + + Get Nary symbol + + + + + Sets ∑ char + + + + + Sets ⋃ char + + + + + Sets ∫ char + + + + + Sets ⋀ char + + + + For isBold, isItalic etc + + + + Specifies the fonts which shall be used to display the text contents of + this run.The default handling for fcr == null is to overwrite the + ascii font char range with the given font family and also set all not + specified font ranges + + fontFamily + FontCharRange or null for default handling + + + + Gets the font family for the specified font char range. + If fcr is null, the font char range "ascii" is used + Please use "Cambria Math"(set as default) font otherwise MS Word + don't open file, LibreOffice Writer open it normaly. + I think this is MS Word bug, because this is not standart. + + the font char range, defaults to "ansi" + a string representing the font famil + + + + Sets the text of this text run + + the literal text which shall be displayed in the document + + + + Sets the text of this text run.in the + + the literal text which shall be displayed in the document + position in the text array (NB: 0 based) + + + + Add the xml:spaces="preserve" attribute if the string has leading or trailing white spaces + + the string to check + + + + Subscript Object + his element specifies the subscript object sSub, which consists of a base e and a reduced-size scr placed below + and to the right, as in Xn + + + + + This tag, which is an abbreviation for “element”, serves several functions (18 total) including that of the base + argument of a mathematical object or function, the elements in an array, and the elements in boxes.If all + subelements are omitted, this element specifies the presence of an empty argument. + + + + + This element specifies the Superscript of the Pre-Sub-Superscript object sPre + + + + + Subscript Object + his element specifies the subscript object sSub, which consists of a base e and a reduced-size scr placed below + and to the right, as in Xn + + + + + This tag, which is an abbreviation for “element”, serves several functions (18 total) including that of the base + argument of a mathematical object or function, the elements in an array, and the elements in boxes.If all + subelements are omitted, this element specifies the presence of an empty argument. + + + + + This element specifies the subscript of the Pre-Sub-Superscript object sPre + + + + + Sets default font, size for text in the document. + + + +
    +
    diff --git a/DAL/bin/Debug/NPOI.OpenXml4Net.dll b/DAL/bin/Debug/NPOI.OpenXml4Net.dll new file mode 100644 index 0000000..0587a28 Binary files /dev/null and b/DAL/bin/Debug/NPOI.OpenXml4Net.dll differ diff --git a/DAL/bin/Debug/NPOI.OpenXml4Net.pdb b/DAL/bin/Debug/NPOI.OpenXml4Net.pdb new file mode 100644 index 0000000..381f487 Binary files /dev/null and b/DAL/bin/Debug/NPOI.OpenXml4Net.pdb differ diff --git a/DAL/bin/Debug/NPOI.OpenXml4Net.xml b/DAL/bin/Debug/NPOI.OpenXml4Net.xml new file mode 100644 index 0000000..8676c18 --- /dev/null +++ b/DAL/bin/Debug/NPOI.OpenXml4Net.xml @@ -0,0 +1,3189 @@ + + + + NPOI.OpenXml4Net + + + + Specifies the location where the X.509 certificate that is used in signing is stored. + + @author Julien Chable + + + The certificate is embedded in its own PackagePart. + + + The certificate is embedded in the SignaturePart that is created for the signature being added. + + + The certificate in not embedded in the package. + + + Storage class for configuration storage parameters. + TODO xml syntax checking is no longer done with DOM4j parser -> remove the schema or do it ? + + @author CDubettier, Julen Chable + @version 1.0 + + + Open Packaging Convention content types (see Annex F : Standard Namespaces + and Content Types). + + @author CDubettier define some constants, Julien Chable + + + Core Properties part. + + + Digital Signature Certificate part. + + + Digital Signature Origin part. + + + Digital Signature XML Signature part. + + + Relationships part. + + + Custom XML part. + + + Plain old xml. Note - OOXML uses application/xml, and not text/xml! + + + TIFF image format. + + @see + http://partners.adobe.com/public/developer/tiff/index.html#spec + + + Pict image format. + + @see + http://developer.apple.com/documentation/mac/QuickDraw/QuickDraw-2.html + + + XML file. + + + Specifies the encryption option for parts in a Package. + + @author Julien Chable + @version 0.1 + + + No encryption. + + + + Type in Type/Subtype. + + + Subtype + + + Parameters + + + Media type compiled pattern for parameters. + + + Media type compiled pattern, with parameters. + + + Pattern to match on just the parameters part, to work + around the Java Regexp group capture behaviour + + + Constructor. Check the input with the RFC 2616 grammar. + + @param contentType + The content type to store. + @throws InvalidFormatException + If the specified content type is not valid with RFC 2616. + + + Get the subtype. + + @return The subtype of this content type. + + + Get the type. + + @return The type of this content type. + + + Does this content type have any parameters associated with it? + + + Return the parameter keys + + + Gets the value associated to the specified key. + + @param key + The key of the key/value pair. + @return The value associated to the specified key. + + + Manage package content types ([Content_Types].xml part). + + @author Julien Chable + @version 1.0 + + + Content type part name. + + + Content type namespace + + + Reference to the package using this content type manager. + + + + Override content type tree. + + + Constructor. Parses the content of the specified input stream. + + @param in + If different of null then the content types part is + retrieve and parse. + @throws InvalidFormatException + If the content types part content is not valid. + + + Build association extention-> content type (will be stored in + [Content_Types].xml) for example ContentType="image/png" Extension="png" +

    + [M2.8]: When adding a new part to a package, the package implementer + shall ensure that a content type for that part is specified in the + Content Types stream; the package implementer shall perform the steps + described in §9.1.2.3: +

    + 1. Get the extension from the part name by taking the substring to the + right of the rightmost occurrence of the dot character (.) from the + rightmost segment. +

    + 2. If a part name has no extension, a corresponding Override element + shall be added to the Content Types stream. +

    + 3. Compare the resulting extension with the values specified for the + Extension attributes of the Default elements in the Content Types stream. + The comparison shall be case-insensitive ASCII. +

    + 4. If there is a Default element with a matching Extension attribute, + then the content type of the new part shall be compared with the value of + the ContentType attribute. The comparison might be case-sensitive and + include every character regardless of the role it plays in the + content-type grammar of RFC 2616, or it might follow the grammar of RFC + 2616. +

    + a. If the content types match, no further action is required. +

    + b. If the content types do not match, a new Override element shall be + added to the Content Types stream. . +

    + 5. If there is no Default element with a matching Extension attribute, a + new Default element or Override element shall be added to the Content + Types stream. +

    +
    + + Add an override content type for a specific part. + + @param partName + Name of the part. + @param contentType + Content type of the part. + + + Add a content type associated with the specified extension. + + @param extension + The part name extension to bind to a content type. + @param contentType + The content type associated with the specified extension. + + +

    + Delete a content type based on the specified part name. If the specified + part name is register with an override content type, then this content + type is remove, else the content type is remove in the default content + type list if it exists and if no part is associated with it yet. +

    + Check rule M2.4: The package implementer shall require that the Content + Types stream contain one of the following for every part in the package: + One matching Default element One matching Override element Both a + matching Default element and a matching Override element, in which case + the Override element takes precedence. +

    + @param partName + The part URI associated with the override content type to + delete. + @exception InvalidOperationException + Throws if +
    + + Check if the specified content type is already register. + + @param contentType + The content type to check. + @return true if the specified content type is already + register, then false. + + + Get the content type for the specified part, if any. +

    + Rule [M2.9]: To get the content type of a part, the package implementer + shall perform the steps described in §9.1.2.4: +

    + 1. Compare the part name with the values specified for the PartName + attribute of the Override elements. The comparison shall be + case-insensitive ASCII. +

    + 2. If there is an Override element with a matching PartName attribute, + return the value of its ContentType attribute. No further action is + required. +

    + 3. If there is no Override element with a matching PartName attribute, + then a. Get the extension from the part name by taking the substring to + the right of the rightmost occurrence of the dot character (.) from the + rightmost segment. b. Check the Default elements of the Content Types + stream, comparing the extension with the value of the Extension + attribute. The comparison shall be case-insensitive ASCII. +

    + 4. If there is a Default element with a matching Extension attribute, + return the value of its ContentType attribute. No further action is + required. +

    + 5. If neither Override nor Default elements with matching attributes are + found for the specified part name, the implementation shall not map this + part name to a part. +

    + @param partName + The URI part to check. + @return The content type associated with the URI (in case of an override + content type) or the extension (in case of default content type), + else null. + + @exception OpenXml4NetRuntimeException + Throws if the content type manager is not able to find the + content from an existing part. +
    + + Clear all content types. + + + Clear all override content types. + + + + Parse the content types part. + + @throws InvalidFormatException + Throws if the content type doesn't exist or the XML format is + invalid. + + + Save the contents type part. + + @param outStream + The output stream use to save the XML content of the content + types part. + @return true if the operation success, else false. + + + Use to Append specific type XML elements, use by the save() method. + + @param root + XML parent element use to Append this override type element. + @param entry + The values to Append. + @see #save(java.io.OutputStream) + + + Use to Append default types XML elements, use by the save() metid. + + @param root + XML parent element use to Append this default type element. + @param entry + The values to Append. + @see #save(java.io.OutputStream) + + + Specific implementation of the save method. Call by the save() method, + call before exiting. + + @param out + The output stream use to write the content type XML. + + + Provide useful method to manage file. + + @author Julien Chable + @version 0.1 + + + Get the directory part of the specified file path. + + @param f + File to process. + @return The directory path from the specified + + + Copy a file. + + @param in + The source file. + @param out + The target location. + @throws IOException + If an I/O error occur. + + + Get file name from the specified File object. + + + Default marshaller that specified that the part is responsible to marshall its content. + + @author Julien Chable + @version 1.0 + @see PartMarshaller + + + Save part in the output stream by using the save() method of the part. + + @throws OpenXml4NetException + If any error occur. + + + Package properties marshaller. + + @author CDubet, Julien Chable + + + Marshall package core properties to an XML document. Always return + true. + + + Add category property element if needed. + + + Add content status property element if needed. + + + Add content type property element if needed. + + + Add created property element if needed. + + + Add creator property element if needed. + + + Add description property element if needed. + + + Add identifier property element if needed. + + + Add keywords property element if needed. + + + Add language property element if needed. + + + Add 'last modified by' property if needed. + + + Add 'last printed' property if needed. + + + + Add modified property element if needed. + + + Add revision property if needed. + + + Add subject property if needed. + + + Add title property if needed. + + + Package core properties marshaller specialized for zipped package. + + @author Julien Chable + + + Zip part marshaller. This marshaller is use to save any part in a zip stream. + + @author Julien Chable + + + Save the specified part. + + @throws OpenXml4NetException + Throws if an internal exception is thrown. + + + Save relationships into the part. + + @param rels + The relationships collection to marshall. + @param relPartName + Part name of the relationship part to marshall. + @param zos + Zip output stream in which to save the XML content of the + relationships serialization. + + + Storage for the part data. + + + Constructor. + + @param pack + The owner package. + @param partName + The part name. + @param contentType + The content type. + @throws InvalidFormatException + If the specified URI is not OPC compliant. + + + Constructor. + + @param pack + The owner package. + @param partName + The part name. + @param contentType + The content type. + @param loadRelationships + Specify if the relationships will be loaded. + @throws InvalidFormatException + If the specified URI is not OPC compliant. + + + Close this stream and flush the content. + @see #flush() + + + Flush this output stream. This method is called by the close() method. + Warning : don't call this method for output consistency. + @see #close() + + + Represents the core properties part of a package. + + @author Julien Chable + @version 1.0 + + + Constructor. + + @param pack + Container package. + @param partName + Name of this part. + @throws InvalidFormatException + Throws if the content is invalid. + + + A categorization of the content of this package. + + [Example: Example values for this property might include: Resume, Letter, + Financial Forecast, Proposal, Technical Presentation, and so on. This + value might be used by an application's user interface to facilitate + navigation of a large Set of documents. end example] + + + The status of the content. + + [Example: Values might include "Draft", "Reviewed", and "Final". end + example] + + + The type of content represented, generally defined by a specific use and + intended audience. + + [Example: Values might include "Whitepaper", "Security Bulletin", and + "Exam". end example] [Note: This property is distinct from MIME content + types as defined in RFC 2616. end note] + + + Date of creation of the resource. + + + An entity primarily responsible for making the content of the resource. + + + An explanation of the content of the resource. + + [Example: Values might include an abstract, table of contents, reference + to a graphical representation of content, and a free-text account of the + content. end example] + + + An unambiguous reference to the resource within a given context. + + + A delimited Set of keywords to support searching and indexing. This is + typically a list of terms that are not available elsewhere in the + properties. + + + The language of the intellectual content of the resource. + + [Note: IETF RFC 3066 provides guidance on encoding to represent + languages. end note] + + + The user who performed the last modification. The identification is + environment-specific. + + [Example: A name, email address, or employee ID. end example] It is + recommended that this value be as concise as possible. + + + The date and time of the last printing. + + + Date on which the resource was changed. + + + The revision number. + + [Example: This value might indicate the number of saves or revisions, + provided the application updates it after each revision. end example] + + + The topic of the content of the resource. + + + The name given to the resource. + + + The version number. This value is Set by the user or by the application. + + + Get the category property. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getCategoryProperty() + + + Get content status. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getContentStatusProperty() + + + Get content type. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getContentTypeProperty() + + + Get created date. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getCreatedProperty() + + + Get created date formated into a String. + + @return A string representation of the created date. + + + Get creator. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getCreatorProperty() + + + Get description. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getDescriptionProperty() + + + Get identifier. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getIdentifierProperty() + + + Get keywords. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getKeywordsProperty() + + + Get the language. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getLanguageProperty() + + + Get the author of last modifications. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getLastModifiedByProperty() + + + Get last printed date. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getLastPrintedProperty() + + + Get last printed date formated into a String. + + @return A string representation of the last printed date. + + + Get modified date. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getModifiedProperty() + + + Get modified date formated into a String. + + @return A string representation of the modified date. + + + Get revision. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getRevisionProperty() + + + Get subject. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getSubjectProperty() + + + Get title. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getTitleProperty() + + + Get version. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#getVersionProperty() + + + Set the category. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setCategoryProperty(java.lang.String) + + + Set the content status. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setContentStatusProperty(java.lang.String) + + + Set the content type. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setContentTypeProperty(java.lang.String) + + + Set the created date. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setCreatedProperty(org.apache.poi.OpenXml4Net.util.Nullable) + + + Set the created date. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setCreatedProperty(org.apache.poi.OpenXml4Net.util.Nullable) + + + Set the creator. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setCreatorProperty(java.lang.String) + + + Set the description. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setDescriptionProperty(java.lang.String) + + + Set identifier. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setIdentifierProperty(java.lang.String) + + + Set keywords. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setKeywordsProperty(java.lang.String) + + + Set language. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setLanguageProperty(java.lang.String) + + + Set last modifications author. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setLastModifiedByProperty(java.lang.String) + + + Set last printed date. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setLastPrintedProperty(org.apache.poi.OpenXml4Net.util.Nullable) + + + Set last printed date. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setLastPrintedProperty(org.apache.poi.OpenXml4Net.util.Nullable) + + + Set last modification date. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setModifiedProperty(org.apache.poi.OpenXml4Net.util.Nullable) + + + Set last modification date. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setModifiedProperty(org.apache.poi.OpenXml4Net.util.Nullable) + + + Set revision. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setRevisionProperty(java.lang.String) + + + Set subject. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setSubjectProperty(java.lang.String) + + + Set title. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setTitleProperty(java.lang.String) + + + Set version. + + @see org.apache.poi.OpenXml4Net.opc.PackageProperties#setVersionProperty(java.lang.String) + + + Convert a strig value into a String + + + Convert a string value represented a date into a DateTime?. + + @throws InvalidFormatException + Throws if the date format isnot valid. + + + Convert a DateTime? into a String. + + @param d + The Date to convert. + @return The formated date or null. + @see java.util.SimpleDateFormat + + + Object implemented this interface are considered as part marshaller. A part + marshaller is responsible to marshall a part in order to be save in a + package. + + @author Julien Chable + @version 0.1 + + + Save the content of the package in the stream + + @param part + Part to marshall. + @param out + The output stream into which the part will be marshall. + @return false if any marshall error occurs, else true + @throws OpenXml4NetException + Throws only if any other exceptions are thrown by inner + methods. + + + Object implemented this interface are considered as part unmarshaller. A part + unmarshaller is responsible to unmarshall a part in order to load it from a + package. + + @author Julien Chable + @version 0.1 + + + Save the content of the package in the stream + + @param in + The input stream from which the part will be unmarshall. + @return The part freshly unmarshall from the input stream. + @throws OpenXml4NetException + Throws only if any other exceptions are thrown by inner + methods. + + + Package properties unmarshaller. + + @author Julien Chable + @version 1.0 + + + + Context needed for the unmarshall process of a part. This class is immutable. + + @author Julien Chable + @version 1.0 + + + Constructor. + + @param targetPackage + Container. + @param partName + Name of the part to unmarshall. + + + @return the container + + + @return the partName + + + @return the zipEntry + + + Zip implementation of the ContentTypeManager. + + @author Julien Chable + @version 1.0 + @see ContentTypeManager + + + Delegate constructor to the super constructor. + + @param in + The input stream to parse to fill internal content type + collections. + @throws InvalidFormatException + If the content types part content is not valid. + + + Forward slash use to convert part name between OPC and zip item naming + conventions. + + + Buffer to read data from file. Use big buffer to improve performaces. the + InputStream class is reading only 8192 bytes per read call (default value + set by sun) + + + Prevent this class to be instancied. + + + Retrieve the zip entry of the core properties part. + + @throws OpenXml4NetException + Throws if internal error occurs. + + + Retrieve the Zip entry of the content types part. + + + Convert a zip name into an OPC name by adding a leading forward slash to + the specified item name. + + @param zipItemName + Zip item name to convert. + @return An OPC compliant name. + + + Convert an OPC item name into a zip item name by removing any leading + forward slash if it exist. + + @param opcItemName + The OPC item name to convert. + @return A zip item name without any leading slashes. + + + Convert an OPC item name into a zip URI by removing any leading forward + slash if it exist. + + @param opcItemName + The OPC item name to convert. + @return A zip URI without any leading slashes. + + + Verifies that the given stream starts with a Zip structure. + + Warning - this will consume the first few bytes of the stream, + you should push-back or reset the stream after use! + + + Opens the specified stream as a secure zip + + @param stream + The stream to open. + @return The zip stream freshly open. + + + Opens the specified file as a zip, or returns null if no such file exists + + @param file + The file to open. + @return The zip archive freshly open. + + + Retrieve and open a zip file with the specified path. + + @param path + The file path. + @return The zip archive freshly open. + + + Represents a container that can store multiple data objects. + + @author Julien Chable, CDubet + @version 0.1 + + + Logger. + + + Default package access. + + + Package access. + + + Package parts collection. + + + Package relationships. + + + Part marshallers by content type. + + + Default part marshaller. + + + Part unmarshallers by content type. + + + Core package properties. + + + Manage parts content types of this package. + + + Flag if a modification is done to the document. + + + File path of this package. + + + Output stream for writing this package. + + + Constructor. + + @param access + Package access. + + + Initialize the package instance. + + + Open a package with read/write permission. + + @param path + The document path. + @return A Package object, else null. + @throws InvalidFormatException + If the specified file doesn't exist, and a parsing error + occur. + + + Open a package with read/write permission. + + @param file + The file to open. + @return A Package object, else null. + @throws InvalidFormatException + If the specified file doesn't exist, and a parsing error + occur. + + + Open an user provided {@link ZipEntrySource} with read-only permission. + This method can be used to stream data into POI. + Opposed to other open variants, the data is read as-is, e.g. there aren't + any zip-bomb protection put in place. + + @param zipEntry the custom source + @return A Package object + @ if a parsing error occur. + + + Open a package. + + @param path + The document path. + @param access + PackageBase access. + @return A PackageBase object, else null. + @throws InvalidFormatException + If the specified file doesn't exist, and a parsing error + occur. + + + Open a package. + + @param file + The file to open. + @param access + PackageBase access. + @return A PackageBase object, else null. + @throws InvalidFormatException + If the specified file doesn't exist, and a parsing error + occur. + + + Open a package. + + Note - uses quite a bit more memory than {@link #open(String)}, which + doesn't need to hold the whole zip file in memory, and can take advantage + of native methods + + @param in + The InputStream to read the package from + @return A PackageBase object + + + Opens a package if it exists, else it Creates one. + + @param file + The file to open or to Create. + @return A newly Created package if the specified file does not exist, + else the package extract from the file. + @throws InvalidFormatException + Throws if the specified file exist and is not valid. + + + Creates a new package. + + @param file + Path of the document. + @return A newly Created PackageBase ready to use. + + + Configure the package. + + @param pkg + + + Flush the package : save all. + + @see #close() + + + Close the package and save its content. + + @throws IOException + If an IO exception occur during the saving process. + + + Close the package WITHOUT saving its content. Reinitialize this package + and cancel all changes done to it. + + + + Add a thumbnail to the package. This method is provided to make easier + the addition of a thumbnail in a package. You can do the same work by + using the traditionnal relationship and part mechanism. + + path The full path to the image file. + + + + Add a thumbnail to the package. This method is provided to make easier + the addition of a thumbnail in a package. You can do the same work by + using the traditionnal relationship and part mechanism. + + + + + + Throws an exception if the package access mode is in read only mode + (PackageAccess.Read). + + @throws InvalidOperationException + Throws if a writing operation is done on a read only package. + @see org.apache.poi.OpenXml4Net.opc.PackageAccess + + + Throws an exception if the package access mode is in write only mode + (PackageAccess.Write). This method is call when other methods need write + right. + + @throws InvalidOperationException + Throws if a read operation is done on a write only package. + @see org.apache.poi.OpenXml4Net.opc.PackageAccess + + + Retrieves or Creates if none exists, core package property part. + + @return The PackageProperties part of this package. + + + Retrieve a part identified by its name. + + @param PartName + Part name of the part to retrieve. + @return The part with the specified name, else null. + + + Retrieve parts by content type. + + @param contentType + The content type criteria. + @return All part associated to the specified content type. + + + Retrieve parts by relationship type. + + @param relationshipType + Relationship type. + @return All parts which are the target of a relationship with the + specified type, if the method can't retrieve relationships from + the package, then return null. + + + Retrieve parts by name + + @param namePattern + The pattern for matching the names + @return All parts associated to the specified content type, sorted + in alphanumerically by the part-name + + + Get the target part from the specified relationship. + + @param partRel + The part relationship uses to retrieve the part. + + + Load the parts of the archive if it has not been done yet. The + relationships of each part are not loaded. + Note - Rule M4.1 states that there may only ever be one Core + Properties Part, but Office produced files will sometimes + have multiple! As Office ignores all but the first, we relax + Compliance with Rule M4.1, and ignore all others silently too. + @return All this package's parts. + + + Create and Add a part, with the specified name and content type, to the + package. + + @param PartName + Part name. + @param contentType + Part content type. + @return The newly Created part. + @throws InvalidFormatException + If rule M1.12 is not verified : Packages shall not contain + equivalent part names and package implementers shall neither + Create nor recognize packages with equivalent part names. + @see #CreatePartImpl(PackagePartName, String, bool) + + + Create and Add a part, with the specified name and content type, to the + package. For general purpose, prefer the overload version of this method + without the 'loadRelationships' parameter. + + @param PartName + Part name. + @param contentType + Part content type. + @param loadRelationships + Specify if the existing relationship part, if any, logically + associated to the newly Created part will be loaded. + @return The newly Created part. + @throws InvalidFormatException + If rule M1.12 is not verified : Packages shall not contain + equivalent part names and package implementers shall neither + Create nor recognize packages with equivalent part names. + @see {@link#CreatePartImpl(URI, String)} + + + Add a part to the package. + + @param PartName + Part name of the part to Create. + @param contentType + type associated with the file + @param content + the contents to Add. In order to have faster operation in + document merge, the data are stored in memory not on a hard + disk + + @return The new part. + @see #CreatePart(PackagePartName, String) + + + Add the specified part to the package. If a part already exists in the + package with the same name as the one specified, then we replace the old + part by the specified part. + + @param part + The part to Add (or replace). + @return The part Added to the package, the same as the one specified. + @throws InvalidFormatException + If rule M1.12 is not verified : Packages shall not contain + equivalent part names and package implementers shall neither + Create nor recognize packages with equivalent part names. + + + Remove the specified part in this package. If this part is relationship + part, then delete all relationships in the source part. + + @param part + The part to Remove. If null, skip the action. + @see #RemovePart(PackagePartName) + + + Remove a part in this package. If this part is relationship part, then + delete all relationships in the source part. + + @param PartName + The part name of the part to Remove. + + + Remove a part from this package as well as its relationship part, if one + exists, and all parts listed in the relationship part. Be aware that this + do not delete relationships which target the specified part. + + @param PartName + The name of the part to delete. + @throws InvalidFormatException + Throws if the associated relationship part of the specified + part is not valid. + + + Delete the part with the specified name and its associated relationships + part if one exists. Prefer the use of this method to delete a part in the + package, compare to the Remove() methods that don't Remove associated + relationships part. + + @param PartName + Name of the part to delete + + + Delete the part with the specified name and all part listed in its + associated relationships part if one exists. This process is recursively + apply to all parts in the relationships part of the specified part. + Prefer the use of this method to delete a part in the package, compare to + the Remove() methods that don't Remove associated relationships part. + + @param PartName + Name of the part to delete + + + Check if a part already exists in this package from its name. + + @param PartName + Part name to check. + @return true if the part is logically Added to this package, else + false. + + + Add a relationship to the package (except relationships part). + + Check rule M4.1 : The format designer shall specify and the format + producer shall Create at most one core properties relationship for a + package. A format consumer shall consider more than one core properties + relationship for a package to be an error. If present, the relationship + shall target the Core Properties part. + + Check rule M1.25: The Relationships part shall not have relationships to + any other part. Package implementers shall enforce this requirement upon + the attempt to Create such a relationship and shall treat any such + relationship as invalid. + + @param targetPartName + Target part name. + @param targetMode + Target mode, either Internal or External. + @param relationshipType + Relationship type. + @param relID + ID of the relationship. + @see PackageRelationshipTypes + + + Add a package relationship. + + @param targetPartName + Target part name. + @param targetMode + Target mode, either Internal or External. + @param relationshipType + Relationship type. + @see PackageRelationshipTypes + + + Adds an external relationship to a part (except relationships part). + + The targets of external relationships are not subject to the same + validity checks that internal ones are, as the contents is potentially + any file, URL or similar. + + @param target + External target of the relationship + @param relationshipType + Type of relationship. + @return The newly Created and Added relationship + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#AddExternalRelationship(java.lang.String, + java.lang.String) + + + Adds an external relationship to a part (except relationships part). + + The targets of external relationships are not subject to the same + validity checks that internal ones are, as the contents is potentially + any file, URL or similar. + + @param target + External target of the relationship + @param relationshipType + Type of relationship. + @param id + Relationship unique id. + @return The newly Created and Added relationship + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#AddExternalRelationship(java.lang.String, + java.lang.String) + + + Delete a relationship from this package. + + @param id + Id of the relationship to delete. + + + Retrieves all package relationships. + + @return All package relationships of this package. + @throws OpenXml4NetException + @see #GetRelationshipsHelper(String) + + + Retrieves all relationships with the specified type. + + @param relationshipType + The filter specifying the relationship type. + @return All relationships with the specified relationship type. + + + Retrieves all relationships with specified id (normally just ine because + a relationship id is supposed to be unique). + + @param id + Id of the wanted relationship. + + + Clear package relationships. + + + Ensure that the relationships collection is not null. + + + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#GetRelationship(java.lang.String) + + + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#hasRelationships() + + + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#isRelationshipExists(org.apache.poi.OpenXml4Net.opc.PackageRelationship) + + + Add a marshaller. + + @param contentType + The content type to bind to the specified marshaller. + @param marshaller + The marshaller to register with the specified content type. + + + Add an unmarshaller. + + @param contentType + The content type to bind to the specified unmarshaller. + @param unmarshaller + The unmarshaller to register with the specified content type. + + + Remove a marshaller by its content type. + + @param contentType + The content type associated with the marshaller to Remove. + + + Remove an unmarshaller by its content type. + + @param contentType + The content type associated with the unmarshaller to Remove. + + + Get the package access mode. + + @return the packageAccess The current package access. + + + Validates the package compliance with the OPC specifications. + + @return true if the package is valid else false + + + Save the document in the specified file. + + @param targetFile + Destination file. + @throws IOException + Throws if an IO exception occur. + @see #save(OutputStream) + + + Save the document in the specified output stream. + + @param outputStream + The stream to save the package. + @see #saveImpl(OutputStream) + + + Core method to Create a package part. This method must be implemented by + the subclass. + + @param PartName + URI of the part to Create. + @param contentType + Content type of the part to Create. + @return The newly Created package part. + + + Core method to delete a package part. This method must be implemented by + the subclass. + + @param PartName + The URI of the part to delete. + + + Flush the package but not save. + + + Close the package and cause a save of the package. + + + + Close the package without saving the document. Discard all changes made + to this package. + + + Save the package into the specified output stream. + + @param outputStream + The output stream use to save this package. + + + Get the package part mapped to the specified URI. + + @param PartName + The URI of the part to retrieve. + @return The package part located by the specified URI, else null. + + + Get all parts link to the package. + + @return A list of the part owned by the package. + + + Replace a content type in this package. + +

    + A typical scneario to call this method is to rename a template file to the main format, e.g. + ".dotx" to ".docx" + ".dotm" to ".docm" + ".xltx" to ".xlsx" + ".xltm" to ".xlsm" + ".potx" to ".pptx" + ".potm" to ".pptm" +

    + For example, a code converting a .xlsm macro workbook to .xlsx would look as follows: +

    +

    
    +            
    +                 OPCPackage pkg = OPCPackage.open(new FileInputStream("macro-workbook.xlsm"));
    +                 pkg.replaceContentType(
    +                     "application/vnd.ms-excel.sheet.macroEnabled.main+xml",
    +                     "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml");
    +            
    +                 FileOutputStream out = new FileOutputStream("workbook.xlsx");
    +                 pkg.save(out);
    +                 out.close();
    +            
    +                
    +

    + + @param oldContentType the content type to be replaced + @param newContentType the replacement + @return whether replacement was succesfull + @since POI-3.8 +
    + + Add the specified part, and register its content type with the content + type manager. + + @param part + The part to add. + + + Remove the specified part, and clear its content type from the content + type manager. + + @param partName + The part name of the part to remove. + + + Specifies package access. + + @author Julien Chable + @version 1.0 + + + Read only. Write not authorized. + + + Write only. Read not authorized. + + + Read and Write mode. + + + Open Packaging Convention namespaces URI. + + @author Julien Chable + @version 1.0 + + + Dublin Core Terms URI. + + + Dublin Core namespace URI. + + + Content Types. + + + Core Properties. + + + Digital Signatures. + + + Relationships. + + + Markup Compatibility. + + + Provides a base class for parts stored in a Package. + + @author Julien Chable + @version 0.9 + + + This part's container. + + + The part name. (required by the specification [M1.1]) + + + The type of content of this part. (required by the specification [M1.2]) + + + Flag to know if this part is a relationship. + + + Flag to know if this part has been logically deleted. + + + This part's relationships. + + + Constructor. + + @param pack + Parent package. + @param partName + The part name, relative to the parent Package root. + @param contentType + The content type. + @throws InvalidFormatException + If the specified URI is not valid. + + + Constructor. + + @param pack + Parent package. + @param partName + The part name, relative to the parent Package root. + @param contentType + The content type. + @param loadRelationships + Specify if the relationships will be loaded + @throws InvalidFormatException + If the specified URI is not valid. + + + Constructor. + + @param pack + Parent package. + @param partName + The part name, relative to the parent Package root. + @param contentType + The Multipurpose Internet Mail Extensions (MIME) content type + of the part's data stream. + + + + Check if the new part was already added before via PackagePart.addRelationship() + + to find the relationship for + The existing relationship, or null if there isn't yet one + + + Adds an external relationship to a part (except relationships part). + + The targets of external relationships are not subject to the same + validity checks that internal ones are, as the contents is potentially + any file, URL or similar. + + @param target + External target of the relationship + @param relationshipType + Type of relationship. + @return The newly created and added relationship + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#addExternalRelationship(java.lang.String, + java.lang.String) + + + Adds an external relationship to a part (except relationships part). + + The targets of external relationships are not subject to the same + validity checks that internal ones are, as the contents is potentially + any file, URL or similar. + + @param target + External target of the relationship + @param relationshipType + Type of relationship. + @param id + Relationship unique id. + @return The newly created and added relationship + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#addExternalRelationship(java.lang.String, + java.lang.String) + + + Add a relationship to a part (except relationships part). + + @param targetPartName + Name of the target part. This one must be relative to the + source root directory of the part. + @param targetMode + Mode [Internal|External]. + @param relationshipType + Type of relationship. + @return The newly created and added relationship + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#AddRelationship(org.apache.poi.OpenXml4Net.opc.PackagePartName, + org.apache.poi.OpenXml4Net.opc.TargetMode, java.lang.String) + + + Add a relationship to a part (except relationships part). +

    + Check rule M1.25: The Relationships part shall not have relationships to + any other part. Package implementers shall enforce this requirement upon + the attempt to create such a relationship and shall treat any such + relationship as invalid. +

    + @param targetPartName + Name of the target part. This one must be relative to the + source root directory of the part. + @param targetMode + Mode [Internal|External]. + @param relationshipType + Type of relationship. + @param id + Relationship unique id. + @return The newly created and added relationship + + @throws InvalidFormatException + If the URI point to a relationship part URI. + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#AddRelationship(org.apache.poi.OpenXml4Net.opc.PackagePartName, + org.apache.poi.OpenXml4Net.opc.TargetMode, java.lang.String, java.lang.String) +
    + + Add a relationship to a part (except relationships part). + + @param targetURI + URI the target part. Must be relative to the source root + directory of the part. + @param targetMode + Mode [Internal|External]. + @param relationshipType + Type of relationship. + @return The newly created and added relationship + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#AddRelationship(org.apache.poi.OpenXml4Net.opc.PackagePartName, + org.apache.poi.OpenXml4Net.opc.TargetMode, java.lang.String) + + + Add a relationship to a part (except relationships part). +

    + Check rule M1.25: The Relationships part shall not have relationships to + any other part. Package implementers shall enforce this requirement upon + the attempt to create such a relationship and shall treat any such + relationship as invalid. +

    + @param targetURI + URI of the target part. Must be relative to the source root + directory of the part. + @param targetMode + Mode [Internal|External]. + @param relationshipType + Type of relationship. + @param id + Relationship unique id. + @return The newly created and added relationship + + @throws InvalidFormatException + If the URI point to a relationship part URI. + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#AddRelationship(org.apache.poi.OpenXml4Net.opc.PackagePartName, + org.apache.poi.OpenXml4Net.opc.TargetMode, java.lang.String, java.lang.String) +
    + + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#clearRelationships() + + + Delete the relationship specified by its id. + + @param id + The ID identified the part to delete. + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#removeRelationship(java.lang.String) + + + Retrieve all the relationships attached to this part. + + @return This part's relationships. + @throws OpenXml4NetException + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#getRelationships() + + + Retrieves a package relationship from its id. + + @param id + ID of the package relationship to retrieve. + @return The package relationship + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#getRelationship(java.lang.String) + + + Retrieve all relationships attached to this part which have the specified + type. + + @param relationshipType + Relationship type filter. + @return All relationships from this part that have the specified type. + @throws InvalidFormatException + If an error occurs while parsing the part. + @throws InvalidOperationException + If the package is open in write only mode. + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#getRelationshipsByType(java.lang.String) + + + Implementation of the getRelationships method(). + + @param filter + Relationship type filter. If null then the filter is + disabled and return all the relationships. + @return All relationships from this part that have the specified type. + @throws InvalidFormatException + Throws if an error occurs during parsing the relationships + part. + @throws InvalidOperationException + Throws if the package is open en write only mode. + @see #getRelationshipsByType(String) + + + Knows if the part have any relationships. + + @return true if the part have at least one relationship else + false. + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#hasRelationships() + + + Checks if the specified relationship is part of this package part. + + @param rel + The relationship to check. + @return true if the specified relationship exists in this part, + else returns false + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#isRelationshipExists(org.apache.poi.OpenXml4Net.opc.PackageRelationship) + + + Get the PackagePart that is the target of a relationship. + + @param rel A relationship from this part to another one + @return The target part of the relationship + + + Get the input stream of this part to read its content. + + @return The input stream of the content of this part, else + null. + + + Get the output stream of this part. If the part is originally embedded in + Zip package, it'll be transform intot a MemoryPackagePart in + order to write inside (the standard Java API doesn't allow to write in + the file) + + @see org.apache.poi.openxml4j.opc.internal.MemoryPackagePart + + + Throws an exception if this package part is a relationship part. + + @throws InvalidOperationException + If this part is a relationship part. + + + Ensure the package relationships collection instance is built. + + @throws InvalidFormatException + Throws if + + + @return the uri + + + @return the contentType + + + @return The Content Type, including parameters, of the part + + + @return true if this part is a relationship + + + @return true if this part has been logically deleted + + + @return The length of the part in bytes, or -1 if not known + + + Compare based on the package part name, using a natural sort order + + + Abtract method that get the input stream of this part. + + @exception IOException + Throws if an IO Exception occur in the implementation + method. + + + Abstract method that get the output stream of this part. + + + Save the content of this part and the associated relationships part (if + this part own at least one relationship) into the specified output + stream. + + @param zos + Output stream to save this part. + @throws OpenXml4NetException + If any exception occur. + + + Load the content of this part. + + @param ios + The input stream of the content to load. + @return true if the content has been successfully loaded, else + false. + @throws InvalidFormatException + Throws if the content format is invalid. + + + Close this part : flush this part, close the input stream and output + stream. After this method call, the part must be available for packaging. + + + Flush the content of this part. If the input stream and/or output stream + as in a waiting state to read or write, the must to empty their + respective buffer. + + + Allows sub-classes to clean up before new data is added. + + + A package part collection. + + @author Julien Chable + @version 0.1 + + + Arraylist use to store this collection part names as string for rule + M1.11 optimized checking. + + + Check rule [M1.11]: a package implementer shall neither create nor + recognize a part with a part name derived from another part name by + Appending segments to it. + + @exception InvalidOperationException + Throws if you try to add a part with a name derived from + another part name. + + + An immutable Open Packaging Convention compliant part name. + + @author Julien Chable + + @see http://www.ietf.org/rfc/rfc3986.txt + + + Part name stored as an URI. + + + Reserved characters for sub delimitations. + + + + Authorized reserved characters for pChar. + + + Flag to know if this part name is from a relationship part name. + + + Constructor. Makes a ValidPartName object from a java.net.URI + + @param uri + The URI to validate and to transform into ValidPartName. + @param checkConformance + Flag to specify if the contructor have to validate the OPC + conformance. Must be always true except for + special URI like '/' which is needed for internal use by + OpenXml4Net but is not valid. + @throws InvalidFormatException + Throw if the specified part name is not conform to Open + Packaging Convention specifications. + @see java.net.URI + + + Constructor. Makes a ValidPartName object from a String part name. + + @param partName + Part name to valid and to create. + @param checkConformance + Flag to specify if the contructor have to validate the OPC + conformance. Must be always true except for + special URI like '/' which is needed for internal use by + OpenXml4Net but is not valid. + @throws InvalidFormatException + Throw if the specified part name is not conform to Open + Packaging Convention specifications. + + + Check if the specified part name is a relationship part name. + + @param partUri + The URI to check. + @return true if this part name respect the relationship + part naming convention else false. + + + Know if this part name is a relationship part name. + + @return true if this part name respect the relationship + part naming convention else false. + + + Throws an exception (of any kind) if the specified part name does not + follow the Open Packaging Convention specifications naming rules. + + @param partUri + The part name to check. + @throws Exception + Throws if the part name is invalid. + + + Throws an exception if the specified URI is empty. [M1.1] + + @param partURI + Part URI to check. + @throws InvalidFormatException + If the specified URI is empty. + + + Throws an exception if the part name has empty segments. [M1.3] + + Throws an exception if a segment any characters other than pchar + characters. [M1.6] + + Throws an exception if a segment contain percent-encoded forward slash + ('/'), or backward slash ('\') characters. [M1.7] + + Throws an exception if a segment contain percent-encoded unreserved + characters. [M1.8] + + Throws an exception if the specified part name's segments end with a dot + ('.') character. [M1.9] + + Throws an exception if a segment doesn't include at least one non-dot + character. [M1.10] + + @param partUri + The part name to check. + @throws InvalidFormatException + if the specified URI contain an empty segments or if one the + segments contained in the part name, ends with a dot ('.') + character. + + + Throws an exception if a segment any characters other than pchar + characters. [M1.6] + + Throws an exception if a segment contain percent-encoded forward slash + ('/'), or backward slash ('\') characters. [M1.7] + + Throws an exception if a segment contain percent-encoded unreserved + characters. [M1.8] + + @param segment + The segment to check + + + Throws an exception if the specified part name doesn't start with a + forward slash character '/'. [M1.4] + + @param partUri + The part name to check. + @throws InvalidFormatException + If the specified part name doesn't start with a forward slash + character '/'. + + + Throws an exception if the specified part name ends with a forwar slash + character '/'. [M1.5] + + @param partUri + The part name to check. + @throws InvalidFormatException + If the specified part name ends with a forwar slash character + '/'. + + + Throws an exception if the specified URI is absolute. + + @param partUri + The URI to check. + @throws InvalidFormatException + Throws if the specified URI is absolute. + + + Compare two part name following the rule M1.12 : + + Part name equivalence is determined by comparing part names as + case-insensitive ASCII strings. Packages shall not contain equivalent + part names and package implementers shall neither create nor recognize + packages with equivalent part names. [M1.12] + + + Retrieves the extension of the part name if any. If there is no extension + returns an empty String. Example : '/document/content.xml' => 'xml' + + @return The extension of the part name. + + + Get this part name. + + @return The name of this part name. + + + Part name equivalence is determined by comparing part names as + case-insensitive ASCII strings. Packages shall not contain equivalent + part names and package implementers shall neither create nor recognize + packages with equivalent part names. [M1.12] + + + Part name property getter. + + @return This part name URI. + + + + + Represents the core properties of an OPC package. + + @author Julien Chable + @version 1.0 + @see org.apache.poi.OpenXml4Net.opc.OPCPackage + + + Set the category of the content of this package. + + + Set the category of the content of this package. + + + Set the status of the content. + + + Get the status of the content. + + + Get the type of content represented, generally defined by a specific use + and intended audience. + + + Set the type of content represented, generally defined by a specific use + and intended audience. + + + Get the date of creation of the resource. + + + Set the date of creation of the resource. + + + Set the date of creation of the resource. + + + Get the entity primarily responsible for making the content of the + resource. + + + Set the entity primarily responsible for making the content of the + resource. + + + Get the explanation of the content of the resource. + + + Set the explanation of the content of the resource. + + + Get an unambiguous reference to the resource within a given context. + + + Set an unambiguous reference to the resource within a given context. + + + Get a delimited Set of keywords to support searching and indexing. This + is typically a list of terms that are not available elsewhere in the + properties + + + Set a delimited Set of keywords to support searching and indexing. This + is typically a list of terms that are not available elsewhere in the + properties + + + Get the language of the intellectual content of the resource. + + + Set the language of the intellectual content of the resource. + + + Get the user who performed the last modification. + + + Set the user who performed the last modification. + + + Get the date and time of the last printing. + + + Set the date and time of the last printing. + + + Set the date and time of the last printing. + + + Get the date on which the resource was changed. + + + Set the date on which the resource was changed. + + + Set the date on which the resource was changed. + + + Get the revision number. + + + Set the revision number. + + + Get the topic of the content of the resource. + + + Set the topic of the content of the resource. + + + Get the name given to the resource. + + + Set the name given to the resource. + + + Get the version number. + + + Set the version number. + + + A part relationship. + + @author Julien Chable + @version 1.0 + + + Relation id. + + + Reference to the package. + + + Relationship type + + + Part of this relationship source + + + Targeting mode [Internal|External] + + + Target URI + + + Constructor. + + @param pkg + @param sourcePart + @param targetUri + @param targetMode + @param relationshipType + @param id + + + @return the container + + + @return the id + + + @return the relationshipType + + + @return the source + + + + @return URL of the source part of this relationship + + + public URI getSourceUri(){ } + + @return the targetMode + + + @return the targetUri + + + Represents a collection of PackageRelationship elements that are owned by a + given PackagePart or the Package. + + @author Julien Chable, CDubettier + @version 0.1 + + + Package relationships ordered by ID. + + + Package relationships ordered by type. + + + A lookup of internal relationships to avoid + + + This relationshipPart. + + + Source part. + + + This part name. + + + Reference to the package. + + + The ID number of the next rID# to generate, or -1 + if that is still to be determined. + + + Constructor. + + + Copy constructor. + + This collection will contain only elements from the specified collection + for which the type is compatible with the specified relationship type + filter. + + @param coll + Collection to import. + @param filter + Relationship type filter. + + + Constructor. + + + Constructor. + + @throws InvalidFormatException + Throws if the format of the content part is invalid. + + @throws InvalidOperationException + Throws if the specified part is a relationship part. + + + Constructor. Parse the existing package relationship part if one exists. + + @param container + The parent package. + @param part + The part that own this relationships collection. If null + then this part is considered as the package root. + @throws InvalidFormatException + If an error occurs during the parsing of the relatinships + part fo the specified part. + + + Get the relationship part name of the specified part. + + @param part + The part . + @return The relationship part name of the specified part. Be careful, + only the correct name is returned, this method does not check if + the part really exist in a package ! + @throws InvalidOperationException + Throws if the specified part is a relationship part. + + + Add the specified relationship to the collection. + + @param relPart + The relationship to add. + + + Add a relationship to the collection. + + @param targetUri + Target URI. + @param targetMode + The target mode : INTERNAL or EXTERNAL + @param relationshipType + Relationship type. + @param id + Relationship ID. + @return The newly created relationship. + @see PackageAccess + + + Remove a relationship by its ID. + + @param id + The relationship ID to Remove. + + + Remove a relationship by its reference. + + @param rel + The relationship to delete. + + + Retrieves a relationship by its index in the collection. + + @param index + Must be a value between [0-relationships_count-1] + + + Retrieves a package relationship based on its id. + + @param id + ID of the package relationship to retrieve. + @return The package relationship identified by the specified id. + + + Get the numbe rof relationships in the collection. + + + Parse the relationship part and add all relationship in this collection. + + @param relPart + The package part to parse. + @throws InvalidFormatException + Throws if the relationship part is invalid. + + + Retrieves all relations with the specified type. + + @param typeFilter + Relationship type filter. If null then all + relationships are returned. + @return All relationships of the type specified by the filter. + + + Get this collection's iterator. + + + Get an iterator of a collection with all relationship with the specified + type. + + @param typeFilter + Type filter. + @return An iterator to a collection containing all relationships with the + specified type contain in this collection. + + + Clear all relationships. + + + Relationship types. + + @author Julien Chable + @version 0.2 + + + Core properties relationship type. + +

    + The standard specifies a source relations ship for the Core File Properties part as follows: + http://schemas.openxmlformats.org/officedocument/2006/relationships/metadata/core-properties. +

    +

    + Office uses the following source relationship for the Core File Properties part: + http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties. +

    + See 2.1.33 Part 1 Section 15.2.11.1, Core File Properties Part in [MS-OE376].pdf +
    + + Core properties relationship type as defiend in ECMA 376. + + + Digital signature relationship type. + + + Digital signature certificate relationship type. + + + Digital signature origin relationship type. + + + Thumbnail relationship type. + + + Extended properties relationship type. + + + Extended properties relationship type for strict ooxml. + + + Custom properties relationship type. + + + Core document relationship type. + + + Core document relationship type for strict ooxml. + + + Custom XML relationship type. + + + Image type. + + + Hyperlink type. + + + Style type. + + + External Link to another Document + + + Visio 2010 VSDX equivalent of package {@link #CORE_DOCUMENT} + + + Helper for part and pack Uri. + + @author Julien Chable, CDubet, Kim Ung + @version 0.1 + + + Package root Uri. + + + Extension name of a relationship part. + + + Segment name of a relationship part. + + + Segment name of the package properties folder. + + + Core package properties art name. + + + Forward slash Uri separator. + + + Forward slash Uri separator. + + + Package relationships part Uri + + + Package relationships part name. + + + Core properties part Uri. + + + Core properties partname. + + + Root package Uri. + + + Root package part name. + + + Gets the Uri for the package root. + + @return Uri of the package root. + + + Know if the specified Uri is a relationship part name. + + @param partUri + Uri to check. + @return true if the Uri false. + + + Get file name from the specified Uri. + + + Get the file name without the trailing extension. + + + Get the directory path from the specified Uri. + + + Combine two URIs. + + @param prefix the prefix Uri + @param suffix the suffix Uri + + @return the Combined Uri + + + Combine a string Uri with a prefix and a suffix. + + + Fully relativize the source part Uri against the target part Uri. + + @param sourceURI + The source part Uri. + @param targetURI + The target part Uri. + @return A fully relativize part name Uri ('word/media/image1.gif', + '/word/document.xml' => 'media/image1.gif') else + null. + + + Fully relativize the source part URI against the target part URI. + + @param sourceURI + The source part URI. + @param targetURI + The target part URI. + @return A fully relativize part name URI ('word/media/image1.gif', + '/word/document.xml' => 'media/image1.gif') else + null. + + + Resolve a source uri against a target. + + @param sourcePartUri + The source Uri. + @param targetUri + The target Uri. + @return The resolved Uri. + + + Get Uri from a string path. + + + Get the source part Uri from a specified relationships part. + + @param relationshipPartUri + The relationship part use to retrieve the source part. + @return The source part Uri from the specified relationships part. + + + Create an OPC compliant part name by throwing an exception if the Uri is + not valid. + + @param partUri + The part name Uri to validate. + @return A valid part name object, else null. + @throws InvalidFormatException + Throws if the specified Uri is not OPC compliant. + + + Create an OPC compliant part name. + + @param partName + The part name to validate. + @return The correspondant part name if valid, else null. + @throws InvalidFormatException + Throws if the specified part name is not OPC compliant. + @see #CreatePartName(Uri) + + + Create an OPC compliant part name by resolving it using a base part. + + @param partName + The part name to validate. + @param relativePart + The relative base part. + @return The correspondant part name if valid, else null. + @throws InvalidFormatException + Throws if the specified part name is not OPC compliant. + @see #CreatePartName(Uri) + + + Create an OPC compliant part name by resolving it using a base part. + + @param partName + The part name Uri to validate. + @param relativePart + The relative base part. + @return The correspondant part name if valid, else null. + @throws InvalidFormatException + Throws if the specified part name is not OPC compliant. + @see #CreatePartName(Uri) + + + Validate a part Uri by returning a bool. + ([M1.1],[M1.3],[M1.4],[M1.5],[M1.6]) + + (OPC Specifications 8.1.1 Part names) : + + Part Name Syntax + + The part name grammar is defined as follows: + + part_name = 1*( "/" segment ) + + segment = 1*( pchar ) + + + (pchar is defined in RFC 3986) + + @param partUri + The Uri to validate. + @return true if the Uri is valid to the OPC Specifications, else + false + + @see #CreatePartName(Uri) + + + Decode a Uri by converting all percent encoded character into a String + character. + + @param uri + The Uri to decode. + @return The specified Uri in a String with converted percent encoded + characters. + + + + + Build a part name where the relationship should be stored ((ex + /word/document.xml -> /word/_rels/document.xml.rels) + + @param partName + Source part Uri + @return the full path (as Uri) of the relation file + @throws InvalidOperationException + Throws if the specified Uri is a relationshp part. + + + Add a relationship to a part (except relationships part). + + @param targetPartName + Name of the target part. This one must be relative to the + source root directory of the part. + @param targetMode + Mode [Internal|External]. + @param relationshipType + Type of relationship. + @return The newly created and added relationship + + + * Add a relationship to a part (except relationships part). + + * Check rule M1.25: The Relationships part shall not have relationships to + * any other part. Package implementers shall enforce this requirement upon + * the attempt to create such a relationship and shall treat any such + * relationship as invalid. + * + * @param targetPartName + * Name of the target part. This one must be relative to the + * source root directory of the part. + * @param targetMode + * Mode [Internal|External]. + * @param relationshipType + * Type of relationship. + * @param id + * Relationship unique id. + * @return The newly created and added relationship + * + * @throws InvalidFormatException + * If the URI point to a relationship part URI. + + + Adds an external relationship to a part + (except relationships part). + + The targets of external relationships are not + subject to the same validity checks that internal + ones are, as the contents is potentially + any file, URL or similar. + + @param target External target of the relationship + @param relationshipType Type of relationship. + @return The newly created and added relationship + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#addExternalRelationship(java.lang.String, java.lang.String) + + + Adds an external relationship to a part + (except relationships part). + + The targets of external relationships are not + subject to the same validity checks that internal + ones are, as the contents is potentially + any file, URL or similar. + + @param target External target of the relationship + @param relationshipType Type of relationship. + @param id Relationship unique id. + @return The newly created and added relationship + @see org.apache.poi.OpenXml4Net.opc.RelationshipSource#addExternalRelationship(java.lang.String, java.lang.String) + + + Delete all the relationships attached to this. + + + Delete the relationship specified by its id. + + @param id + The ID identified the part to delete. + + + Retrieve all the relationships attached to this. + + @return This part's relationships. + @throws OpenXml4NetException + + + Retrieves a package relationship from its id. + + @param id + ID of the package relationship to retrieve. + @return The package relationship + + + Retrieve all relationships attached to this part which have the specified + type. + + @param relationshipType + Relationship type filter. + @return All relationships from this part that have the specified type. + @throws InvalidFormatException + If an error occurs while parsing the part. + @throws InvalidOperationException + If the package is open in write only mode. + + + Knows if the part have any relationships. + + @return true if the part have at least one relationship else + false. + + + Checks if the specified relationship is part of this package part. + + @param rel + The relationship to check. + @return true if the specified relationship exists in this part, + else returns false + + + Turning the DOM4j object in the specified output stream. + + @param xmlContent + The XML document. + @param outStream + The Stream in which the XML document will be written. + @return true if the xml is successfully written in the stream, + else false. + + + Copy the input stream into the output stream. + + @param inStream + The source stream. + @param outStream + The destination stream. + @return true if the operation succeed, else return false. + + + Specifies whether the target of a PackageRelationship is inside or outside a + Package. + + @author Julien Chable + @version 1.0 + + + The relationship references a resource that is external to the package. + + + The relationship references a part that is inside the package. + + + Physical zip package. + + @author Julien Chable + + + Zip archive, as either a file on disk, + or a stream + + + Constructor. Creates a new ZipPackage. + + + Constructor. Operation not supported. + + @param in + Zip input stream to load. + @param access + + + Constructor. Opens a Zip based Open XML document. + + @param path + The path of the file to open or create. + @param access + The package access mode. + + + Constructor. Opens a Zip based Open XML document. + + @param file + The file to open or create. + @param access + The package access mode. + + + Constructor. Opens a Zip based Open XML document from + a custom ZipEntrySource, typically an open archive + from another system + + @param zipEntry + Zip data to load. + @param access + The package access mode. + + + Retrieves the parts from this package. We assume that the package has not + been yet inspect to retrieve all the parts, this method will open the + archive and look for all parts contain inside it. If the package part + list is not empty, it will be emptied. + + @return All parts contain in this package. + @throws InvalidFormatException + Throws if the package is not valid. + + + Builds a PackagePartName for the given ZipEntry, + or null if it's the content types / invalid part + + + Create a new MemoryPackagePart from the specified URI and content type + + + aram partName The part URI. + + @param contentType + The part content type. + @return The newly created zip package part, else null. + + + Delete a part from the package + + @throws ArgumentException + Throws if the part URI is nulll or invalid. + + + Flush the package. Do nothing. + + + Close and save the package. + + @see #close() + + + Create a unique identifier to be use as a temp file name. + + @return A unique identifier use to be use as a temp file name. + + + Close the package without saving the document. Discard all the changes + made to this package. + + + Implement the getPart() method to retrieve a part from its URI in the + current package + + + @see #getPart(PackageRelationship) + + + Save this package into the specified stream + + + @param outputStream + The stream use to save this package. + + @see #save(OutputStream) + + + Get the zip archive + + @return The zip archive. + + + Zip implementation of a PackagePart. + + @author Julien Chable + @version 1.0 + @see PackagePart + + + The zip entry corresponding to this part. + + + Constructor. + + @param container + The container package. + @param partName + Part name. + @param contentType + Content type. + @throws InvalidFormatException + Throws if the content of this part invalid. + + + Constructor. + + @param container + The container package. + @param zipEntry + The zip entry corresponding to this part. + @param partName + The part name. + @param contentType + Content type. + @throws InvalidFormatException + Throws if the content of this part is invalid. + + + Get the zip entry of this part. + + @return The zip entry in the zip structure coresponding to this part. + + + Implementation of the getInputStream() which return the inputStream of + this part zip entry. + + @return Input stream of this part zip entry. + + + An Interface to make getting the different bits + of a Zip File easy. + Allows you to get at the ZipEntries, without + needing to worry about ZipFile vs ZipInputStream + being annoyingly very different. + + + Returns an Enumeration of all the Entries + + + Returns an InputStream of the decompressed + data that makes up the entry + + + Indicates we are done with reading, and + resources may be freed + + + Has close been called already? + + + A ZipEntrySource wrapper around a ZipFile. + Should be as low in terms of memory as a + normal ZipFile implementation is. + + + Provides a way to get at all the ZipEntries + from a ZipInputStream, as many times as required. + Allows a ZipInputStream to be treated much like + a ZipFile, for a price in terms of memory. + Be sure to call {@link #close()} as soon as you're + done, to free up that memory! + + + Reads all the entries from the ZipInputStream + into memory, and closes the source stream. + We'll then eat lots of memory, but be able to + work with the entries at-will. + + + Why oh why oh why are Iterator and Enumeration + still not compatible? + + + So we can close the real zip entry and still + effectively work with it. + Holds the (decompressed!) data in memory, so + close this as soon as you can! + + + This exception is thrown when we try to open a file that doesn't + seem to actually be an OOXML (Office Open XML) file After all + + + This exception is thrown when we are given an ODF-based file + (eg OpenOffice .ods) instead of an actually OOXML (Office Open XML) file + + + This exception is thrown when we are given an OLE2-based file + (eg Excel .xls) instead of an actually OOXML (Office Open XML) file + + +

    Namespace URI to use to represent that there is no Namespace.

    + +

    Defined by the Namespace specification to be "".

    + + @see + Namespaces in XML, 5.2 Namespace Defaulting +
    + +

    Prefix to use to represent the default XML Namespace.

    + +

    Defined by the XML specification to be "".

    + + @see + Namespaces in XML, 3. Qualified Names +
    + +

    The official XML Namespace name URI.

    + +

    Defined by the XML specification to be + "{@code http://www.w3.org/XML/1998/namespace}".

    + + @see + Namespaces in XML, 3. Qualified Names +
    + + +

    The official XML attribute used for specifying XML Namespace + declarations, {@link #XMLNS_ATTRIBUTE + XMLConstants.XMLNS_ATTRIBUTE}, Namespace name URI.

    + +

    Defined by the XML specification to be + "{@code http://www.w3.org/2000/xmlns/}".

    + + @see + Namespaces in XML, 3. Qualified Names + @see + Namespaces in XML Errata +
    + +

    The official XML attribute used for specifying XML Namespace + declarations.

    + +

    It is NOT valid to use as a + prefix. Defined by the XML specification to be + "{@code xmlns}".

    + + @see + Namespaces in XML, 3. Qualified Names +
    + + +

    W3C XML Schema Instance Namespace URI.

    + +

    Defined to be "{@code http://www.w3.org/2001/XMLSchema-instance}".

    + + @see + XML Schema Part 1: + Structures, 2.6 Schema-Related Markup in Documents Being Validated +
    + +

    W3C XPath Datatype Namespace URI.

    + +

    Defined to be "{@code http://www.w3.org/2003/11/xpath-datatypes}".

    + + @see XQuery 1.0 and XPath 2.0 Data Model +
    + + +

    RELAX NG Namespace URI.

    + +

    Defined to be "{@code http://relaxng.org/ns/structure/1.0}".

    + + @see RELAX NG Specification +
    +
    +
    diff --git a/DAL/bin/Debug/NPOI.OpenXmlFormats.dll b/DAL/bin/Debug/NPOI.OpenXmlFormats.dll new file mode 100644 index 0000000..910e7ae Binary files /dev/null and b/DAL/bin/Debug/NPOI.OpenXmlFormats.dll differ diff --git a/DAL/bin/Debug/NPOI.OpenXmlFormats.pdb b/DAL/bin/Debug/NPOI.OpenXmlFormats.pdb new file mode 100644 index 0000000..b7e440b Binary files /dev/null and b/DAL/bin/Debug/NPOI.OpenXmlFormats.pdb differ diff --git a/DAL/bin/Debug/NPOI.dll b/DAL/bin/Debug/NPOI.dll new file mode 100644 index 0000000..cab5a09 Binary files /dev/null and b/DAL/bin/Debug/NPOI.dll differ diff --git a/DAL/bin/Debug/NPOI.pdb b/DAL/bin/Debug/NPOI.pdb new file mode 100644 index 0000000..7c5c0fc Binary files /dev/null and b/DAL/bin/Debug/NPOI.pdb differ diff --git a/DAL/bin/Debug/NPOI.xml b/DAL/bin/Debug/NPOI.xml new file mode 100644 index 0000000..36b24b4 --- /dev/null +++ b/DAL/bin/Debug/NPOI.xml @@ -0,0 +1,45803 @@ + + + + NPOI + + + + Common abstract class for {@link EscherOptRecord} and + {@link EscherTertiaryOptRecord} + + @author Sergey Vladimirov (vlsergey {at} gmail {dot} com) + @author Glen Stampoultzis + + + Add a property to this record. + + + The list of properties stored by this record. + + + The list of properties stored by this record. + + + Records should be sorted by property number before being stored. + + + * Set an escher property. If a property with given propId already + exists it is replaced. + * + * @param value the property to set. + + + Retrieve the string representation of this record. + + + The following enum specifies values that indicate special procedural properties that + are used to modify the color components of another color. These values are combined with + those of the {@link SysIndexSource} enum or with a user-specified color. + The first six values are mutually exclusive. + + + An OfficeArtCOLORREF structure entry which also handles color extension opid data + + + @return {@link SysIndexSource} if {@link #hasSysIndexFlag()} is {@code true}, otherwise null + + + Return the {@link SysIndexProcedure} - for invert flag use {@link #getSysIndexInvert()} + @return {@link SysIndexProcedure} if {@link #hasSysIndexFlag()} is {@code true}, otherwise null + + + @return 0 for no invert flag, 1 for {@link SysIndexProcedure#INVERT_AFTER} and + 2 for {@link SysIndexProcedure#INVERT_HIGHBIT_AFTER} + + + @return index of the scheme color or -1 if {@link #hasSchemeIndexFlag()} is {@code false} + + @see NPOI.HSLF.Record.ColorSchemeAtom#getColor(int) + + + @return index of current palette (color) or -1 if {@link #hasPaletteIndexFlag()} is {@code false} + + + "The OfficeArtTertiaryFOPT record specifies a table of OfficeArtRGFOPTE properties, as defined in section 2.3.1." + -- [MS-ODRAW] -- v20110608; Office Drawing Binary File Format + + @author Sergey Vladimirov (vlsergey {at} gmail {dot} com) + + + + Generates escher records when provided the byte array containing those records. + @author Glen Stampoultzis + @author Nick Burch (nick at torchbox . com) + + + + + Initializes a new instance of the class. + + + + + Generates an escher record including the any children contained under that record. + An exception is thrown if the record could not be generated. + + The byte array containing the records + The starting offset into the byte array + The generated escher record + + + + Converts from a list of classes into a map that Contains the record id as the key and + the Constructor in the value part of the map. It does this by using reflection to look up + the RECORD_ID field then using reflection again to find a reference to the constructor. + + The records to convert + The map containing the id/constructor pairs. + + + + Escher array properties are the most wierd construction ever invented + with all sorts of special cases. I'm hopeful I've got them all. + @author Glen Stampoultzis (glens at superlinksoftware.com) + + + + The size of the header that goes at the + start of the array, before the data + + + Normally, the size recorded in the simple data (for the complex + data) includes the size of the header. + There are a few cases when it doesn't though... + + + When Reading a property from data stream remeber if the complex part is empty and Set this flag. + + + + Gets the element. + + The index. + + + + + Sets the element. + + The index. + The element. + + + + Retrieves the string representation for this property. + + + + + + We have this method because the way in which arrays in escher works + is screwed for seemly arbitary reasons. While most properties are + fairly consistent and have a predictable array size, escher arrays + have special cases. + + The data array containing the escher array information + The offset into the array to start Reading from. + the number of bytes used by this complex property. + + + + Serializes the simple part of this property. ie the first 6 bytes. + Needs special code to handle the case when the size doesn't + include the size of the header block + + + + + + + + Sometimes the element size is stored as a negative number. We + negate it and shift it to Get the real value. + + The size of elements. + + + + + @author Glen Stampoultzis + @version $Id: EscherBitmapBlip.java 569827 2007-08-26 15:26:29Z yegor $ + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + Serializes the record to an existing byte array. + + the offset within the byte array + the data array to Serialize to + a listener for begin and end serialization events. + the number of bytes written. + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + Gets or sets the UID. + + The UID. + + + + Gets or sets the marker. + + The marker. + + + + Toes the string. + + + + + + @author Glen Stampoultzis + @version $Id: EscherBlipRecord.java 569827 2007-08-26 15:26:29Z yegor $ + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + Serializes the record to an existing byte array. + + the offset within the byte array + the data array to Serialize to + a listener for begin and end serialization events. + the number of bytes written. + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + The short name for this record + + + + + + Gets or sets the picture data. + + The picture data. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Represents a bool property. The actual utility of this property is in doubt because many + of the properties marked as bool seem to actually contain special values. In other words + they're not true bools. + @author Glen Stampoultzis + + + + + Create an instance of an escher bool property. + + The property number (or id) + The 32 bit value of this bool property + + + + Whether this bool property is true + + true if this instance is true; otherwise, false. + + + + Whether this bool property is false + + true if this instance is false; otherwise, false. + + + + The BSE record is related closely to the EscherBlipRecord and stores + extra information about the blip. A blip record is actually stored inside + the BSE record even though the BSE record isn't actually a container record. + @author Glen Stampoultzis + @see EscherBlipRecord + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + This method Serializes this escher record into a byte array. + + The offset into + data to start writing the record data to + The byte array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + The short name for this record + + + + + + Gets or sets the expected blip type under windows (failure to match this blip type will result in + Excel converting to this format). + + The blip type win32. + + + + Gets or sets the expected blip type under MacOS (failure to match this blip type will result in + Excel converting to this format). + + The blip type mac OS. + + + + Gets or sets 16 byte MD4 checksum. + + The UID. + + + + Gets or sets the tag. (Unused) + + The tag. + + + + Gets or sets Blip size in stream.. + + The size. + + + + Gets or sets the reference count of this blip. + + The ref. + + + + Gets or sets the offset in the delay stream.. + + The offset. + + + + Defines the way this blip is used. + + The usage. + + + + Gets or sets the blip name. + + The name. + + + + Gets or sets the unused2. + + The unused2. + + + + Gets or sets the unused3. + + The unused3. + + + + Gets or sets the blip record. + + The blip record. + + + + Gets or sets any remaining data in this record. + + The remaining data. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Retrieve the string representation given a blip id. + + The b. + + + + + The escher child achor record is used to specify the position of a shape under an + existing group. The first level of shape records use a EscherClientAnchor record instead. + @author Glen Stampoultzis + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + This method Serializes this escher record into a byte array. + + The offset into data to start writing the record data to. + The byte array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + The record id for the EscherChildAnchorRecord. + + + + + + The short name for this record + + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets offset within the parent coordinate space for the top left point. + + The DX1. + + + + Gets or sets the offset within the parent coordinate space for the top left point. + + The dy1. + + + + Gets or sets the offset within the parent coordinate space for the bottom right point. + + The DX2. + + + + Gets or sets the offset within the parent coordinate space for the bottom right point. + + The dy2. + + + + The escher client anchor specifies which rows and cells the shape is bound to as well as + the offsets within those cells. Each cell is 1024 units wide by 256 units long regardless + of the actual size of the cell. The EscherClientAnchorRecord only applies to the top-most + shapes. Shapes contained in groups are bound using the EscherChildAnchorRecords. + @author Glen Stampoultzis + + + + bit[0] - fMove (1 bit): A bit that specifies whether the shape will be kept intact when the cells are moved. + bit[1] - fSize (1 bit): A bit that specifies whether the shape will be kept intact when the cells are resized. If fMove is 1, the value MUST be 1. + bit[2-4] - reserved, MUST be 0 and MUST be ignored + bit[5-15]- Undefined and MUST be ignored. + + it can take values: 0, 2, 3 + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + This method Serializes this escher record into a byte array. + + The offset into data to start writing the record data to. + The byte array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + The record id for this record. + + + + + + The short name for this record + + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets the flag. + + 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells. + + + + Gets or sets The column number for the top-left position. 0 based. + + The col1. + + + + Gets or sets The x offset within the top-left cell. Range is from 0 to 1023. + + The DX1. + + + + Gets or sets The row number for the top-left corner of the shape. + + The row1. + + + + Gets or sets The y offset within the top-left corner of the current shape. + + The dy1. + + + + Gets or sets The column of the bottom right corner of this shape. + + The col2. + + + + Gets or sets The x offset withing the cell for the bottom-right corner of this shape. + + The DX2. + + + + Gets or sets The row number for the bottom-right corner of the current shape. + + The row2. + + + + Gets or sets The y offset withing the cell for the bottom-right corner of this shape. + + The dy2. + + + + Gets or sets the remaining data. + + The remaining data. + + + + The EscherClientDataRecord is used to store client specific data about the position of a + shape within a container. + @author Glen Stampoultzis + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + This method Serializes this escher record into a byte array. + + @param offset The offset into data to start writing the record data to. + @param data The byte array to Serialize to. + @param listener A listener to retrieve start and end callbacks. Use a NullEscherSerailizationListener to ignore these events. + @return The number of bytes written. + @see NullEscherSerializationListener + + + Returns the number of bytes that are required to Serialize this record. + + @return Number of bytes + + + Returns the identifier of this record. + + + The short name for this record + + + Returns the string representation of this record. + + + Any data recording this record. + + + + A complex property differs from a simple property in that the data can not fit inside a 32 bit + integer. See the specification for more detailed information regarding exactly what is + stored here. + @author Glen Stampoultzis + + + + + Create a complex property using the property id and a byte array containing the complex + data value. + + The id consists of the property number, a flag indicating whether this is a blip id and a flag + indicating that this is a complex property. + The value of this property. + + + + Create a complex property using the property number, a flag to indicate whether this is a + blip reference and the complex property data. + + The property number. + Whether this is a blip id. Should be false. + The value of this complex property. + + + + Serializes the simple part of this property. ie the first 6 bytes. + + + + + + + + Serializes the complex part of this property + + The data array to Serialize to + The offset within data to start serializing to. + The number of bytes Serialized. + + + + Gets the complex data. + + The complex data. + + + + Determine whether this property is equal to another property. + + The object to compare to. + True if the objects are equal. + + + + Caclulates the number of bytes required to Serialize this property. + + Number of bytes + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Escher container records store other escher records as children. + The container records themselves never store any information beyond + the standard header used by all escher records. This one record is + used to represent many different types of records. + @author Glen Stampoultzis + + + + in case if document contains any charts we have such document structure: + BOF + ... + DrawingRecord + ... + ObjRecord|TxtObjRecord + ... + EOF + ... + BOF(Chart begin) + ... + DrawingRecord + ... + ObjRecord|TxtObjRecord + ... + EOF + So, when we call EscherAggregate.createAggregate() we have not all needed data. + When we got warning "WARNING: " + bytesRemaining + " bytes remaining but no space left" + we should save value of bytesRemaining + and add it to container size when we serialize it + + + + The contract of this method is to deSerialize an escher record including + it's children. + + The byte array containing the Serialized escher + records. + The offset into the byte array. + A factory for creating new escher records + The number of bytes written. + + + + Serializes to an existing byte array without serialization listener. + This is done by delegating to Serialize(int, byte[], EscherSerializationListener). + + the offset within the data byte array. + the data array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Subclasses should effeciently return the number of bytes required to + Serialize the record. + + number of bytes + + + + Do any of our (top level) children have the + given recordId? + + The record id. + + true if [has child of type] [the specified record id]; otherwise, false. + + + + + Returns a list of all the child (escher) records + of the container. + + + + + + Returns all of our children which are also + EscherContainers (may be 0, 1, or vary rarely + 2 or 3) + + The child containers. + + + + Subclasses should return the short name for this escher record. + + + + + + The display methods allows escher variables to print the record names + according to their hierarchy. + + The current indent level. + + + + Adds the child record. + + The record. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets the child by id. + + The record id. + + + + + Recursively find records with the specified record ID + + + list to store found records + + + + This record defines the drawing groups used for a particular sheet. + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + This method Serializes this escher record into a byte array. + + The offset into data to start writing the record data to. + The byte array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + Return the current record id. + + The 16 bit record id. + + + + The short name for this record + + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets the shape id max. + + The shape id max. + + + + Gets the Number of id clusters + 1 + + The num id clusters. + + + + Gets or sets the num shapes saved. + + The num shapes saved. + + + + Gets or sets the drawings saved. + + The drawings saved. + + + + Gets or sets the max drawing group id. + + The max drawing group id. + + + + Gets or sets the file id clusters. + + The file id clusters. + + + + Adds the cluster. + + The dg id. + The num shaped used. + + + + Adds the cluster. + + id of the drawing group (stored in the record options) + initial value of the numShapedUsed field + if set to true if true then sort clusters by drawing group id.( + In Excel the clusters are sorted but in PPT they are not). + + + + This record simply holds the number of shapes in the drawing group and the + last shape id used for this drawing group. + @author Glen Stampoultzis + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + This method Serializes this escher record into a byte array. + + The offset into data to start writing the record data to. + The byte array to Serialize to. + The number of bytes written. + a listener for begin and end serialization events. + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + Return the current record id. + + The 16 bit record id. + + + + The short name for this record + + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets The number of shapes in this drawing group. + + The num shapes. + + + + Gets or sets The last shape id used in this drawing group. + + The last MSOSPID. + + + + Gets the drawing group id for this record. This is encoded in the + instance part of the option record. + + The drawing group id. + + + + Increments the shape count. + + + + + Used to dump the contents of escher records to a PrintStream. + @author Glen Stampoultzis (glens at apache.org) + + + + + Decodes the escher stream from a byte array and dumps the results to + a print stream. + + The data array containing the escher records. + The starting offset within the data array. + The number of bytes to Read. + + + + This version of dump is a translation from the open office escher dump routine. + + The number of bytes to Read + An input stream to Read from. + + + + Returns a property name given a property id. This is used only by the + old escher dump routine. + + The property number for the name + A descriptive name. + + + + Returns the blip description given a blip id. + + blip id + A description. + + + + Straight conversion from OO. Converts a type of float. + + The N32. + + + + + Dumps out a hex value by Reading from a input stream. + + How many bytes this hex value consists of. + The stream to Read the hex value from. + + + + Dumps the specified record size. + + Size of the record. + The data. + + + + @author Daniel Noll + + + + BLIP signatures as defined in the escher spec + + + The primary UID is only saved to disk if (blip_instance ^ blip_signature == 1) + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into + May be null since this is not a container record. + + The number of bytes Read from the byte array. + + + + + Serializes the record to an existing byte array. + + the offset within the byte array + the data array to Serialize to + a listener for begin and end serialization events. + the number of bytes written. + + + + Decompresses the provided data, returning the inflated result. + + the deflated picture data. + the inflated picture data. + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + Gets or sets the UID. + + The UID. + + + + Gets or sets the primary UID. + + The primary UID. + + + + Gets or sets the size of the uncompressed. + + The size of the uncompressed. + + + + Gets or sets the bounds. + + The bounds. + + + + Gets or sets the size EMU. + + The size EMU. + + + + Gets or sets the size of the compressed. + + The size of the compressed. + + + + Gets or sets a value indicating whether this instance is compressed. + + + true if this instance is compressed; otherwise, false. + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Return the blip signature + + the blip signature + + + + The opt record is used to store property values for a shape. It is the key to determining + the attributes of a shape. Properties can be of two types: simple or complex. Simple types + are fixed Length. Complex properties are variable Length. + @author Glen Stampoultzis + + + + + Automatically recalculate the correct option + + + + + + The short name for this record + + + + + + @author Daniel Noll + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into + May be null since this is not a container record. + + The number of bytes Read from the byte array. + + + + + Serializes the record to an existing byte array. + + the offset within the byte array + the data array to Serialize to + a listener for begin and end serialization events. + the number of bytes written. + + + + Decompresses the provided data, returning the inflated result. + + the deflated picture data. + the inflated picture data. + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + Gets or sets the UID. + + The UID. + + + + Gets or sets the size of the uncompressed. + + The size of the uncompressed. + + + + Gets or sets the bounds. + + The bounds. + + + + Gets or sets the size EMU. + + The size EMU. + + + + Gets or sets the size of the compressed. + + The size of the compressed. + + + + Gets a value indicating whether this instance is compressed. + + + true if this instance is compressed; otherwise, false. + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Provides a list of all known escher properties including the description and + type. + @author Glen Stampoultzis (glens at apache.org) + + + + + Inits the props. + + + + + Adds the prop. + + The s. + The data. + + + + Gets the data. + + Name of the prop. + The type. + + + + + Gets the data. + + Name of the prop. + + + + + Gets the name of the property. + + The property id. + + + + + Gets the type of the property. + + The property id. + + + + + This is the abstract base class for all escher properties. + @see EscherOptRecord + @author Glen Stampoultzis (glens at apache.org) + + + + + Initializes a new instance of the class. + + The id is distinct from the actual property number. The id includes the property number the blip id + flag and an indicator whether the property is complex or not. + + + + Initializes a new instance of the class.The three parameters are combined to form a property + id. + + The property number. + if set to true [is complex]. + if set to true [is blip id]. + + + + Gets the id. + + The id. + + + + Gets the property number. + + The property number. + + + + Gets a value indicating whether this instance is complex. + + + true if this instance is complex; otherwise, false. + + + + + Gets a value indicating whether this instance is blip id. + + + true if this instance is blip id; otherwise, false. + + + + + Gets the name. + + The name. + + + + Most properties are just 6 bytes in Length. Override this if we're + dealing with complex properties. + + The size of the property. + + + + Escher properties consist of a simple fixed Length part and a complex variable Length part. + The fixed Length part is Serialized first. + + The data. + The pos. + + + + + Escher properties consist of a simple fixed Length part and a complex variable Length part. + The fixed Length part is Serialized first. + + The data. + The pos. + + + + + Generates a property given a reference into the byte array storing that property. + @author Glen Stampoultzis + + + + + Create new properties from a byte array. + + The byte array containing the property + The starting offset into the byte array + The new properties + + + + + This class stores the type and description of an escher property. + @author Glen Stampoultzis (glens at apache.org) + + + + + Initializes a new instance of the class. + + The description of the escher property. + + + + Initializes a new instance of the class. + + The description of the escher property. + The type of the property. + + + + Gets the description. + + The description. + + + + Gets the type. + + The type. + + + + The base abstract record from which all escher records are defined. Subclasses will need + to define methods for serialization/deserialization and for determining the record size. + + + + + Initializes a new instance of the class. + + + + + Delegates to FillFields(byte[], int, EscherRecordFactory) + + the bytes to serialize from + the escher record factory + The number of bytes written. + + + + The contract of this method is to deSerialize an escher record including + it's children. + + The byte array containing the Serialized escher + records. + The offset into the byte array. + A factory for creating new escher records. + The number of bytes written. + + + + Reads the 8 byte header information and populates the + options + and + recordId + records. + + the byte array to Read from + the offset to start Reading from + the number of bytes remaining in this record. This + + + + Read the options field from header and return instance part of it. + + the byte array to read from + the offset to start reading from + value of instance part of options field + + + + Determine whether this is a container record by inspecting the option + field. + + + true if this instance is container record; otherwise, false. + + + + + Gets or sets the options field for this record. All records have one + + The options. + + + + Serializes to a new byte array. This is done by delegating to + Serialize(int, byte[]); + + the Serialized record. + + + + Serializes to an existing byte array without serialization listener. + This is done by delegating to Serialize(int, byte[], EscherSerializationListener). + + the offset within the data byte array. + the data array to Serialize to. + The number of bytes written. + + + + Serializes the record to an existing byte array. + + the offset within the byte array. + the offset within the byte array + a listener for begin and end serialization events. This. + is useful because the serialization is + hierarchical/recursive and sometimes you need to be able + break into that. + + + + + + Subclasses should effeciently return the number of bytes required to + Serialize the record. + + number of bytes + + + + Return the current record id. + + The 16 bit record id. + + + + Gets or sets the child records. + + Returns the children of this record. By default this will + be an empty list. EscherCotainerRecord is the only record that may contain children. + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + + Returns the indexed child record. + + The index. + + + + + The display methods allows escher variables to print the record names + according to their hierarchy. + + The current indent level. + + + + Gets the name of the record. + + The name of the record. + + + + This class Reads the standard escher header. + + + + + Reads the header. + + The data. + The off set. + + + + + Gets the options. + + The options. + + + + Gets the record id. + + The record id. + + + + Gets the remaining bytes. + + The remaining bytes. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Get or set the instance part of the option record. + + + + + Get or set the version part of the option record. + + + + @param tab - each children must be a right of his parent + @return xml representation of this record + + + + The escher record factory interface allows for the creation of escher + records from a pointer into a data array. + @author Glen Stampoultzis (glens at apache.org) + + + + + Create a new escher record from the data provided. Does not attempt + to Fill the contents of the record however. + + The data. + The off set. + + + + + A color property. + @author Glen Stampoultzis (glens at apache.org) + + + + + Initializes a new instance of the class. + + The property number. + Color of the RGB. + + + + Gets the color of the RGB. + + The color of the RGB. + + + + Gets the red. + + The red. + + + + Gets the green. + + The green. + + + + Gets the blue. + + The blue. + + + Interface for listening to escher serialization events. + + @author Glen Stampoultzis (glens at apache.org) + + + Fired before a given escher record is Serialized. + + @param offset The position in the data array at which the record will be Serialized. + @param recordId The id of the record about to be Serialized. + + + Fired after a record has been Serialized. + + @param offset The position of the end of the Serialized record + 1 + @param recordId The id of the record about to be Serialized + @param size The number of bytes written for this record. If it is a container + record then this will include the size of any included records. + + + + Defines the constants for the various possible shape paths. + @author Glen Stampoultzis (glens at apache.org) + + + + + Initializes a new instance of the class. + + The property number. + The shape path. + + + + A simple property is of fixed Length and as a property number in Addition + to a 32-bit value. Properties that can't be stored in only 32-bits are + stored as EscherComplexProperty objects. + @author Glen Stampoultzis (glens at apache.org) + + + + + The id is distinct from the actual property number. The id includes the property number the blip id + flag and an indicator whether the property is complex or not. + + The id. + The property value. + + + + Constructs a new escher property. The three parameters are combined to form a property + id. + + The property number. + if set to true [is complex]. + if set to true [is blip id]. + The property value. + + + + Serialize the simple part of the escher record. + + The data. + The off set. + the number of bytes Serialized. + + + + Escher properties consist of a simple fixed Length part and a complex variable Length part. + The fixed Length part is Serialized first. + + + + + + + + Return the 32 bit value of this property. + + The property value. + + + + Returns true if one escher property is equal to another. + + The o. + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + The spgr record defines information about a shape group. Groups in escher + are simply another form of shape that you can't physically see. + @author Glen Stampoultzis (glens at apache.org) + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + This method Serializes this escher record into a byte array + + The offset into data + to start writing the record data to. + The byte array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + Return the current record id. + + The 16 bit identifier of this shape group record. + + + + The short name for this record + + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets the starting top-left coordinate of child records. + + The rect x1. + + + + Gets or sets the starting bottom-right coordinate of child records. + + The rect x2. + + + + Gets or sets the starting top-left coordinate of child records. + + The rect y1. + + + + Gets or sets the starting bottom-right coordinate of child records. + + The rect y2. + + + + A list of the most recently used colours for the drawings contained in + this document. + @author Glen Stampoultzis (glens at apache.org) + + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + This method Serializes this escher record into a byte array + + The offset into data + to start writing the record data to. + The byte array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Returns the number of bytes that are required to Serialize this record. + + number of bytes + + + + Return the current record id. + + the 16 bit identifer for this record. + + + + Gets the short name for this record + + The name of the record. + + + + Returns a that represents the current . + + + A that represents the current . + + @return a string representation of this record. + + + + Gets or sets the color1. + + The color1. + + + + Gets or sets the color2. + + The color2. + + + + Gets or sets the color3. + + The color3. + + + + Gets or sets the color4. + + The color4. + + + + ToGether the the EscherOptRecord this record defines some of the basic + properties of a shape. + @author Glen Stampoultzis (glens at apache.org) + + + + + The contract of this method is to deSerialize an escher record including + it's children. + + The byte array containing the Serialized escher + records. + The offset into the byte array. + A factory for creating new escher records + The number of bytes written. + + + + Serializes to an existing byte array without serialization listener. + This is done by delegating to Serialize(int, byte[], EscherSerializationListener). + + the offset within the data byte array. + the data array to Serialize to. + a listener for begin and end serialization events. + The number of bytes written. + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + @return the 16 bit identifier for this record. + + + + + + The short name for this record + + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Converts the shape flags into a more descriptive name. + + The flags. + + + + + Gets or sets A number that identifies this shape + + The shape id. + + + + The flags that apply to this shape. + + The flags. + + + + Get or set shape type. Must be one of MSOSPT values (see [MS-ODRAW] for details). + + + + + Holds data from the parent application. Most commonly used to store + text in the format of the parent application, rather than in + Escher format. We don't attempt to understand the contents, since + they will be in the parent's format, not Escher format. + @author Glen Stampoultzis (glens at apache.org) + @author Nick Burch (nick at torchbox dot com) + + + + The data for this record not including the the 8 byte header + + + This method deserializes the record from a byte array. + + @param data The byte array containing the escher record information + @param offset The starting offset into data. + @param recordFactory May be null since this is not a container record. + @return The number of bytes Read from the byte array. + + + + Writes this record and any contained records to the supplied byte + + + + a listener for begin and end serialization events. + the number of bytes written. + + + + Returns any extra data associated with this record. In practice excel + does not seem to put anything here, but with PowerPoint this will + contain the bytes that make up a TextHeaderAtom followed by a + TextBytesAtom/TextCharsAtom + + The data. + + + + Sets the extra data (in the parent application's format) to be + contained by the record. Used when the parent application changes + the contents. + + The b. + The start. + The length. + + + + Sets the data. + + The b. + + + + Returns the number of bytes that are required to serialize this record. + + Number of bytes + + + + The short name for this record + + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + This record is used whenever a escher record is encountered that + we do not explicitly support. + @author Glen Stampoultzis (glens at apache.org) + + + + The data for this record not including the the 8 byte header + + + + This method deSerializes the record from a byte array. + + The byte array containing the escher record information + The starting offset into data + May be null since this is not a container record. + The number of bytes Read from the byte array. + + + + Writes this record and any contained records to the supplied byte + array. + + + + a listener for begin and end serialization events. + the number of bytes written. + + + + Gets the data. + + The data. + + + + Returns the number of bytes that are required to Serialize this record. + + Number of bytes + + + + Returns the children of this record. By default this will + be an empty list. EscherCotainerRecord is the only record + that may contain children. + + + + + + The short name for this record + + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Adds the child record. + + The child record. + + + A version of {@link POIDocument} which allows access to the + HPSF Properties, but no other document contents. + Normally used when you want to read or alter the Document Properties, + without affecting the rest of the file + + + Write out to the currently open file the properties changes, but nothing else + + + Write out, with any properties changes, but nothing else + + + Write out, with any properties changes, but nothing else + + + Checks to see if the specified length seems valid, + given the amount of data available still to read, + and the requirement that the string be NULL-terminated + + + The Character Encoding is not supported. + + @author Asmus Freytag + @since JDK1.1 + + + Constructs an UnsupportedEncodingException without a detail message. + + + Constructs an UnsupportedEncodingException with a detail message. + @param s Describes the reason for the exception. + + + + Maintains the instances of {@link CustomProperty} that belong To a + {@link DocumentSummaryInformation}. The class maintains the names of the + custom properties in a dictionary. It implements the {@link Map} interface + and by this provides a simplified view on custom properties: A property's + name is the key that maps To a typed value. This implementation hides + property IDs from the developer and regards the property names as keys To + typed values. + While this class provides a simple API To custom properties, it ignores + the fact that not names, but IDs are the real keys To properties. Under the + hood this class maintains a 1:1 relationship between IDs and names. Therefore + you should not use this class To process property Sets with several IDs + mapping To the same name or with properties without a name: the result will + contain only a subSet of the original properties. If you really need To deal + such property Sets, use HPSF's low-level access methods. + An application can call the {@link #isPure} method To check whether a + property Set parsed by {@link CustomProperties} is still pure (i.e. + unmodified) or whether one or more properties have been dropped. + This class is not thRead-safe; concurrent access To instances of this + class must be syncronized. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2006-02-09 + + + + Maps property IDs To property names. + + + Maps property names To property IDs. + + + Tells whether this object is pure or not. + + + + Puts a {@link CustomProperty} into this map. It is assumed that the + {@link CustomProperty} alReady has a valid ID. Otherwise use + {@link #Put(CustomProperty)}. + + The name. + The custom property. + + + + Returns a set of all the names of our + custom properties. Equivalent to + {@link #nameSet()} + + + Returns a set of all the names of our + custom properties + + + Returns a set of all the IDs of our + custom properties + + + + Puts a {@link CustomProperty} that has not yet a valid ID into this + map. The method will allocate a suitable ID for the custom property: +
      +
    • If there is alReady a property with the same name, take the ID + of that property.
    • +
    • Otherwise Find the highest ID and use its value plus one.
    • +
    +
    + The custom property. + If the was alReady a property with the same name, the +
    + + + Removes a custom property. + + The name of the custom property To Remove + The Removed property or + null + if the specified property was not found. + + + + Adds a named string property. + + The property's name. + The property's value. + the property that was stored under the specified name before, or + null + if there was no such property before. + + + + Adds a named long property + + The property's name. + The property's value. + the property that was stored under the specified name before, or + null + if there was no such property before. + + + + Adds a named double property. + + The property's name. + The property's value. + the property that was stored under the specified name before, or + null + if there was no such property before. + + + + Adds a named integer property. + + The property's name. + The property's value. + the property that was stored under the specified name before, or + null + if there was no such property before. + + + + Adds a named bool property. + + The property's name. + The property's value. + the property that was stored under the specified name before, or + null + if there was no such property before. + + + + Adds a named date property. + + The property's name. + The property's value. + the property that was stored under the specified name before, or + null + if there was no such property before. + + + + Gets the with the specified name. + + the value or + null + if a value with the specified + name is not found in the custom properties. + + + Checks against both String Name and Long ID + + + Checks against both the property, and its values. + + + + Gets the dictionary which Contains IDs and names of the named custom + properties. + + The dictionary. + + + + Gets or sets the codepage. + + The codepage. + + + + Tells whether this {@link CustomProperties} instance is pure or one or + more properties of the underlying low-level property Set has been + dropped. + + true if this instance is pure; otherwise, false. + + + + This class represents custum properties in the document summary + information stream. The difference To normal properties is that custom + properties have an optional name. If the name is not null it + will be maintained in the section's dictionary. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2006-02-09 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + the property To copy + + + + Initializes a new instance of the class. + + This property's attributes are copied To the new custom + property. + The new custom property's name. + + + + Gets or sets the property's name. + + the property's name. + + + + Compares two custom properties for equality. The method returns + true if all attributes of the two custom properties are + equal. + + The custom property To Compare with. + true + if both custom properties are equal, else + false + + + + + + @see Object#GetHashCode() + + + + Convenience class representing a DocumentSummary Information stream in a + Microsoft Office document. + @author Rainer Klute + klute@rainer-klute.de + @author Drew Varner (Drew.Varner cloSeto sc.edu) + @author robert_flaherty@hyperion.com + @since 2002-02-09 + + + + The document name a document summary information stream + usually has in a POIFS filesystem. + + + + Initializes a new instance of the class. + + A property Set which should be Created from a + document summary information stream. + + + + Gets or sets the category. + + The category value + + + + Removes the category. + + + + + Gets or sets the presentation format (or null). + + The presentation format value + + + + Removes the presentation format. + + + + + Gets or sets the byte count or 0 if the {@link + DocumentSummaryInformation} does not contain a byte count. + + The byteCount value + + + + Removes the byte count. + + + + + Gets or sets the line count or 0 if the {@link + DocumentSummaryInformation} does not contain a line count. + + The line count value. + + + + Removes the line count. + + + + + Gets or sets the par count or 0 if the {@link + DocumentSummaryInformation} does not contain a par count. + + The par count value + + + + Removes the par count. + + + + + Gets or sets the slide count or 0 if the {@link + DocumentSummaryInformation} does not contain a slide count. + + The slide count value + + + + Removes the slide count. + + + + + Gets or sets the note count or 0 if the {@link + DocumentSummaryInformation} does not contain a note count + + The note count value + + + + Removes the note count. + + + + + Gets or sets the hidden count or 0 if the {@link + DocumentSummaryInformation} does not contain a hidden + count. + + The hidden count value. + + + + Removes the hidden count. + + + + + Returns the mmclip count or 0 if the {@link + DocumentSummaryInformation} does not contain a mmclip + count. + + The mmclip count value. + + + + Removes the MMClip count. + + + + + Gets or sets a value indicating whether this is scale. + + true if cropping is desired; otherwise, false. + + + + Removes the scale. + + + + + Gets or sets the heading pair (or null) + + The heading pair value. + + + + Removes the heading pair. + + + + + Gets or sets the doc parts. + + The doc parts value + + + + Removes the doc parts. + + + + + Gets or sets the manager (or null). + + The manager value + + + + Removes the manager. + + + + + Gets or sets the company (or null). + + The company value + + + + Removes the company. + + + + + Gets or sets a value indicating whether [links dirty]. + + true if the custom links are dirty.; otherwise, false. + + + + Removes the links dirty. + + + +

    Returns the character count including whitespace, or 0 if the + {@link DocumentSummaryInformation} does not contain this char count.

    + This is the whitespace-including version of {@link SummaryInformation#getCharCount()} + + @return The character count or null +
    + + Removes the character count + + +

    Get if the User Defined Property Set has been updated outside of the + Application.

    +

    If it has (true), the hyperlinks should be updated on document load.

    +
    + + Removes the flag for if the User Defined Property Set has been updated + outside of the Application. + + +

    Gets the version of the Application which wrote the + Property set, stored with the two high order bytes having the major + version number, and the two low order bytes the minor version number.

    +

    This will be 0 if no version is set.

    +
    + + Removes the Application Version + + +

    Returns the VBA digital signature for the VBA project + embedded in the document (or null).

    +
    + + Removes the VBA Digital Signature + + +

    Gets the content type of the file (or null).

    +
    + + Removes the content type of the file + + +

    Gets the content status of the file (or null).

    +
    + + Removes the content status of the file + + +

    Gets the document language, which is normally unset and empty + (or null).

    +
    + + Removes the document language + + +

    Gets the document version as a string, which is normally unset and empty + (or null).

    +
    + + Removes the document version string + + + + Gets or sets the custom properties. + + The custom properties. + + + + Creates section 2 if it is not alReady present. + + + + + Removes the custom properties. + + + + + Extracts all of the HPSF properties, both + build in and custom, returning them in + textual form. + + + + + Gets the document summary information text. + + The document summary information text. + + + + Gets the summary information text. + + The summary information text. + + + + Gets the properties text. + + The ps. + + + + + Return the text of all the properties defined in + the document. + + All the text from the document. + + + + Returns another text extractor, which is able to + output the textual content of the document + metadata / properties, such as author and title. + + The metadata text extractor. + + + + This exception is the superclass of all other checked exceptions thrown + in this package. It supports a nested "reason" throwable, i.e. an exception + that caused this one To be thrown. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message string. + + + + Initializes a new instance of the class. + + The reason, i.e. a throwable that indirectly + caused this exception. + + + + Initializes a new instance of the class. + + The message string. + The reason, i.e. a throwable that indirectly + caused this exception. + + + + Returns the {@link Exception} that caused this exception To + be thrown or null if there was no such {@link + Exception}. + + The reason. + + + + This exception is the superclass of all other unchecked + exceptions thrown in this package. It supports a nested "reason" + throwable, i.e. an exception that caused this one To be thrown. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message string. + + + + Initializes a new instance of the class. + + The reason, i.e. a throwable that indirectly + caused this exception. + + + + Initializes a new instance of the class. + + The message string. + The reason, i.e. a throwable that indirectly + caused this exception. + + + + This exception is thrown when there is an illegal value Set in a + {@link PropertySet}. For example, a {@link Variant#VT_BOOL} must + have a value of -1 (true) or 0 (false). + Any other value would trigger this exception. It supports a nested + "reason" throwable, i.e. an exception that caused this one To be + thrown. + @author Drew Varner(Drew.Varner atDomain sc.edu) + @since 2002-05-26 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception's message string + + + + Initializes a new instance of the class. + + This exception's underlying reason + + + + Initializes a new instance of the class. + + The exception's message string + This exception's underlying reason + + + + This exception is thrown if HPSF encounters a variant type that is illegal + in the current context. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2004-06-21 + + + + + Initializes a new instance of the class. + + The unsupported variant type + The value + A message string + + + + Initializes a new instance of the class. + + The unsupported variant type + The value. + + + + This exception is thrown if an {@link java.io.InputStream} does + not support the {@link java.io.InputStream#mark} operation. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception's message string. + + + + Initializes a new instance of the class. + + This exception's underlying reason. + + + + Initializes a new instance of the class. + + The exception's message string + This exception's underlying reason + + + + This exception is thrown if one of the {@link PropertySet}'s + convenience methods does not Find a required {@link Section}. + The constructors of this class are analogous To those of its + superclass and documented there. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2006-02-08 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception's message string + + + + Initializes a new instance of the class. + + This exception's underlying reason. + + + + Initializes a new instance of the class. + + The exception's message string + This exception's underlying reason + + + + Adds writing capability To the {@link Property} class. + Please be aware that this class' functionality will be merged into the + {@link Property} class at a later time, so the API will Change. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2003-08-03 + + + + + Creates an empty property. It must be Filled using the Set method To + be usable. + + + + + Initializes a new instance of the class. + + The property To copy. + + + + Writes the property To an output stream. + + The output stream To Write To. + The codepage To use for writing non-wide strings + the number of bytes written To the stream + + + + Adds writing support To the {@link PropertySet} class. + Please be aware that this class' functionality will be merged into the + {@link PropertySet} class at a later time, so the API will Change. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2003-02-19 + + + + + Initializes a new instance of the class. + Its primary task is To initialize the immutable field with their proper + values. It also Sets fields that might Change To reasonable defaults. + + + + + Initializes a new instance of the class. + All nested elements, i.e.Sections and Property instances, will be their + mutable counterparts in the new MutablePropertySet. + + The property Set To copy + + + The Length of the property Set stream header. + + + + Gets or sets the "byteOrder" property. + + the byteOrder value To Set + + + + Gets or sets the "format" property. + + the format value To Set + + + + Gets or sets the "osVersion" property + + the osVersion value To Set. + + + + Gets or sets the property Set stream's low-level "class ID" + + The property Set stream's low-level "class ID" field. + + + + Removes all sections from this property Set. + + + + + Adds a section To this property Set. + + section The {@link Section} To Add. It will be Appended + after any sections that are alReady present in the property Set + and thus become the last section. + + + + Writes the property Set To an output stream. + + the output stream To Write the section To + + + + Returns the contents of this property set stream as an input stream. + The latter can be used for example to write the property set into a POIFS + document. The input stream represents a snapshot of the property set. + If the latter is modified while the input stream is still being + read, the modifications will not be reflected in the input stream but in + the {@link MutablePropertySet} only. + + the contents of this property set stream + + + + Writes a property Set To a document in a POI filesystem directory + + The directory in the POI filesystem To Write the document To. + The document's name. If there is alReady a document with the + same name in the directory the latter will be overwritten. + + + + Adds writing capability To the {@link Section} class. + Please be aware that this class' functionality will be merged into the + {@link Section} class at a later time, so the API will Change. + @since 2002-02-20 + + + + If the "dirty" flag is true, the section's size must be + (re-)calculated before the section is written. + + + List To assemble the properties. Unfortunately a wrong + decision has been taken when specifying the "properties" field + as an Property[]. It should have been a {@link java.util.List}. + + + Contains the bytes making out the section. This byte array is + established when the section's size is calculated and can be reused + later. It is valid only if the "dirty" flag is false. + + + + Initializes a new instance of the class. + + + + + Constructs a MutableSection by doing a deep copy of an + existing Section. All nested Property + instances, will be their mutable counterparts in the new + MutableSection. + + The section Set To copy + + + + Sets the section's format ID. + + The section's format ID + + + + Sets the section's format ID. + + The section's format ID as a byte array. It components + are in big-endian format. + + + + Sets this section's properties. Any former values are overwritten. + + This section's new properties. + + + + Sets the string value of the property with the specified ID. + + The property's ID + The property's value. It will be written as a Unicode + string. + + + + Sets the int value of the property with the specified ID. + + The property's ID + The property's value. + + + + Sets the long value of the property with the specified ID. + + The property's ID + The property's value. + + + + Sets the bool value of the property with the specified ID. + + The property's ID + The property's value. + + + + Sets the value and the variant type of the property with the + specified ID. If a property with this ID is not yet present in + the section, it will be Added. An alReady present property with + the specified ID will be overwritten. A default mapping will be + used To choose the property's type. + + The property's ID. + The property's variant type. + The property's value. + + + + Sets the property. + + The property To be Set. + + + + Removes the property. + + The ID of the property To be Removed + + + + Sets the value of the bool property with the specified + ID. + + The property's ID + The property's value + + + + Returns the section's size in bytes. + + The section's size in bytes. + + + + Calculates the section's size. It is the sum of the Lengths of the + section's header (8), the properties list (16 times the number of + properties) and the properties themselves. + + the section's Length in bytes. + + + + Writes this section into an output stream. + Internally this is done by writing into three byte array output + streams: one for the properties, one for the property list and one for + the section as such. The two former are Appended To the latter when they + have received all their data. + + The stream To Write into. + The number of bytes written, i.e. the section's size. + + + + Writes the section's dictionary + + The output stream To Write To. + The dictionary. + The codepage to be used to Write the dictionary items. + The number of bytes written + + see MSDN KB: http://msdn.microsoft.com/en-us/library/aa380065(VS.85).aspx + + + + + OverWrites the base class' method To cope with a redundancy: + the property count is maintained in a separate member variable, but + shouldn't. + + The number of properties in this section. + + + + Returns this section's properties. + + This section's properties. + + + + Ensures the properties. + + + + + Gets a property. + + The ID of the property To Get + The property or null if there is no such property + + + + Sets the section's dictionary. All keys in the dictionary must be + {@link java.lang.long} instances, all values must be + {@link java.lang.String}s. This method overWrites the properties with IDs + 0 and 1 since they are reserved for the dictionary and the dictionary's + codepage. Setting these properties explicitly might have surprising + effects. An application should never do this but always use this + method. + + + the dictionary + + + + + Sets the property. + + The property ID. + The property's value. The value's class must be one of those + supported by HPSF. + + + + Removes all properties from the section including 0 (dictionary) and + 1 (codepage). + + + + + Gets the section's codepage, if any. + + The section's codepage if one is defined, else -1. + + + + This exception is thrown if a {@link MutablePropertySet} is To be written + but does not have a formatID Set (see {@link + MutableSection#SetFormatID(ClassID)} or + {@link org.apache.poi.hpsf.MutableSection#SetFormatID(byte[])}. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-09-03 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception's message string + + + + Initializes a new instance of the class. + + This exception's underlying reason + + + + Initializes a new instance of the class. + + The exception's message string + This exception's underlying reason + + + + This exception is thrown if a format error in a property Set stream Is + detected or when the input data do not constitute a property Set stream. + The constructors of this class are analogous To those of its superclass + and are documented there. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception's message string + + + + Initializes a new instance of the class. + + This exception's underlying reason + + + + Initializes a new instance of the class. + + The exception's message string + This exception's underlying reason + + + + This exception is thrown if one of the {@link PropertySet}'s + convenience methods that require a single {@link Section} is called + and the {@link PropertySet} does not contain exactly one {@link + Section}. + The constructors of this class are analogous To those of its + superclass and documented there. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The exception's message string + + + + Initializes a new instance of the class. + + This exception's underlying reason + + + + Initializes a new instance of the class. + + The exception's message string + This exception's underlying reason + + + + A property in a {@link Section} of a {@link PropertySet}. + The property's ID gives the property a meaning + in the context of its {@link Section}. Each {@link Section} spans + its own name space of property IDs. + The property's type determines how its + value is interpreted. For example, if the type Is + {@link Variant#VT_LPSTR} (byte string), the value consists of a + DWord telling how many bytes the string Contains. The bytes follow + immediately, including any null bytes that terminate the + string. The type {@link Variant#VT_I4} denotes a four-byte integer + value, {@link Variant#VT_FILETIME} some DateTime and time (of a + file). + Please note that not all {@link Variant} types yet. This might Change + over time but largely depends on your feedback so that the POI team knows + which variant types are really needed. So please feel free To submit error + reports or patches for the types you need. + Microsoft documentation: + + Property Set Display Name Dictionary + . + @author Rainer Klute + <klute@rainer-klute.de> + @author Drew Varner (Drew.Varner InAndAround sc.edu) + @see Section + @see Variant + @since 2002-02-09 + + + + The property's ID. + + + Returns the property's ID. + + @return The ID value + + + The property's type. + + + Returns the property's type. + + @return The type value + + + The property's value. + + + + Gets the property's value. + + The property's value + + + + Initializes a new instance of the class. + + the property's ID. + the property's type, see {@link Variant}. + the property's value. Only certain types are allowed, see + {@link Variant}. + + + + Initializes a new instance of the class. + + The property's ID. + The bytes the property Set stream consists of. + The property's type/value pair's offset in the + section. + The property's type/value pair's Length in bytes. + The section's and thus the property's + codepage. It is needed only when Reading string values + + + + Initializes a new instance of the class. + + + + + Reads the dictionary. + + The byte array containing the bytes making out the dictionary. + At this offset within src the dictionary starts. + The dictionary Contains at most this many bytes. + The codepage of the string values. + The dictonary + + + + Gets the property's size in bytes. This is always a multiple of + 4. + + the property's size in bytes + + + + Compares two properties. + Please beware that a property with + ID == 0 is a special case: It does not have a type, and its value is the + section's dictionary. Another special case are strings: Two properties + may have the different types Variant.VT_LPSTR and Variant.VT_LPWSTR; + + The o. + + + + + Typeses the are equal. + + The t1. + The t2. + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Represents a property Set in the Horrible Property Set Format + (HPSF). These are usually metadata of a Microsoft Office + document. + An application that wants To access these metadata should Create + an instance of this class or one of its subclasses by calling the + factory method {@link PropertySetFactory#Create} and then retrieve + the information its needs by calling appropriate methods. + {@link PropertySetFactory#Create} does its work by calling one + of the constructors {@link PropertySet#PropertySet(InputStream)} or + {@link PropertySet#PropertySet(byte[])}. If the constructor's + argument is not in the Horrible Property Set Format, i.e. not a + property Set stream, or if any other error occurs, an appropriate + exception is thrown. + A {@link PropertySet} has a list of {@link Section}s, and each + {@link Section} has a {@link Property} array. Use {@link + #GetSections} To retrieve the {@link Section}s, then call {@link + Section#GetProperties} for each {@link Section} To Get hold of the + {@link Property} arrays. Since the vast majority of {@link + PropertySet}s Contains only a single {@link Section}, the + convenience method {@link #GetProperties} returns the properties of + a {@link PropertySet}'s {@link Section} (throwing a {@link + NoSingleSectionException} if the {@link PropertySet} Contains more + (or less) than exactly one {@link Section}). + @author Rainer Klute + <klute@rainer-klute.de> + @author Drew Varner (Drew.Varner hanginIn sc.edu) + @since 2002-02-09 + + + + The "byteOrder" field must equal this value. + + + Specifies this {@link PropertySet}'s byte order. See the + HPFS documentation for details! + + + + Gets or sets the property Set stream's low-level "byte order" + field. It is always 0xFFFE + + The property Set stream's low-level "byte order" field.. + + + The "format" field must equal this value. + + + Specifies this {@link PropertySet}'s format. See the HPFS + documentation for details! + + + + Gets or sets the property Set stream's low-level "format" + field. It is always 0x0000 + + The property Set stream's low-level "format" field. + + + Specifies the version of the operating system that Created + this {@link PropertySet}. See the HPFS documentation for + details! + + + If the OS version field holds this value the property Set stream Was + Created on a 16-bit Windows system. + + + If the OS version field holds this value the property Set stream Was + Created on a Macintosh system. + + + If the OS version field holds this value the property Set stream Was + Created on a 32-bit Windows system. + + + + Returns the property Set stream's low-level "OS version" + field. + + The property Set stream's low-level "OS version" field. + + + Specifies this {@link PropertySet}'s "classID" field. See + the HPFS documentation for details! + + + + Gets or sets the property Set stream's low-level "class ID" + + The property Set stream's low-level "class ID" field. + + + + Returns the number of {@link Section}s in the property + Set. + + The number of {@link Section}s in the property Set. + + + The sections in this {@link PropertySet}. + + + + Returns the {@link Section}s in the property Set. + + {@link Section}s in the property Set. + + + + Creates an empty (uninitialized) {@link PropertySet} + Please note: For the time being this + constructor is protected since it is used for internal purposes + only, but expect it To become public once the property Set's + writing functionality is implemented. + + + + + Creates a {@link PropertySet} instance from an {@link + InputStream} in the Horrible Property Set Format. + The constructor Reads the first few bytes from the stream + and determines whether it is really a property Set stream. If + it Is, it parses the rest of the stream. If it is not, it + Resets the stream To its beginning in order To let other + components mess around with the data and throws an + exception. + + Holds the data making out the property Set + stream. + + + + Creates a {@link PropertySet} instance from a byte array + that represents a stream in the Horrible Property Set + Format. + + The byte array holding the stream data. + The offset in stream where the stream data begin. + If the stream data begin with the first byte in the + array, the offset is 0. + The Length of the stream data. + + + + Creates a {@link PropertySet} instance from a byte array + that represents a stream in the Horrible Property Set + Format. + + The byte array holding the stream data. The + complete byte array contents is the stream data. + + + + Checks whether an {@link InputStream} is in the Horrible + Property Set Format. + + The {@link InputStream} To check. In order To + perform the check, the method Reads the first bytes from the + stream. After Reading, the stream is Reset To the position it + had before Reading. The {@link InputStream} must support the + {@link InputStream#mark} method. + + true if the stream is a property Set + stream; otherwise, false. + + + + + Checks whether a byte array is in the Horrible Property Set + Format. + + The byte array To check. + The offset in the byte array. + The significant number of bytes in the byte + array. Only this number of bytes will be checked. + + true if the byte array is a property Set + stream; otherwise, false. + + + + + Initializes this {@link PropertySet} instance from a byte + array. The method assumes that it has been checked alReady that + the byte array indeed represents a property Set stream. It does + no more checks on its own. + + Byte array containing the property Set stream + The property Set stream starts at this offset + Length of the property Set stream. + + + + Checks whether this {@link PropertySet} represents a Summary + Information. + + + true Checks whether this {@link PropertySet} represents a Summary + Information; otherwise, false. + + + + + Gets a value indicating whether this instance is document summary information. + + + true if this instance is document summary information; otherwise, false. + + Checks whether this {@link PropertySet} is a Document + Summary Information. + @return + true + if this {@link PropertySet} + represents a Document Summary Information, else + false + + + + Convenience method returning the {@link Property} array + contained in this property Set. It is a shortcut for Getting + the {@link PropertySet}'s {@link Section}s list and then + Getting the {@link Property} array from the first {@link + Section}. + + The properties of the only {@link Section} of this + {@link PropertySet}. + + + + Convenience method returning the value of the property with + the specified ID. If the property is not available, + null is returned and a subsequent call To {@link + #WasNull} will return true . + + The property ID + The property value + + + + Convenience method returning the value of a bool property + with the specified ID. If the property is not available, + false is returned. A subsequent call To {@link + #WasNull} will return true To let the caller + distinguish that case from a real property value of + false. + + The property ID + The property value + + + + Convenience method returning the value of the numeric + property with the specified ID. If the property is not + available, 0 is returned. A subsequent call To {@link #WasNull} + will return true To let the caller distinguish + that case from a real property value of 0. + + The property ID + The propertyIntValue value + + + + Checks whether the property which the last call To {@link + #GetPropertyIntValue} or {@link #GetProperty} tried To access + Was available or not. This information might be important for + callers of {@link #GetPropertyIntValue} since the latter + returns 0 if the property does not exist. Using {@link + #WasNull}, the caller can distiguish this case from a + property's real value of 0. + + true if the last call To {@link + #GetPropertyIntValue} or {@link #GetProperty} tried To access a + property that Was not available; otherwise, false. + + + + Gets the first section. + + The first section. + + + + If the {@link PropertySet} has only a single section this + method returns it. + + The singleSection value + + + + Returns true if the PropertySet is equal + To the specified parameter, else false. + + the object To Compare this + PropertySet + with + true + if the objects are equal, + false + if not + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Factory class To Create instances of {@link SummaryInformation}, + {@link DocumentSummaryInformation} and {@link PropertySet}. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + +

    Creates the most specific {@link PropertySet} from an entry + in the specified POIFS Directory. This is preferrably a {@link + DocumentSummaryInformation} or a {@link SummaryInformation}. If + the specified entry does not contain a property Set stream, an + exception is thrown. If no entry is found with the given name, + an exception is thrown.

    + + @param dir The directory to find the PropertySet in + @param name The name of the entry Containing the PropertySet + @return The Created {@link PropertySet}. + @if there is no entry with that name + @if the stream does not + contain a property Set. + @if some I/O problem occurs. + @exception EncoderFallbackException if the specified codepage is not + supported. +
    + + + Creates the most specific {@link PropertySet} from an {@link + InputStream}. This is preferrably a {@link + DocumentSummaryInformation} or a {@link SummaryInformation}. If + the specified {@link InputStream} does not contain a property + Set stream, an exception is thrown and the {@link InputStream} + is repositioned at its beginning. + + Contains the property set stream's data. + The Created {@link PropertySet}. + + + + Creates a new summary information + + the new summary information. + + + + Creates a new document summary information. + + the new document summary information. + + + + This exception is thrown when HPSF tries To Read a (yet) unsupported + variant type. + @see WritingNotSupportedException + @see UnsupportedVariantTypeException + @author Rainer Klute + <klute@rainer-klute.de> + @since 2003-08-08 + + + + + Initializes a new instance of the class. + + The unsupported variant type + The value who's variant type is not yet supported + + + + Represents a section in a {@link PropertySet}. + @author Rainer Klute + <klute@rainer-klute.de> + @author Drew Varner (Drew.Varner allUpIn sc.edu) + @since 2002-02-09 + + + + Maps property IDs To section-private PID strings. These + strings can be found in the property with ID 0. + + + The section's format ID, {@link #GetFormatID}. + + + + Returns the format ID. The format ID is the "type" of the + section. For example, if the format ID of the first {@link + Section} Contains the bytes specified by + org.apache.poi.hpsf.wellknown.SectionIDMap.SUMMARY_INFORMATION_ID + the section (and thus the property Set) is a SummaryInformation. + + The format ID. + + + + Gets the offset of the section in the stream. + + The offset of the section in the stream + + + + Returns the section's size in bytes. + + The section's size in bytes. + + + + Returns the number of properties in this section. + + The number of properties in this section. + + + + Returns this section's properties. + + This section's properties. + + + + Creates an empty and uninitialized {@link Section}. + + + + + Creates a {@link Section} instance from a byte array. + + Contains the complete property Set stream. + The position in the stream that points To the + section's format ID. + + + Represents an entry in the property list and holds a property's ID and + its offset from the section's beginning. + + + Compares this {@link PropertyListEntry} with another one by their + offsets. A {@link PropertyListEntry} is "smaller" than another one if + its offset from the section's begin is smaller. + + @see Comparable#CompareTo(java.lang.Object) + + + Returns the value of the property with the specified ID. If + the property is not available, null is returned + and a subsequent call To {@link #wasNull} will return + true. + + @param id The property's ID + + @return The property's value + + + Returns the value of the numeric property with the specified + ID. If the property is not available, 0 is returned. A + subsequent call To {@link #wasNull} will return + true To let the caller distinguish that case from + a real property value of 0. + + @param id The property's ID + + @return The property's value + + + Returns the value of the bool property with the specified + ID. If the property is not available, false Is + returned. A subsequent call To {@link #wasNull} will return + true To let the caller distinguish that case from + a real property value of false. + + @param id The property's ID + + @return The property's value + + + This member is true if the last call To {@link + #GetPropertyIntValue} or {@link #GetProperty} tried To access a + property that was not available, else false. + + + + Checks whether the property which the last call To {@link + #GetPropertyIntValue} or {@link #GetProperty} tried To access + was available or not. This information might be important for + callers of {@link #GetPropertyIntValue} since the latter + returns 0 if the property does not exist. Using {@link + #wasNull} the caller can distiguish this case from a property's + real value of 0. + + true if the last call To {@link + #GetPropertyIntValue} or {@link #GetProperty} tried To access a + property that was not available; otherwise, false. + + + + Returns the PID string associated with a property ID. The ID + is first looked up in the {@link Section}'s private + dictionary. If it is not found there, the method calls {@link + SectionIDMap#GetPIDString}. + + The property ID. + The property ID's string value + + + Checks whether this section is equal To another object. The result Is + false if one of the the following conditions holds: + +
      + +
    • The other object is not a {@link Section}.
    • + +
    • The format IDs of the two sections are not equal.
    • + +
    • The sections have a different number of properties. However, + properties with ID 1 (codepage) are not counted.
    • + +
    • The other object is not a {@link Section}.
    • + +
    • The properties have different values. The order of the properties + is irrelevant.
    • + +
    + + @param o The object To Compare this section with + @return true if the objects are equal, false if + not +
    + + + Removes a field from a property array. The resulting array Is + compactified and returned. + + The property array. + The index of the field To be Removed. + the compactified array. + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets the section's dictionary. A dictionary allows an application To + use human-Readable property names instead of numeric property IDs. It + Contains mappings from property IDs To their associated string + values. The dictionary is stored as the property with ID 0. The codepage + for the strings in the dictionary is defined by property with ID 1. + + the dictionary or null + if the section does not have + a dictionary. + + + + Gets the section's codepage, if any. + + The section's codepage if one is defined, else -1. + + + + Abstract superclass for the convenience classes {@link + SummaryInformation} and {@link DocumentSummaryInformation}. + The motivation behind this class is quite nasty if you look + behind the scenes, but it serves the application programmer well by + providing him with the easy-to-use {@link SummaryInformation} and + {@link DocumentSummaryInformation} classes. When parsing the data a + property Set stream consists of (possibly coming from an {@link + java.io.Stream}) we want To Read and process each byte only + once. Since we don't know in advance which kind of property Set we + have, we can expect only the most general {@link + PropertySet}. Creating a special subclass should be as easy as + calling the special subclass' constructor and pass the general + {@link PropertySet} in. To make things easy internally, the special + class just holds a reference To the general {@link PropertySet} and + delegates all method calls To it. + A cleaner implementation would have been like this: The {@link + PropertySetFactory} parses the stream data into some internal + object first. Then it Finds out whether the stream is a {@link + SummaryInformation}, a {@link DocumentSummaryInformation} or a + general {@link PropertySet}. However, the current implementation + went the other way round historically: the convenience classes came + only late To my mind. + @author Rainer Klute + klute@rainer-klute.de + @since 2002-02-09 + + + + The id to name mapping of the properties + in this set. + + + The "real" property Set SpecialPropertySet + delegates To. + + + + Initializes a new instance of the class. + + The property Set To be encapsulated by the SpecialPropertySet + + + + Initializes a new instance of the class. + + The mutable property Set To be encapsulated by the SpecialPropertySet + + + + gets or sets the "byteOrder" property. + + the byteOrder value To Set + + + + gets or sets the "format" property + + the format value To Set + + + + gets or sets the property Set stream's low-level "class ID" + field. + + The property Set stream's low-level "class ID" field + + + + Returns the number of {@link Section}s in the property + Set. + + The number of {@link Section}s in the property Set. + + + + Checks whether this {@link PropertySet} represents a Summary + Information. + + + true Checks whether this {@link PropertySet} represents a Summary + Information; otherwise, false. + + + + + Gets a value indicating whether this instance is document summary information. + + + true if this instance is document summary information; otherwise, false. + + Checks whether this {@link PropertySet} is a Document + Summary Information. + @return + true + if this {@link PropertySet} + represents a Document Summary Information, else + false + + + + Gets the PropertySet's first section. + + The {@link PropertySet}'s first section. + + + + Adds a section To this property set. + + The {@link Section} To Add. It will be Appended + after any sections that are alReady present in the property Set + and thus become the last section. + + + + Removes all sections from this property Set. + + + + + gets or sets the "osVersion" property + + the osVersion value To Set + + + + Writes a property Set To a document in a POI filesystem directory. + + The directory in the POI filesystem To Write the document To + The document's name. If there is alReady a document with the + same name in the directory the latter will be overwritten. + + + + Writes the property Set To an output stream. + + the output stream To Write the section To + + + + Returns true if the PropertySet is equal + To the specified parameter, else false. + + the object To Compare this + PropertySet + with + + true + if the objects are equal, + false + if not + + + + + Convenience method returning the {@link Property} array + contained in this property Set. It is a shortcut for Getting + the {@link PropertySet}'s {@link Section}s list and then + Getting the {@link Property} array from the first {@link + Section}. + + + The properties of the only {@link Section} of this + {@link PropertySet}. + + + + + Convenience method returning the value of the property with + the specified ID. If the property is not available, + null is returned and a subsequent call To {@link + #WasNull} will return true . + + The property ID + The property value + + + + Convenience method returning the value of a bool property + with the specified ID. If the property is not available, + false is returned. A subsequent call To {@link + #WasNull} will return true To let the caller + distinguish that case from a real property value of + false. + + The property ID + The property value + + + + Convenience method returning the value of the numeric + property with the specified ID. If the property is not + available, 0 is returned. A subsequent call To {@link #WasNull} + will return true To let the caller distinguish + that case from a real property value of 0. + + The property ID + The propertyIntValue value + + + Fetches the property with the given ID, then does its + best to return it as a String + @return The property as a String, or null if unavailable + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Checks whether the property which the last call To {@link + #GetPropertyIntValue} or {@link #GetProperty} tried To access + Was available or not. This information might be important for + callers of {@link #GetPropertyIntValue} since the latter + returns 0 if the property does not exist. Using {@link + #WasNull}, the caller can distiguish this case from a + property's real value of 0. + + + true if the last call To {@link + #GetPropertyIntValue} or {@link #GetProperty} tried To access a + property that Was not available; otherwise, false. + + + + + Convenience class representing a Summary Information stream in a + Microsoft Office document. + @author Rainer Klute + <klute@rainer-klute.de> + @see DocumentSummaryInformation + @since 2002-02-09 + + + + The document name a summary information stream usually has in a POIFS + filesystem. + + + + Initializes a new instance of the class. + + A property Set which should be Created from a summary + information stream. + + + + Gets or sets the title. + + The title. + + + + Removes the title. + + + + + Gets or sets the subject. + + The subject. + + + + Removes the subject. + + + + + Gets or sets the author. + + The author. + + + + Removes the author. + + + + + Gets or sets the keywords. + + The keywords. + + + + Removes the keywords. + + + + + Gets or sets the comments. + + The comments. + + + + Removes the comments. + + + + + Gets or sets the template. + + The template. + + + + Removes the template. + + + + + Gets or sets the last author. + + The last author. + + + + Removes the last author. + + + + + Gets or sets the rev number. + + The rev number. + + + + Removes the rev number. + + + + + Returns the Total time spent in editing the document (or 0). + + The Total time spent in editing the document or 0 if the {@link + SummaryInformation} does not contain this information. + + + + Removes the edit time. + + + + + Gets or sets the last printed time + + The last printed time + Returns the last printed time (or null). + + + + Removes the last printed. + + + + + Gets or sets the create date time. + + The create date time. + + + + Removes the create date time. + + + + + Gets or sets the last save date time. + + The last save date time. + + + + Removes the last save date time. + + + + + Gets or sets the page count or 0 if the {@link SummaryInformation} does + not contain a page count. + + The page count or 0 if the {@link SummaryInformation} does not + contain a page count. + + + + Removes the page count. + + + + + Gets or sets the word count or 0 if the {@link SummaryInformation} does + not contain a word count. + + The word count. + + + + Removes the word count. + + + + + Gets or sets the character count or 0 if the {@link SummaryInformation} + does not contain a char count. + + The character count. + + + + Removes the char count. + + + + + Gets or sets the thumbnail (or null) when this + method is implemented. Please note that the return type is likely To + Change! +

    To process this data, you may wish to make use of the + {@link Thumbnail} class. The raw data is generally + an image in WMF or Clipboard (BMP?) format

    +
    + The thumbnail. +
    + + + Returns the thumbnail or null, processed as an object + which is (largely) able to unpack the thumbnail image data. + + + + + Removes the thumbnail. + + + + + Gets or sets the name of the application. + + The name of the application. + + + + Removes the name of the application. + + + + + Gets or sets a security code which is one of the following values: +
      +
    • 0 if the {@link SummaryInformation} does not contain a + security field or if there is no security on the document. Use + {@link PropertySet#wasNull()} To distinguish between the two + cases!
    • +
    • 1 if the document is password protected
    • +
    • 2 if the document is Read-only recommended
    • +
    • 4 if the document is Read-only enforced
    • +
    • 8 if the document is locked for annotations
    • +
    +
    + The security code +
    + + + Removes the security code. + + + + + Class To manipulate data in the Clipboard Variant (Variant#VT_CF VT_CF) format. + @author Drew Varner (Drew.Varner inOrAround sc.edu) + @since 2002-04-29 + + + + + OffSet in bytes where the Clipboard Format Tag starts in the byte[] returned by SummaryInformation#GetThumbnail() + + + + + OffSet in bytes where the Clipboard Format starts in the byte[] returned by SummaryInformation#GetThumbnail() + + This is only valid if the Clipboard Format Tag is CFTAG_WINDOWS + + + + OffSet in bytes where the Windows Metafile (WMF) image data starts in the byte[] returned by SummaryInformation#GetThumbnail() + There is only WMF data at this point in the + byte[] if the Clipboard Format Tag is + CFTAG_WINDOWS and the Clipboard Format is + CF_METAFILEPICT. + + Note: The byte[] that starts at + OFFSet_WMFDATA and ends at + GetThumbnail().Length - 1 forms a complete WMF + image. It can be saved To disk with a .wmf file + type and Read using a WMF-capable image viewer. + + + + Clipboard Format Tag - Windows clipboard format + + A DWORD indicating a built-in Windows clipboard format value + + + + Clipboard Format Tag - Macintosh clipboard format + + A DWORD indicating a Macintosh clipboard format value + + + + Clipboard Format Tag - Format ID + + A GUID containing a format identifier (FMTID). This is rarely used. + + + + Clipboard Format Tag - No Data + + A DWORD indicating No data. This is rarely used. + + + + Clipboard Format - Windows metafile format. This is the recommended way To store thumbnails in Property Streams. + + Note:This is not the same format used in + regular WMF images. The clipboard version of this format has an + extra clipboard-specific header. + + + + Clipboard Format - Device Independent Bitmap + + + + + Clipboard Format - Enhanced Windows metafile format + + + + + Clipboard Format - Bitmap + + see msdn.microsoft.com/library/en-us/dnw98bk/html/clipboardoperations.asp + + + A byte[] To hold a thumbnail image in ( + Variant#VT_CF VT_CF) format. + + + + Default Constructor. If you use it then one you'll have To Add + the thumbnail byte[] from {@link + SummaryInformation#GetThumbnail()} To do any useful + manipulations, otherwise you'll Get a + NullPointerException. + + + + + Initializes a new instance of the class. + + The thumbnail data. + + + + Gets or sets the thumbnail as a byte[] in {@link + Variant#VT_CF VT_CF} format. + + The thumbnail value + + + + Returns an int representing the Clipboard + Format Tag + Possible return values are: +
      +
    • {@link #CFTAG_WINDOWS CFTAG_WINDOWS}
    • +
    • {@link #CFTAG_MACINTOSH CFTAG_MACINTOSH}
    • +
    • {@link #CFTAG_FMTID CFTAG_FMTID}
    • +
    • {@link #CFTAG_NODATA CFTAG_NODATA}
    • +
    +
    + A flag indicating the Clipboard Format Tag +
    + + + Returns an int representing the Clipboard + Format + Will throw an exception if the Thumbnail's Clipboard Format + Tag is not {@link Thumbnail#CFTAG_WINDOWS CFTAG_WINDOWS}. + Possible return values are: +
      +
    • {@link #CF_METAFILEPICT CF_METAFILEPICT}
    • +
    • {@link #CF_DIB CF_DIB}
    • +
    • {@link #CF_ENHMETAFILE CF_ENHMETAFILE}
    • +
    • {@link #CF_BITMAP CF_BITMAP}
    • +
    +
    + a flag indicating the Clipboard Format +
    + + + Returns the Thumbnail as a byte[] of WMF data + if the Thumbnail's Clipboard Format Tag is {@link + #CFTAG_WINDOWS CFTAG_WINDOWS} and its Clipboard Format is + {@link #CF_METAFILEPICT CF_METAFILEPICT} + This + byte[] is in the traditional WMF file, not the + clipboard-specific version with special headers. + See http://www.wvware.com/caolan/ora-wmf.html + for more information on the WMF image format. + @return A WMF image of the Thumbnail + @throws HPSFException if the Thumbnail isn't CFTAG_WINDOWS and + CF_METAFILEPICT + + + + + + Class for writing little-endian data and more. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2003-02-20 + + + + + Writes a two-byte value (short) To an output stream. + + The stream To Write To.. + The number of bytes that have been written. + + + + Writes a four-byte value To an output stream. + + @param out The stream To Write To. + @param n The value To Write. + @exception IOException if an I/O error occurs + @return The number of bytes written To the output stream. + + + Writes a four-byte value To an output stream. + + @param out The stream To Write To. + @param n The value To Write. + @exception IOException if an I/O error occurs + @return The number of bytes written To the output stream. + + + Writes a eight-byte value To an output stream. + + @param out The stream To Write To. + @param n The value To Write. + @exception IOException if an I/O error occurs + @return The number of bytes written To the output stream. + + + Writes an unsigned two-byte value To an output stream. + + @param out The stream To Write To + @param n The value To Write + @exception IOException if an I/O error occurs + + + Writes an unsigned four-byte value To an output stream. + + @param out The stream To Write To. + @param n The value To Write. + @return The number of bytes that have been written To the output stream. + @exception IOException if an I/O error occurs + + + Writes a 16-byte {@link ClassID} To an output stream. + + @param out The stream To Write To + @param n The value To Write + @return The number of bytes written + @exception IOException if an I/O error occurs + + + Writes an array of {@link Property} instances To an output stream + according To the Horrible Property Format. + + @param out The stream To Write To + @param properties The array To Write To the stream + @param codepage The codepage number To use for writing strings + @exception IOException if an I/O error occurs + @throws UnsupportedVariantTypeException if HPSF does not support some + variant type. + + + Writes a double value value To an output stream. + + @param out The stream To Write To. + @param n The value To Write. + @exception IOException if an I/O error occurs + @return The number of bytes written To the output stream. + + + + This exception is thrown if a certain type of property Set Is + expected (e.g. a Document Summary Information) but the provided + property Set is not of that type. + The constructors of this class are analogous To those of its + superclass and documented there. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message string. + + + + Initializes a new instance of the class. + + The reason, i.e. a throwable that indirectly + caused this exception. + + + + Initializes a new instance of the class. + + The message string. + The reason, i.e. a throwable that indirectly + caused this exception. + + + + This exception is thrown if HPSF encounters a variant type that isn't + supported yet. Although a variant type is unsupported the value can still be + retrieved using the {@link VariantTypeException#GetValue} method. + Obviously this class should disappear some day. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2003-08-05 + + + + + Initializes a new instance of the class. + + The unsupported variant type + The value who's variant type is not yet supported + + + + Provides various static utility methods. + @author Rainer Klute (klute@rainer-klute.de) + @since 2002-02-09 + + + + + Copies a part of a byte array into another byte array. + + The source byte array. + OffSet in the source byte array. + The number of bytes To Copy. + The destination byte array. + OffSet in the destination byte array. + + + + Concatenates the contents of several byte arrays into a + single one. + + The byte arrays To be conCatened. + A new byte array containing the conCatenated byte arrays. + + + + Copies bytes from a source byte array into a new byte + array. + + Copy from this byte array. + Start Copying here. + Copy this many bytes. + The new byte array. Its Length is number of copied bytes. + + + The difference between the Windows epoch (1601-01-01 + 00:00:00) and the Unix epoch (1970-01-01 00:00:00) in + milliseconds: 11644473600000L. (Use your favorite spReadsheet + program To verify the correctness of this value. By the way, + did you notice that you can tell from the epochs which + operating system is the modern one? :-)) + + + + Converts a Windows FILETIME into a {@link DateTime}. The Windows + FILETIME structure holds a DateTime and time associated with a + file. The structure identifies a 64-bit integer specifying the + number of 100-nanosecond intervals which have passed since + January 1, 1601. This 64-bit value is split into the two double + words stored in the structure. + + The higher double word of the FILETIME structure. + The lower double word of the FILETIME structure. + The Windows FILETIME as a {@link DateTime}. + + + + Converts a Windows FILETIME into a {@link DateTime}. The Windows + FILETIME structure holds a DateTime and time associated with a + file. The structure identifies a 64-bit integer specifying the + number of 100-nanosecond intervals which have passed since + January 1, 1601. + + The filetime To Convert. + The Windows FILETIME as a {@link DateTime}. + + + + Converts a {@link DateTime} into a filetime. + + The DateTime To be Converted + The filetime + + + + Compares To object arrays with regarding the objects' order. For + example, [1, 2, 3] and [2, 1, 3] are equal. + + The first object array. + The second object array. + true + if the object arrays are equal, + false + if they are not. + + + + Internals the equals. + + The c1. + The c2. + + + + + Pads a byte array with 0x00 bytes so that its Length is a multiple of + 4. + + The byte array To pad. + The padded byte array. + + + + Pads a character array with 0x0000 characters so that its Length is a + multiple of 4. + + The character array To pad. + The padded character array. + + + + Pads a string with 0x0000 characters so that its Length is a + multiple of 4. + + The string To pad. + The padded string as a character array. + + + + The Variant types as defined by Microsoft's COM. I + found this information in + http://www.marin.clara.net/COM/variant_type_definitions.htm. + In the variant types descriptions the following shortcuts are + used: [V] - may appear in a VARIANT, + [T] - may appear in a TYPEDESC, + [P] - may appear in an OLE property Set, + [S] - may appear in a Safe Array. + @author Rainer Klute (klute@rainer-klute.de) + @since 2002-02-09 + + + + [V][P] Nothing, i.e. not a single byte of data. + + + [V][P] SQL style Null. + + + [V][T][P][S] 2 byte signed int. + + + [V][T][P][S] 4 byte signed int. + + + [V][T][P][S] 4 byte real. + + + [V][T][P][S] 8 byte real. + + + [V][T][P][S] currency. How long is this? How is it To be + interpreted? + + + [V][T][P][S] DateTime. How long is this? How is it To be + interpreted? + + + [V][T][P][S] OLE Automation string. How long is this? How is it + To be interpreted? + + + [V][T][P][S] IDispatch *. How long is this? How is it To be + interpreted? + + + [V][T][S] SCODE. How + long is this? How is it To be interpreted? + + + [V][T][P][S] True=-1, False=0. + + + [V][T][P][S] VARIANT *. How long is this? How is it To be + interpreted? + + + [V][T][S] IUnknown *. How long is this? How is it To be + interpreted? + + + [V][T][S] 16 byte fixed point. + + + [T] signed char. + + + [V][T][P][S] unsigned char. + + + [T][P] unsigned short. + + + [T][P] unsigned int. + + + [T][P] signed 64-bit int. + + + [T][P] unsigned 64-bit int. + + + [T] signed machine int. + + + [T] unsigned machine int. + + + [T] C style void. + + + [T] Standard return type. How long is this? How is it To be + interpreted? + + + [T] pointer type. How long is this? How is it To be + interpreted? + + + [T] (use VT_ARRAY in VARIANT). + + + [T] C style array. How long is this? How is it To be + interpreted? + + + [T] user defined type. How long is this? How is it To be + interpreted? + + + [T][P] null terminated string. + + + [T][P] wide (Unicode) null terminated string. + + + [P] FILETIME. The FILETIME structure holds a DateTime and time + associated with a file. The structure identifies a 64-bit + integer specifying the number of 100-nanosecond intervals which + have passed since January 1, 1601. This 64-bit value is split + into the two dwords stored in the structure. + + + [P] Length prefixed bytes. + + + [P] Name of the stream follows. + + + [P] Name of the storage follows. + + + [P] Stream Contains an object. How long is this? How is it + To be interpreted? + + + [P] Storage Contains an object. How long is this? How is it + To be interpreted? + + + [P] Blob Contains an object. How long is this? How is it To be + interpreted? + + + [P] Clipboard format. How long is this? How is it To be + interpreted? + + + [P] A Class ID. + + It consists of a 32 bit unsigned integer indicating the size + of the structure, a 32 bit signed integer indicating (Clipboard + Format Tag) indicating the type of data that it Contains, and + then a byte array containing the data. + + The valid Clipboard Format Tags are: + +
      +
    • {@link Thumbnail#CFTAG_WINDOWS}
    • +
    • {@link Thumbnail#CFTAG_MACINTOSH}
    • +
    • {@link Thumbnail#CFTAG_NODATA}
    • +
    • {@link Thumbnail#CFTAG_FMTID}
    • +
    + +
    typedef struct tagCLIPDATA {
    +             // cbSize is the size of the buffer pointed To
    +             // by pClipData, plus sizeof(ulClipFmt)
    +             ULONG              cbSize;
    +             long               ulClipFmt;
    +             BYTE*              pClipData;
    +             } CLIPDATA;
    + + See + msdn.microsoft.com/library/en-us/com/stgrstrc_0uwk.asp. +
    + + "MUST be a VersionedStream. The storage representing the (non-simple) + property set MUST have a stream element with the name in the StreamName + field." -- [MS-OLEPS] -- v20110920; Object Linking and Embedding (OLE) + Property Set Data Structures; page 24 / 63 + + + [P] simple counted array. How long is this? How is it To be + interpreted? + + + [V] SAFEARRAY*. How + long is this? How is it To be interpreted? + + + [V] void* for local use. How long is this? How is it To be + interpreted? + + + FIXME (3): Document this! + + + FIXME (3): Document this! + + + FIXME (3): Document this! + + + FIXME (3): Document this! + + + Maps the numbers denoting the variant types To their corresponding + variant type names. + + + Denotes a variant type with a Length that is unknown To HPSF yet. + + + Denotes a variant type with a variable Length. + + + Denotes a variant type with a Length of 0 bytes. + + + Denotes a variant type with a Length of 2 bytes. + + + Denotes a variant type with a Length of 4 bytes. + + + Denotes a variant type with a Length of 8 bytes. + + + + Returns the variant type name associated with a variant type + number. + + The variant type number. + The variant type name or the string "unknown variant type" + + + + Returns a variant type's Length. + + The variant type number. + The Length of the variant type's data in bytes. If the Length Is + variable, i.e. the Length of a string, -1 is returned. If HPSF does not + know the Length, -2 is returned. The latter usually indicates an + unsupported variant type. + + + + Supports Reading and writing of variant data. + FIXME (3): + Reading and writing should be made more + uniform than it is now. The following items should be resolved: + Reading requires a Length parameter that is 4 byte greater than the + actual data, because the variant type field is included. + Reading Reads from a byte array while writing Writes To an byte array + output stream. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2003-08-08 + + + + + Checks whether logging of unsupported variant types warning is turned + on or off. + + + true if logging is turned on; otherwise, false. + + + + Keeps a list of the variant types an "unsupported" message has alReady + been issued for. + + + + Writes a warning To System.err that a variant type Is + unsupported by HPSF. Such a warning is written only once for each variant + type. Log messages can be turned on or off by + + The exception To log + + + HPSF is able To Read these {@link Variant} types. + + + + Checks whether HPSF supports the specified variant type. Unsupported + types should be implemented included in the {@link #SUPPORTED_TYPES} + array. + + the variant type To check + + true if HPFS supports this type,otherwise, false. + + + + + Reads a variant type from a byte array + + The byte array + The offset in the byte array where the variant starts + The Length of the variant including the variant type field + The variant type To Read + The codepage To use for non-wide strings + A Java object that corresponds best To the variant field. For + example, a VT_I4 is returned as a {@link long}, a VT_LPSTR as a + {@link String}. + + +

    Turns a codepage number into the equivalent character encoding's + name.

    + + @param codepage The codepage number + + @return The character encoding's name. If the codepage number is 65001, + the encoding name is "UTF-8". All other positive numbers are mapped to + "cp" followed by the number, e.g. if the codepage number is 1252 the + returned character encoding name will be "cp1252". + + @exception UnsupportedEncodingException if the specified codepage is + less than zero. +
    + + + Writes a variant value To an output stream. This method ensures that + always a multiple of 4 bytes is written. + If the codepage is UTF-16, which is encouraged, strings + must always be written as {@link Variant#VT_LPWSTR} + strings, not as {@link Variant#VT_LPSTR} strings. This method ensure this + by Converting strings appropriately, if needed. + + The stream To Write the value To. + The variant's type. + The variant's value. + The codepage To use To Write non-wide strings + The number of entities that have been written. In many cases an + "entity" is a byte but this is not always the case. + + + + This exception is thrown if HPSF encounters a problem with a variant type. + Concrete subclasses specifiy the problem further. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2004-06-21 + + + + + Initializes a new instance of the class. + + The variant type causing the problem + The value who's variant type causes the problem + A message text describing the problem + + + + Gets the offending variant type + + the offending variant type. + + + + Returns the value who's variant type caused the problem. + + the value who's variant type caused the problem. + + + + This is a dictionary which maps property ID values To property + ID strings. + The methods {@link #GetSummaryInformationProperties} and {@link + #GetDocumentSummaryInformationProperties} return singleton {@link + PropertyIDMap}s. An application that wants To extend these maps + should treat them as unmodifiable, copy them and modifiy the + copies. + @author Rainer Klute + <klute@rainer-klute.de> + @since 2002-02-09 + + + + ID of the property that denotes the document's title + + + ID of the property that denotes the document's subject + + + ID of the property that denotes the document's author + + + ID of the property that denotes the document's keywords + + + ID of the property that denotes the document's comments + + + ID of the property that denotes the document's template + + + ID of the property that denotes the document's last author + + + ID of the property that denotes the document's revision number + + + ID of the property that denotes the document's edit time + + + ID of the property that denotes the DateTime and time the document was + last printed + + + ID of the property that denotes the DateTime and time the document was + Created. + + + ID of the property that denotes the DateTime and time the document was + saved + + + ID of the property that denotes the number of pages in the + document + + + ID of the property that denotes the number of words in the + document + + + ID of the property that denotes the number of characters in the + document + + + ID of the property that denotes the document's thumbnail + + + ID of the property that denotes the application that Created the + document + + + ID of the property that denotes whether Read/Write access To the + document is allowed or whether is should be opened as Read-only. It can + have the following values: + + + + + + + + + + + + + + + + + + + + +
    ValueDescription
    0No restriction
    2Read-only recommended
    4Read-only enforced
    +
    + + The entry is a dictionary. + + + The entry denotes a code page. + + + The entry is a string denoting the category the file belongs + To, e.g. review, memo, etc. This is useful To Find documents of + same type. + + + TarGet format for power point presentation, e.g. 35mm, + printer, video etc. + + + Number of bytes. + + + Number of lines. + + + Number of paragraphs. + + + Number of slides in a power point presentation. + + + Number of slides with notes. + + + Number of hidden slides. + + + Number of multimedia clips, e.g. sound or video. + + + This entry is Set To -1 when scaling of the thumbnail Is + desired. Otherwise the thumbnail should be cropped. + + + This entry denotes an internally used property. It is a + vector of variants consisting of pairs of a string (VT_LPSTR) + and a number (VT_I4). The string is a heading name, and the + number tells how many document parts are under that + heading. + + + This entry Contains the names of document parts (word: names + of the documents in the master document, excel: sheet names, + power point: slide titles, binder: document names). + + + This entry Contains the name of the project manager. + + + This entry Contains the company name. + + + If this entry is -1 the links are dirty and should be + re-evaluated. + + + The entry specifies an estimate of the number of characters + in the document, including whitespace, as an integer + + + This entry contains a boolean which marks if the User Defined + Property Set has been updated outside of the Application, if so the + hyperlinks should be updated on document load. + + + This entry contains the version of the Application which wrote the + Property set, stored with the two high order bytes having the major + version number, and the two low order bytes the minor version number. + + + This entry contains the VBA digital signature for the VBA project + embedded in the document. + + + This entry contains a string of the content type of the file. + + + This entry contains a string of the document status. + + + This entry contains a string of the document language, but + normally should be empty. + + + This entry contains a string of the document version, but + normally should be empty + + +

    The highest well-known property ID. Applications are free to use + higher values for custom purposes. (This value is based on Office 12, + earlier versions of Office had lower values)

    +
    + + Contains the summary information property ID values and + associated strings. See the overall HPSF documentation for + details! + + + Contains the summary information property ID values and + associated strings. See the overall HPSF documentation for + details! + + + + Initializes a new instance of the class. + + initialCapacity The initial capacity as defined for + {@link HashMap} + The load factor as defined for {@link HashMap} + + + + Initializes a new instance of the class. + + The instance To be Created is backed by this map. + + + + Puts a ID string for an ID into the {@link + PropertyIDMap}. + + The ID string. + The id string. + As specified by the {@link java.util.Map} interface, this method + returns the previous value associated with the specified id + + + + Gets the ID string for an ID from the {@link + PropertyIDMap}. + + The ID. + The ID string associated with id + + + + Gets the Summary Information properties singleton + + + + + + Gets the Document Summary Information properties + singleton. + + The Document Summary Information properties singleton. + + + + Maps section format IDs To {@link PropertyIDMap}s. It Is + initialized with two well-known section format IDs: those of the + \005SummaryInformation stream and the + \005DocumentSummaryInformation stream. + If you have a section format ID you can use it as a key To query + this map. If you Get a {@link PropertyIDMap} returned your section + is well-known and you can query the {@link PropertyIDMap} for PID + strings. If you Get back null you are on your own. + This {@link java.util.Map} expects the byte arrays of section format IDs + as keys. A key maps To a {@link PropertyIDMap} describing the + property IDs in sections with the specified section format ID. + @author Rainer Klute (klute@rainer-klute.de) + @since 2002-02-09 + + + + The SummaryInformation's section's format ID. + + + The DocumentSummaryInformation's first and second sections' format + ID. + + + A property without a known name is described by this string. + + + The default section ID map. It maps section format IDs To + {@link PropertyIDMap}s. + + + + Returns the singleton instance of the default {@link + SectionIDMap}. + + The instance value + + + + Returns the property ID string that is associated with a + given property ID in a section format ID's namespace. + + Each section format ID has its own name + space of property ID strings and thus must be specified. + The property ID + The well-known property ID string associated with the + property ID pid in the name space spanned by sectionFormatID If the pid + sectionFormatID combination is not well-known, the + string "[undefined]" is returned. + + + + + Returns the {@link PropertyIDMap} for a given section format + ID. + + The section format ID. + the property ID map + + + + Associates a section format ID with a {@link + PropertyIDMap}. + + the section format ID + The property ID map. + + + + + This exception is thrown when trying To Write a (yet) unsupported variant + type. + @see ReadingNotSupportedException + @see UnsupportedVariantTypeException + @author Rainer Klute + <klute@rainer-klute.de> + @since 2003-08-08 + + + + + Initializes a new instance of the class. + + The unsupported variant type. + The value + + + A text extractor for old Excel files, which are too old for + HSSFWorkbook to handle. This includes Excel 95, and very old + (pre-OLE2) Excel files, such as Excel 4 files. +

    + Returns much (but not all) of the textual content of the file, + suitable for indexing by something like Apache Lucene, or used + by Apache Tika, but not really intended for display to the user. +

    +
    + + The Biff version, largely corresponding to the Excel version + + + The kind of the file, one of {@link BOFRecord#TYPE_WORKSHEET}, + {@link BOFRecord#TYPE_CHART}, {@link BOFRecord#TYPE_EXCEL_4_MACRO} + or {@link BOFRecord#TYPE_WORKSPACE_FILE} + + + Retrieves the text contents of the file, as best we can + for these old file formats + + + + A text extractor for Excel files, that is based + on the hssf eventusermodel api. + It will typically use less memory than + ExcelExtractor, but may not provide + the same richness of formatting. + Returns the textual content of the file, suitable for + indexing by something like Lucene, but not really + intended for display to the user. + + + + + Would return the document information metadata for the document, + if we supported it + + The doc summary information. + + + + Would return the summary information metadata for the document, + if we supported it + + The summary information. + + + + Should sheet names be included? Default is true + + if set to true [include sheet names]. + + + + Should we return the formula itself, and not + the result it produces? Default is false + + if set to true [formulas not results]. + + + + Retreives the text contents of the file + + All the text from the document. + + + + Triggers the extraction. + + + + + + Process an HSSF Record. Called when a record occurs in an HSSF file. + + + + + + Formats a number or date cell, be that a real number, or the + answer to a formula + + The cell. + The value. + + + + + A text extractor for Excel files. + Returns the textual content of the file, suitable for + indexing by something like Lucene, but not really + intended for display to the user. + + + + + Initializes a new instance of the class. + + The wb. + + + + Initializes a new instance of the class. + + The fs. + + + + Should header and footer be included? Default is true + + + + + Should sheet names be included? Default is true + + if set to true [include sheet names]. + + + + Should we return the formula itself, and not + the result it produces? Default is false + + if set to true [formulas not results]. + + + + Should cell comments be included? Default is false + + if set to true [include cell comments]. + + + + Should blank cells be output? Default is to only + output cells that are present in the file and are + non-blank. + + if set to true [include blank cells]. + + + + Retreives the text contents of the file + + All the text from the document. + + + + Extracts the header footer. + + The header or footer + + + + + ATTACHEDLABEL = Text Begin Pos [FontX] [AlRuns] AI [FRAME] [ObjectLink] [DataLabExtContents] [CrtLayout12] [TEXTPROPS] [CRTMLFRT] End + AI = BRAI [SeriesText] + + + + + AXES = [IVAXIS DVAXIS [SERIESAXIS] / DVAXIS DVAXIS] *3ATTACHEDLABEL [PlotArea FRAME] + + + + + AXISPARENT = AxisParent Begin Pos [AXES] 1*4CRT End + + + + + AXM = YMult StartObject ATTACHEDLABEL EndObject + + + + + AXS = [IFmtRecord] [Tick] [FontX] *4(AxisLine LineFormat) [AreaFormat] + [GELFRAME] *4SHAPEPROPS [TextPropsStream *ContinueFrt12] + + + + + CHARTFOMATS = Chart Begin *2FONTLIST Scl PlotGrowth [FRAME] *SERIESFORMAT *SS ShtProps + *2DFTTEXT AxesUsed 1*2AXISPARENT [CrtLayout12A] [DAT] *ATTACHEDLABEL [CRTMLFRT] + *([DataLabExt StartObject] ATTACHEDLABEL [EndObject]) [TEXTPROPS] *2CRTMLFRT End + + + + + CHARTSHEET = BOF CHARTSHEETCONTENT + CHARTSHEETCONTENT = [WriteProtect] [SheetExt] [WebPub] *HFPicture PAGESETUP PrintSize + [HeaderFooter] [BACKGROUND] *Fbi *Fbi2 [ClrtClient] [PROTECTION] [Palette] [SXViewLink] + [PivotChartBits] [SBaseRef] [MsoDrawingGroup] OBJECTS Units CHARTFOMATS SERIESDATA + *WINDOW *CUSTOMVIEW [CodeName] [CRTMLFRT] EOF + + + + All the records between BOF and EOF + + + + CRT = ChartFormat Begin (Bar / Line / (BopPop [BopPopCustom]) / Pie / Area / Scatter / Radar / + RadarArea / Surf) CrtLink [SeriesList] [Chart3d] [LD] [2DROPBAR] *4(CrtLine LineFormat) + *2DFTTEXT [DataLabExtContents] [SS] *4SHAPEPROPS End + + + + + CRTMLFRT = CrtMlFrt *CrtMlFrtContinue + + + + + DAT = Dat Begin LD End + + + + + DFTTEXT = [DataLabExt StartObject] DefaultText ATTACHEDLABEL [EndObject] + + + + + DROPBAR = DropBar Begin LineFormat AreaFormat [GELFRAME] [SHAPEPROPS] End + + + + + DVAXIS = Axis Begin [ValueRange] [AXM] AXS [CRTMLFRT] End + + + + + FONTLIST = FrtFontList StartObject *(Font [Fbi]) EndObject + + + + + FRAME = Frame Begin LineFormat AreaFormat [GELFRAME] [SHAPEPROPS] End + + + + + GELFRAME = 1*2GelFrame *Continue [PICF] + PICF = Begin PicF End + + + + + IVAXIS = Axis Begin [CatSerRange] AxcExt [CatLab] AXS [CRTMLFRT] End + + + + + LD = Legend Begin Pos ATTACHEDLABEL [FRAME] [CrtLayout12] [TEXTPROPS] [CRTMLFRT] End + + + + + SERIESAXIS = Axis Begin [CatSerRange] AXS [CRTMLFRT] End + + + + + SERIESDATA = Dimensions 3(SIIndex *(Number / BoolErr / Blank / Label)) + + + + + SERIESFORMAT = Series Begin 4AI *SS (SerToCrt / (SerParent (SerAuxTrend / SerAuxErrBar))) + *(LegendException [Begin ATTACHEDLABEL [TEXTPROPS] End]) End + + + + + LegendException [Begin ATTACHEDLABEL [TEXTPROPS] End] + + + + + SHAPEPROPS = ShapePropsStream *ContinueFrt12 + + + + + SS = DataFormat Begin [Chart3DBarShape] [LineFormat AreaFormat PieFormat] [SerFmt] + [GELFRAME] [MarkerFormat] [AttachedLabel] *2SHAPEPROPS [CRTMLFRT] End + + + + + TEXTPROPS = (RichTextStream / TextPropsStream) *ContinueFrt12 + + + + Manages the all the records associated with a chart sub-stream.
    + Includes the Initial {@link BOFRecord} and {@link EOFRecord}. + + @author Josh Micich +
    + + All the records between BOF and EOF + + + Groups the sheet protection records for a worksheet. +

    + + See OOO excelfileformat.pdf sec 4.18.2 'Sheet Protection in a Workbook + (BIFF5-BIFF8)' + + @author Josh Micich + + + Creates an empty WorksheetProtectionBlock + + + @return true if the specified Record sid is one belonging to + the 'Page Settings Block'. + + + This method Reads {@link WorksheetProtectionBlock} records from the supplied RecordStream + until the first non-WorksheetProtectionBlock record is encountered. As each record is Read, + it is incorporated into this WorksheetProtectionBlock. +

    + As per the OOO documentation, the protection block records can be expected to be written + toGether (with no intervening records), but earlier versions of POI (prior to Jun 2009) + didn't do this. Workbooks with sheet protection Created by those earlier POI versions + seemed to be valid (Excel opens them OK). So PO allows continues to support Reading of files + with non continuous worksheet protection blocks. + +

    + Note - when POI Writes out this WorksheetProtectionBlock, the records will always be + written in one consolidated block (in the standard ordering) regardless of how scattered the + records were when they were originally Read. + + +

    + the ProtectRecord. If one is not contained in the sheet, then one is created. + +
    + + + the PasswordRecord. If one is not Contained in the sheet, then one is Created. + + + + + protect a spreadsheet with a password (not encrypted, just sets protect flags and the password.) + + password to set;Pass null to remove all protection + shouldProtectObjects are protected + shouldProtectScenarios are protected + + + + Creates an ObjectProtect record with protect set to false. + + + + + + Creates a ScenarioProtect record with protect set to false. + + + + + + Creates a Password record with password set to 0x0000. + + + + + + + + CFRecordsAggregate - aggregates Conditional Formatting records CFHeaderRecord + and number of up to three CFRuleRecord records toGether to simplify + access to them. + @author Dmitriy Kumshayev + + + Excel allows up to 3 conditional formating rules + + + List of CFRuleRecord objects + + + + Create CFRecordsAggregate from a list of CF Records + + list of Record objects + + + + Create CFRecordsAggregate from a list of CF Records + + list of Record objects + position of CFHeaderRecord object in the list of Record objects + + + + Create a deep Clone of the record + + + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + The offset to begin writing at + The data byte array containing instance data + number of bytes written + + + @return false if this whole {@link CFHeaderRecord} / {@link CFRuleRecord}s should be deleted + + + + @author Glen Stampoultzis + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The rs. + + + It's an aggregate... just made something up + + + + Gets the num columns. + + The num columns. + + + + Gets the size of the record. + + The size of the record. + + + Performs a deep Clone of the record + + + + Inserts a column into the aggregate (at the end of the list). + + The column. + + + + Inserts a column into the aggregate (at the position specified + by index + + The index. + The columninfo. + + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + offset to begin writing at + byte array containing instance data + number of bytes written + + + + Visit each of the atomic BIFF records contained in this {@link RecordAggregate} in the order + that they should be written to file. Implementors may or may not return the actual + Records being used to manage POI's internal implementation. Callers should not + assume either way, and therefore only attempt to modify those Records after cloning + + + + + + Finds the start of column outline group. + + The idx. + + + + + Finds the end of column outline group. + + The idx. + + + + + Gets the col info. + + The idx. + + + + + Determines whether [is column group collapsed] [the specified idx]. + + The idx. + + true if [is column group collapsed] [the specified idx]; otherwise, false. + + + + + Determines whether [is column group hidden by parent] [the specified idx]. + + The idx. + + true if [is column group hidden by parent] [the specified idx]; otherwise, false. + + + + + Collapses the column. + + The column number. + + + + Expands the column. + + The column number. + + + Sets all non null fields into the ci parameter. + + + + Attempts to merge the col info record at the specified index + with either or both of its neighbours + + The col info ix. + + + merges two column info records (if they are adjacent and have the same formatting, etc) + @return false if the two column records could not be merged + + + + Sets all adjacent columns of the same outline level to the specified hidden status. + + the col info index of the start of the outline group. + The level. + The hidden. + the column index of the last column in the outline group + + + + Sets the column. + + The target column ix. + Index of the xf. + The width. + The level. + The hidden. + The collapsed. + + + Sets all non null fields into the ci parameter. + + + + Collapses the col info records. + + The column index. + + + + Creates an outline Group for the specified columns. + + Group from this column (inclusive) + Group to this column (inclusive) + if true the Group will be indented by one level;if false indenting will be Removed by one level. + + + + Finds the ColumnInfoRecord + which contains the specified columnIndex + + index of the column (not the index of the ColumnInfoRecord) + /// null + if no column info found for the specified column + + + + + Gets the max outline level. + + The max outline level. + + + Holds all the conditional formatting for a workbook sheet.

    + + See OOO exelfileformat.pdf sec 4.12 'Conditional Formatting Table' + + @author Josh Micich + + + Creates an empty ConditionalFormattingTable + + + @return index of the newly added CF header aggregate + + + Manages the all the records associated with a 'Custom View Settings' sub-stream.
    + Includes the Initial USERSVIEWBEGIN(0x01AA) and USERSVIEWEND(0x01AB). + + @author Josh Micich +
    + + All the records between BOF and EOF + + +

    + Manages the DVALRecord and DVRecords for a single sheet + See OOO excelfileformat.pdf section 4.14 + @author Josh Micich + +
    + + The list of data validations for the current sheet. + Note - this may be empty (contrary to OOO documentation) + + + + The formula record aggregate is used to join toGether the formula record and it's + (optional) string record and (optional) Shared Formula Record (template Reads, excel optimization). + @author Glen Stampoultzis (glens at apache.org) + + + + caches the calculated result of the formula + + + + Initializes a new instance of the class. + + The formula rec. + The string rec. + The SVM. + + + Should be called by any code which is either deleting this formula cell, or changing + its type. This method gives the aggregate a chance to unlink any shared formula + that may be involved with this cell formula. + + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + offset to begin writing at + byte array containing instance data. + number of bytes written + + + + Visit each of the atomic BIFF records contained in this {@link RecordAggregate} in the order + that they should be written to file. Implementors may or may not return the actual + {@link Record}s being used to manage POI's internal implementation. Callers should not + assume either way, and therefore only attempt to modify those {@link Record}s after cloning + + + + + + Get the current Serialized size of the record. Should include the sid and recLength (4 bytes). + + The size of the record. + + + + return the non static version of the id for this record. + + The sid. + + + + Sometimes the shared formula flag "seems" to be erroneously set (because the corresponding + SharedFormulaRecord does not exist). Normally this would leave no way of determining + the Ptg tokens for the formula. However as it turns out in these + cases, Excel encodes the unshared Ptg tokens in the right place (inside the FormulaRecord). + So the the only thing that needs to be done is to ignore the erroneous + shared formula flag. + + This method may also be used for setting breakpoints to help diagnose issues regarding the + abnormally-set 'shared formula' flags. + + The formula. + + + + Gets or sets the formula record. + + The formula record. + + + + Gets or sets the string record. + + The string record. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets the string value. + + The string value. + + + + Sets the cached string result. + + The value. + + + + Sets the cached boolean result. + + if set to true [value]. + + + + Sets the cached error result. + + The error code. + + + Also checks for a related shared formula and unlinks it if found + + + Removes an array formula + @return the range of the array formula containing the specified cell. Never null + + + + @author Josh Micich + + + + Creates an empty aggregate + + + + Reads zero or more consecutive {@link MergeCellsRecord}s + @param rs + + + Groups the page settings records for a worksheet.

    + + See OOO excelfileformat.pdf sec 4.4 'Page Settings Block' + + @author Josh Micich + + + Creates a PageSettingsBlock with default settings + + + @return true if the specified Record sid is one belonging to the + 'Page Settings Block'. + + + Sets a page break at the indicated column + + + + Removes a page break at the indicated column + + + + Creates the HCenter Record and sets it to false (don't horizontally center) + + + Creates the VCenter Record and sets it to false (don't horizontally center) + + + Creates the PrintSetup Record and sets it to defaults and marks it invalid + @see org.apache.poi.hssf.record.PrintSetupRecord + @see org.apache.poi.hssf.record.Record + @return record containing a PrintSetupRecord + + + Returns the HeaderRecord. + @return HeaderRecord for the sheet. + + + Returns the FooterRecord. + @return FooterRecord for the sheet. + + + Returns the PrintSetupRecord. + @return PrintSetupRecord for the sheet. + + + Gets the size of the margin in inches. + @param margin which margin to Get + @return the size of the margin + + + Sets the size of the margin in inches. + @param margin which margin to Get + @param size the size of the margin + + + Shifts all the page breaks in the range "count" number of rows/columns + @param breaks The page record to be shifted + @param start Starting "main" value to shift breaks + @param stop Ending "main" value to shift breaks + @param count number of units (rows/columns) to shift by + + + Sets a page break at the indicated row + @param row + + + Removes a page break at the indicated row + @param row + + + Queries if the specified row has a page break + @param row + @return true if the specified row has a page break + + + Queries if the specified column has a page break + + @return true if the specified column has a page break + + + Shifts the horizontal page breaks for the indicated count + @param startingRow + @param endingRow + @param count + + + Shifts the vertical page breaks for the indicated count + @param startingCol + @param endingCol + @param count + + + @return all the horizontal page breaks, never null + + + @return the number of row page breaks + + + @return all the column page breaks, never null + + + @return the number of column page breaks + + +

    + HEADERFOOTER is new in 2007. Some apps seem to have scattered this record long after + the PageSettingsBlock where it belongs. + + +
    + + + This method reads PageSettingsBlock records from the supplied RecordStream until the first non-PageSettingsBlock record is encountered. + As each record is read, it is incorporated into this PageSettingsBlock. + + + + + holds any continue records found after the PLS record.
    + This would not be required if PLS was properly interpreted. + Currently, PLS is an {@link UnknownRecord} and does not automatically + include any trailing {@link ContinueRecord}s. +
    + + Implementors may call non-mutating methods on Record r. + @param r must not be null + + + RecordAggregates are groups of of BIFF Records that are typically stored + together and/or updated together. Workbook / Sheet records are typically stored in a sequential + list, which does not provide much structure to coordinate updates. + + @author Josh Micich + + + Visit each of the atomic BIFF records contained in this {@link RecordAggregate} in the order + that they should be written to file. Implementors may or may not return the actual + {@link Record}s being used to manage POI's internal implementation. Callers should not + assume either way, and therefore only attempt to modify those {@link Record}s after cloning + + + A wrapper for {@link RecordVisitor} which accumulates the sizes of all + records visited. + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + Creates a new instance of ValueRecordsAggregate + + + @param rs record stream with all {@link SharedFormulaRecord} + {@link ArrayRecord}, {@link TableRecord} {@link MergeCellsRecord} Records removed + + + Handles UnknownRecords which appear within the row/cell records + + + Returns the number of row blocks. +

    The row blocks are goupings of rows that contain the DBCell record + after them + + + Returns the number of physical rows within a block + + + Returns the physical row number of the first row in a block + + + Returns the physical row number of the end row in a block + + + Create a row record. + + @param row number + @return RowRecord Created for the passed in row number + @see org.apache.poi.hssf.record.RowRecord + + + Returns an iterator for the cell values + + +

    + Manages various auxiliary records while constructing a RowRecordsAggregate + @author Josh Micich + +
    + + Coordinates of the first cell having a formula that uses this shared formula. + This is often but not always the top left cell in the range covered by + {@link #_sfr} + + + Note - the 'first cell' of a shared formula group is not always the top-left cell + of the enclosing range. + @return true if the specified coordinates correspond to the 'first cell' + of this shared formula group. + + + cached for optimization purposes + + + @param firstCells + @param recs list of sheet records (possibly Contains records for other parts of the Excel file) + @param startIx index of first row/cell record for current sheet + @param endIx one past index of last row/cell record for current sheet. It is important + that this code does not inadvertently collect SharedFormulaRecords from any other + sheet (which could happen if endIx is chosen poorly). (see bug 44449) + + + @param firstCell as extracted from the {@link ExpPtg} from the cell's formula. + @return never null + + + Gets the {@link SharedValueRecordBase} record if it should be encoded immediately after the + formula record Contained in the specified {@link FormulaRecordAggregate} agg. Note - the + shared value record always appears after the first formula record in the group. For arrays + and tables the first formula is always the in the top left cell. However, since shared + formula groups can be sparse and/or overlap, the first formula may not actually be in the + top left cell. + + @return the SHRFMLA, TABLE or ARRAY record for the formula cell, if it is the first cell of + a table or array region. null if the formula cell is not shared/array/table, + or if the specified formula is not the the first in the group. + + + Converts all {@link FormulaRecord}s handled by sharedFormulaRecord + to plain unshared formulas + + + Add specified Array Record. + + + Removes the {@link ArrayRecord} for the cell group containing the specified cell. + The caller should clear (set blank) all cells in the returned range. + @return the range of the array formula which was just removed. Never null. + + + @return the shared ArrayRecord identified by (firstRow, firstColumn). never null. + + + + Aggregate value records toGether. Things are easier to handle that way. + + @author andy + @author Glen Stampoultzis (glens at apache.org) + @author Jason Height (jheight at chariot dot net dot au) + + + Creates a new instance of ValueRecordsAggregate + + + Sometimes the shared formula flag "seems" to be erroneously Set, in which case there is no + call to SharedFormulaRecord.ConvertSharedFormulaRecord and hence the + ParsedExpression field of this FormulaRecord will not Get updated.
    + As it turns out, this is not a problem, because in these circumstances, the existing value + for ParsedExpression is perfectly OK.

    + + This method may also be used for Setting breakpoints to help diagnose Issues regarding the + abnormally-Set 'shared formula' flags. + (see TestValueRecordsAggregate.testSpuriousSharedFormulaFlag()).

    + + The method currently does nothing but do not delete it without Finding a nice home for this + comment. + + + Tallies a count of the size of the cell records + that are attached to the rows in the range specified. + + + Returns true if the row has cells attached to it + + + Serializes the cells that are allocated to a certain row range + + + Conditional Formatting Header v12 record CFHEADER12 (0x0879), + for conditional formattings introduced in Excel 2007 and newer. + + + Creates new CFHeaderRecord + + + Parent of Conditional Formatting Header records, + {@link CFHeaderRecord} and {@link CFHeader12Record}. + + + Creates new CFHeaderBase + + + Set cell ranges list to a single cell range and + modify the enclosing cell range accordingly. + @param cellRanges - list of CellRange objects + + + + Creates new CFRuleRecord + + + Creates a new comparison operation rule + + + Creates a new comparison operation rule + + + Creates a new comparison operation rule + + +

    + Creates a new Data Bar formatting + + + + +
    + + + Creates a new Icon Set / Multi-State formatting + + + + + + + + Creates a new Color Scale / Color Gradient formatting + + + + + + Get the stack of the scale expression as a list + + @return list of tokens (casts stack to a list and returns it!) + this method can return null is we are unable to create Ptgs from + existing excel file + callers should check for null! + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + @param out the stream to write to + + + + Creates new CFRuleRecord + + + Get the option flags + + @return bit mask + + + Get the stack of the 1st expression as a list + + @return list of tokens (casts stack to a list and returns it!) + this method can return null is we are unable to create Ptgs from + existing excel file + callers should check for null! + + + Get the stack of the 2nd expression as a list + + @return array of {@link Ptg}s, possibly null + + + @param formula must not be null + @return encoded size of the formula tokens (does not include 2 bytes for ushort length) + + + + Color Gradient / Color Scale Conditional Formatting Rule Record. + (Called Color Gradient in the file format docs, but more commonly + Color Scale in the UI) + + + Color Gradient / Color Scale specific Threshold / value (CFVO), + for Changes in Conditional Formatting + + + Creates new Color Gradient Threshold + + + Data Bar Conditional Formatting Rule Record. + + + Data Bar specific Threshold / value (CFVO), + for Changes in Conditional Formatting + + + Creates new Data Bar Threshold + + + Icon / Multi-State Conditional Formatting Rule Record. + + + Icon / Multi-State specific Threshold / value (CFVO), + for Changes in Conditional Formatting + + + Cell values that are equal to the threshold value do not pass the threshold + + + Cell values that are equal to the threshold value pass the threshold. + + + Creates new Ico Multi-State Threshold + + + Threshold / value (CFVO) for Changes in Conditional Formatting + + + Creates new Threshold + + + Border Formatting Block of the Conditional Formatting Rule Record. + + @author Dmitriy Kumshayev + + + Creates new FontFormatting + + + + Get the type of border to use for the left border of the cell + + + + + Get the type of border to use for the right border of the cell + + + + + Get the type of border to use for the top border of the cell + + + + + Get the type of border to use for the bottom border of the cell + + + + + Get the type of border to use for the diagonal border of the cell + + + + + Get the color to use for the left border + + + + + Get the color to use for the right border + + + + + Get the color to use for the top border + + + + + Get the color to use for the bottom border + + + + + Get the color to use for the diagonal border + + + + + true if forward diagonal is on + + + + + true if backward diagonal Is on + + + + Font Formatting Block of the Conditional Formatting Rule Record. + + @author Dmitriy Kumshayev + + + Normal boldness (not bold) + + + Bold boldness (bold) + + + Creates new FontFormatting + + + Gets the height of the font in 1/20th point Units + + @return fontheight (in points/20); or -1 if not modified + + + Get whether the font Is to be italics or not + + @return italics - whether the font Is italics or not + @see #GetAttributes() + + + Get whether the font Is to be stricken out or not + + @return strike - whether the font Is stricken out or not + @see #GetAttributes() + + + + Get or set the font weight for this font (100-1000dec or 0x64-0x3e8). + Default Is 0x190 for normal and 0x2bc for bold + + + + + Get or set whether the font weight is set to bold or not + + + + Get the type of base or subscript for the font + + @return base or subscript option + @see org.apache.poi.hssf.usermodel.HSSFFontFormatting#SS_NONE + @see org.apache.poi.hssf.usermodel.HSSFFontFormatting#SS_SUPER + @see org.apache.poi.hssf.usermodel.HSSFFontFormatting#SS_SUB + + + Get the type of Underlining for the font + + @return font Underlining type + + + Pattern Formatting Block of the Conditional Formatting Rule Record. + + @author Dmitriy Kumshayev + + + Creates new FontFormatting + + + Get the Fill pattern + @return Fill pattern + + + Get the background Fill color + @see org.apache.poi.hssf.usermodel.HSSFPalette#GetColor(short) + @return Fill color + + + Get the foreground Fill color + @see org.apache.poi.hssf.usermodel.HSSFPalette#GetColor(short) + @return Fill color + + + + The AlRuns record specifies Rich Text Formatting within chart + titles (section 2.2.3.3), trendline (section 2.2.3.12), and + data labels (section 2.2.3.11). + + + + * The series label record defines the type of label associated with the data format record. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a SeriesLabels record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the format flags field for the SeriesLabels record. + + + show actual value of the data point + @return the show actual field value. + + + show value as percentage of total (pie charts only) + @return the show percent field value. + + + show category label/value as percentage (pie charts only) + @return the label as percentage field value. + + + show smooth line + @return the smoothed line field value. + + + Display category label + @return the show label field value. + + + ?? + @return the show bubble sizes field value. + + + + The AxcExt record specifies additional extension properties of a date axis (section 2.2.3.6), + along with a CatSerRange record (section 2.4.39). + + + + + specifies the interval at which the major tick marks are displayed on the axis (section 2.2.3.6), + in the unit defined by duMajor. + + + + + specifies the unit of time to use for catMajor when the axis (section 2.2.3.6) is a date axis (section 2.2.3.6). + If fDateAxis is set to 0, MUST be ignored. + + + + + specifies the interval at which the minor tick marks are displayed on the axis (section 2.2.3.6), + in a unit defined by duMinor. + + + + + specifies the smallest unit of time used by the axis (section 2.2.3.6). + + + + + specifies at which date, as a date in the date system specified by the Date1904 record (section 2.4.77), + in the units defined by duBase, the value axis (section 2.2.3.6) crosses this axis (section 2.2.3.6). + + + + + specifies whether MinimumDate is calculated automatically. + + + + + specifies whether MaximumDate is calculated automatically. + + + + * The number of axes used on a chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a AxisUsed record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the num axis field for the AxisUsed record. + + + + The axis (section 2.2.3.6) line itself. + + + + + The major gridlines along the axis + + + + + The minor gridlines along the axis + + + + + The walls or floor of a 3-D chart + + + + + The AxisLine record specifies which part of the axis (section 2.2.3.6) is + specified by the LineFormat record (section 2.4.156) that follows. + + Excel Binary File Format (.xls) Structure Specification + + + + Constructs a AxisLineFormat record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + + + + + + The axis options record provides unit information and other various tidbits about the axis.

    + + @author Andrew C. Oliver(acoliver at apache.org) + + + Get the minimum category field for the AxisOptions record. + + + Get the maximum category field for the AxisOptions record. + + + Get the major unit value field for the AxisOptions record. + + + Get the major unit field for the AxisOptions record. + + + Get the minor unit value field for the AxisOptions record. + + + Get the minor unit field for the AxisOptions record. + + + Get the base unit field for the AxisOptions record. + + + Get the crossing point field for the AxisOptions record. + + + Get the options field for the AxisOptions record. + + + use the default minimum category + @return the default minimum field value. + + + use the default maximum category + @return the default maximum field value. + + + use the default major unit + @return the default major field value. + + + use the default minor unit + @return the default minor unit field value. + + + Sets the isDate field value. + this is a date axis + + + this is a date axis + @return the isDate field value. + + + use the default base unit + @return the default base field value. + + + use the default crossing point + @return the default cross field value. + + + use default date Setttings for this axis + @return the default date Settings field value. + + + * The number of axes used on a chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a AxisUsed record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the num axis field for the AxisUsed record. + + +

    + The BopPopCustom record specifies which data points in the series are contained + in the secondary bar/pie instead of the primary pie. MUST follow a BopPop record + that has its split field set to Custom (0x0003). + + + author: Antony liu (antony.apollo at gmail.com) + +
    + + + The BopPop record specifies that the chart group is a bar of pie chart group or + a pie of pie chart group and specifies the chart group attributes. + + + author: Antony liu (antony.apollo at gmail.com) + + + + This record refers to a category or series axis and is used to specify label/tickmark frequency.

    + + @author Glen Stampoultzis (glens at apache.org) + + + Get the crossing point field for the CategorySeriesAxis record. + + + Get the label frequency field for the CategorySeriesAxis record. + + + Get the tick mark frequency field for the CategorySeriesAxis record. + + + Get the options field for the CategorySeriesAxis record. + + + Set true to indicate axis crosses between categories and false to cross axis midway + @return the value axis crossing field value. + + + axis crosses at the far right + @return the crosses far right field value. + + + categories are displayed in reverse order + @return the reversed field value. + + +

    + specifies the properties of a category (3) axis, a date axis, or a series axis. + +
    + + Constructs a CategorySeriesAxis record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + + specifies where the value axis crosses this axis, based on the following table. + If fMaxCross is set to 1, the value this field MUST be ignored. + Category (3) axis This field specifies the category (3) at which the value axis crosses. + For example, if this field is 2, the value axis crosses this axis at the second category (3) + on this axis. MUST be greater than or equal to 1 and less than or equal to 31999. + Series axis MUST be 0. + Date axis catCross MUST be equal to the value given by the following formula: + catCross = catCrossDate – catMin + 1 + Where catCrossDate is the catCrossDate field of the AxcExt record + and catMin is the catMin field of the AxcExt record. + + + + + specifies the interval between axis labels on this axis. MUST be greater than or equal to 1 and + less than or equal to 31999. MUST be ignored for a date axis. + + + + + specifies the interval at which major tick marks and minor tick marks are displayed on the axis. + Major tick marks and minor tick marks that would have been visible are hidden unless they are + located at a multiple of this field. + + + + + specifies whether the value axis crosses this axis between major tick marks. MUST be a value from to following table: + 0 The value axis crosses this axis on a major tick mark. + 1 The value axis crosses this axis between major tick marks. + + + + + specifies whether the value axis crosses this axis at the last category (3), the last series, + or the maximum date. MUST be a value from the following table: + 0 The value axis crosses this axis at the value specified by catCross. + 1 The value axis crosses this axis at the last category (3), the last series, or the maximum date. + + + + + specifies whether the axis is displayed in reverse order. MUST be a value from the following table: + 0 The axis is displayed in order. + 1 The axis is display in reverse order. + + + + + the shape of the base of the data points in a bar or column chart group. + MUST be a value from the following table + 0x00 The base of the data point is a rectangle. + 0x01 The base of the data point is an ellipse. + + + + + how the data points in a bar or column chart group taper from base to tip. + MUST be a value from the following + 0x00 The data points of the bar or column chart group do not taper. + The shape at the maximum value of the data point is the same as the shape at the base.: + 0x01 The data points of the bar or column chart group taper to a point at the maximum value of each data point. + 0x02 The data points of the bar or column chart group taper towards a projected point at the position of + the maximum value of all of the data points in the chart group, but are clipped at the value of each data point. + + + + + The CrtLine record specifies the presence of drop lines, high-low lines, series lines + or leader lines on the chart group. This record is followed by a LineFormat record + which specifies the format of the lines. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The CrtMlFrtContinue record specifies additional data for a CrtMlFrt record, as specified in the CrtMlFrt record. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The DataLabExtContents record specifies the contents of an extended data label. + + + + DATALABEXT - Chart Data Label Extension (0x086A)
    + + @author Patrick Cheng +
    + + The default data label text properties record identifies the text characteristics of the preceding text record.

    + + @author Glen Stampoultzis (glens at apache.org) + + + Get the category data type field for the DefaultDataLabelTextProperties record. + + @return One of + CATEGORY_DATA_TYPE_SHOW_LABELS_CHARACTERISTIC + CATEGORY_DATA_TYPE_VALUE_AND_PERCENTAGE_CHARACTERISTIC + CATEGORY_DATA_TYPE_ALL_TEXT_CHARACTERISTIC + + +

    + specifies the text elements that are formatted using the position and appearance information + specified by the Text record immediately following this record. + +
    + + + Format all Text records in the chart group where fShowPercent is equal to 0 or fShowValue is equal to 0. + + + + + Format all Text records in the chart group where fShowPercent is equal to 1 or fShowValue is equal to 1. + + + + + Format all Text records in the chart where the value of fScaled of the associated FontInfo structure is equal to 0. + + + + + Format all Text records in the chart where the value of fScaled of the associated FontInfo structure is equal to 1. + + + + + specifies the text elements that are formatted using the information specified by + the Text record immediately following this record. + + + + Constructs a DefaultDataLabelTextProperties record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + + specifies the text elements that are formatted using the position and appearance + information specified by the Text record immediately following this record. + + + + + The DropBar record specifies the attributes of the up bars or the down bars between multiple + series of a line chart group and specifies the beginning of a collection of records as + defined by the Chart Sheet Substream ABNF. The first of these collections in the line chart + group specifies the attributes of the up bars. The second specifies the attributes of the + down bars. If this record exists, then the chart group type MUST be line and the field cSer + in the record SeriesList MUST be greater than 1. + + + author: Antony liu (antony.apollo at gmail.com) + + + + ENDBLOCK - Chart Future Record Type End Block (0x0853)
    + + @author Patrick Cheng +
    + + + The Fbi2 record specifies the font information at the time the scalable font is added to the chart. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The Fbi record specifies the font information at the time the scalable font is added to the chart. + + + + Constructs a FontBasis record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the x Basis field for the FontBasis record. + + + Get the y Basis field for the FontBasis record. + + + Get the height basis field for the FontBasis record. + + + Get the scale field for the FontBasis record. + + + Get the index to font table field for the FontBasis record. + + + + The FontX record specifies the font for a given text element. + The Font record referenced by iFont can exist in this chart sheet substream or the workbook. + + + + Constructs a FontIndex record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + + specifies the font to use for subsequent records. + This font can either be the default font of the chart, part of the collection of Font records following + the FrtFontList record, or part of the collection of Font records in the globals substream. + If iFont is 0x0000, this record specifies the default font of the chart. + If iFont is less than or equal to the number of Font records in the globals substream, + iFont is a one-based index to a Font record in the globals substream. + Otherwise iFont is a one-based index into the collection of Font records in this chart sheet substream + where the index is equal to iFont – n, where n is the number of Font records in the globals substream. + + + + + The FrtFontList record specifies font information used on the chart and specifies the + beginning of a collection of Font records as defined by the Chart Sheet Substream ABNF. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + specifies the properties of a fill pattern for parts of a chart. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The IFmtRecord record specifies the number format to use for the text on an axis. + + + + Constructs a NumberFormatIndex record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the format index field for the NumberFormatIndex record. + + + + The LegendException record specifies information about a legend entry which was + changed from the default legend entry settings, and specifies the beginning of + a collection of records as defined by the Chart Sheet Substream ABNF. + The collection of records specifies legend entry formatting. On a chart where + the legend contains legend entries for the series and trendlines, as defined + in the legend overview, there MUST be zero instances or one instance of this + record in the sequence of records that conform to the SERIESFORMAT rule. + + + author: Antony liu (antony.apollo at gmail.com) + + + + Describes a linked data record. This record refers to the series data or text.

    + + @author Glen Stampoultzis (glens at apache.org) + + + Get the link type field for the LinkedData record. + + @return One of + LINK_TYPE_TITLE_OR_TEXT + LINK_TYPE_VALUES + LINK_TYPE_CATEGORIES + + + Get the reference type field for the LinkedData record. + + @return One of + REFERENCE_TYPE_DEFAULT_CATEGORIES + REFERENCE_TYPE_DIRECT + REFERENCE_TYPE_WORKSHEET + REFERENCE_TYPE_NOT_USED + REFERENCE_TYPE_ERROR_REPORTED + + + Get the options field for the LinkedData record. + + + Get the index number fmt record field for the LinkedData record. + + + Get the formula of link field for the LinkedData record. + + + true if this object has a custom number format + @return the custom number format field value. + + +

    + The PicF record specifies the layout of a picture that is attached to a picture-filled chart element. + + + author: Antony liu (antony.apollo at gmail.com) + +
    + + + The RadarArea record specifies that the chart group is a filled radar chart group and specifies the chart group attributes. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The Radar record specifies that the chart group is a radar chart group and specifies the chart group attributes. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The RichTextStream record specifies additional text properties for the text in + the entire chart, text in the current legend, text in the current legend entry, + or text in the attached label. These text properties are a superset of the + properties stored in the Text, Font, FontX, BRAI, and ObjectLink records based + on the following table, as specified by the Chart Sheet Substream ABNF. In each + case, the associated Font record is specified by the associated FontX record. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The Scatter record specifies that the chart group is a scatter chart group or + a bubble chart group, and specifies the chart group attributes. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The SerAuxErrBar record specifies properties of an error bar. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The SerAuxTrend record specifies a trendline. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The SerFmt record specifies properties of the associated data points, data markers, + or lines of the series. The associated data points, data markers, or lines of the + series are specified by the preceding DataFormat record. If this record is not + present in the sequence of records that conforms to the SS rule of the Chart Sheet + Substream ABNF, then the properties of the associated data points, data markers, + or lines of the series are specified by the default values of the fields of this record. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The SerParent record specifies the series to which the current trendline or error bar corresponds. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The SerToCrt record specifies the chart group for the current series. + + + + Constructs a SeriesChartGroupIndex record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the chart Group index field for the SeriesChartGroupIndex record. + + + + The ShapePropsStream record specifies the shape formatting properties for chart elements. + These shape formatting properties are a superset of the properties stored in the LineFormat, + AreaFormat, MarkerFormat, and GelFrame records. They are stored in the rgb field, which is an + XML stream (section 2.1.7.22), as defined in [ECMA-376] Part 4, section 5.7.2.198. + + + author: Antony liu (antony.apollo at gmail.com) + + + + * Describes a chart sheet properties record. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + specifies properties of a chart as defined by the Chart Sheet Substream ABNF + + + + Constructs a SheetProperties record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the flags field for the SheetProperties record. + + + Get the empty field for the SheetProperties record. + + @return One of + EMPTY_NOT_PLOTTED + EMPTY_ZERO + EMPTY_INTERPOLATED + + specifies how the empty cells are plotted be a value from the following table: + 0x00 Empty cells are not plotted. + 0x01 Empty cells are plotted as zero. + 0x02 Empty cells are plotted as interpolated. + + + + + whether series are automatically allocated for the chart. + + + + + whether to plot visible cells only. + + + + + whether to size the chart with the window. + + + + + If fAlwaysAutoPlotArea is 1, then this field MUST be 1. + If fAlwaysAutoPlotArea is 0, then this field MUST be ignored. + + + + + specifies whether the default plot area dimension (2) is used. + 0 Use the default plot area dimension (2) regardless of the Pos record information. + 1 Use the plot area dimension (2) of the Pos record; and fManPlotArea MUST be 1. + + + + STARTBLOCK - Chart Future Record Type Start Block (0x0852)
    + + @author Patrick Cheng +
    + + + The Surf record specifies that the chart group is a surface chart group and specifies the chart group attributes. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The RichTextStream record specifies additional text properties for the text + in the entire chart, text in the current legend, text in the current legend + entry, or text in the attached label. These text properties are a superset + of the properties stored in the Text, Font, FontX, BRAI, and ObjectLink records + based on the following table, as specified by the Chart Sheet Substream ABNF. + In each case, the associated Font record is specified by the associated FontX record. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The YMult record specifies properties of the value multiplier for a value axis and + that specifies the beginning of a collection of records as defined by the Chart Sheet + substream ABNF. The collection of records specifies a display units label. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + The Chart3d record specifies that the plot area of the chart group is rendered in a 3-D scene + and also specifies the attributes of the 3-D plot area. The preceding chart group type MUST be + of type bar, pie, line, area, or surface. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + A signed integer that specifies the clockwise rotation, in degrees, of the 3-D plot area + around a vertical line through the center of the 3-D plot area. MUST be greater than or + equal to 0 and MUST be less than or equal to 360. + + + + + A signed integer that specifies the rotation, in degrees, of the 3-D plot area around + a horizontal line through the center of the 3-D plot area.MUST be greater than or equal + to -90 and MUST be less than or equal to 90. + + + + + A signed integer that specifies the field of view angle for the 3-D plot area. + MUST be greater than or equal to zero and less than 200. + + + + + If fNotPieChart is 0, then this is an unsigned integer that specifies the thickness of the pie for a pie chart group. + If fNotPieChart is 1, then this is a signed integer that specifies the height of the 3-D plot area as a percentage of its width. + + + + + A signed integer that specifies the depth of the 3-D plot area as a percentage of its width. + MUST be greater than or equal to 1 and less than or equal to 2000. + + + + + An unsigned integer that specifies the width of the gap between the series and the front and + back edges of the 3-D plot area as a percentage of the data point depth divided by 2. + If fCluster is not 1 and chart group type is not a bar then pcGap also specifies distance + between adjacent series as a percentage of the data point depth. MUST be less than or equal to 500. + + + + + A bit that specifies whether the 3-D plot area is rendered with a vanishing point. + If fNotPieChart is 0 the value MUST be 0. If fNotPieChart is 1 then the value + MUST be a value from the following + true Perspective vanishing point applied based on value of pcDist. + false No vanishing point applied. + + + + + specifies whether data points are clustered together in a bar chart group. + If chart group type is not bar or pie, value MUST be ignored. If chart group type is pie, + value MUST be 0. If chart group type is bar, then the value MUST be a value from the following + true Data points are clustered. + false Data points are not clustered. + + + + + A bit that specifies whether the height of the 3-D plot area is automatically determined. + If fNotPieChart is 0 then this MUST be 0. If fNotPieChart is 1 then the value MUST be a value from the following table: + false The value of pcHeight is used to determine the height of the 3-D plot area + true The height of the 3-D plot area is automatically determined + + + + + A bit that specifies whether the chart group type is pie. MUST be a value from the following : + false Chart group type MUST be pie. + true Chart group type MUST not be pie. + + + + + Whether the walls are rendered in 2-D. If fPerspective is 1 then this MUST be ignored. + If the chart group type is not bar, area or pie this MUST be ignored. + If the chart group is of type bar and fCluster is 0, then this MUST be ignored. + If the chart group type is pie this MUST be 0 and MUST be ignored. + If the chart group type is bar or area, then the value MUST be a value from the following + false Chart walls and floor are rendered in 3D. + true Chart walls are rendered in 2D and the chart floor is not rendered. + + + + + The CrtLayout12A record specifies layout information for a plot area. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + specifies the type of plot area for the layout target. + false Outer plot area - The bounding rectangle that includes the axis labels, axis titles, data table (2) and plot area of the chart. + true Inner plot area – The rectangle bounded by the chart axes. + + + + + specifies the checksum + + + + + specifies the horizontal offset of the plot area’s upper-left corner, relative to the upper-left corner of the chart area + + + + + specifies the vertical offset of the plot area’s upper-left corner, relative to the upper-left corner of the chart area + + + + + specifies the width of the plot area + + + + + specifies the height of the plot area + + + + + A CrtLayout12Mode structure that specifies the meaning of x. + + + + + A CrtLayout12Mode structure that specifies the meaning of y. + + + + + A CrtLayout12Mode structure that specifies the meaning of dx. + + + + + A CrtLayout12Mode structure that specifies the meaning of dy. + + + + + An Xnum (section 2.5.342) value that specifies a horizontal offset. The meaning is determined by wXMode. + + + + + An Xnum value that specifies a vertical offset. The meaning is determined by wYMode. + + + + + An Xnum value that specifies a width or an horizontal offset. The meaning is determined by wWidthMode. + + + + + An Xnum value that specifies a height or an vertical offset. The meaning is determined by wHeightMode. + + + + + The CrtLayout12Mode specifies a layout mode. Each layout mode specifies a different + meaning of the x, y, dx, and dy fields of CrtLayout12 and CrtLayout12A. + + + + + Position and dimension (2) are determined by the application. x, y, dx and dy MUST be ignored. + + + + + x and y specify the offset of the top left corner, relative to its default position, + as a fraction of the chart area. MUST be greater than or equal to -1.0 and MUST be + less than or equal to 1.0. dx and dy specify the width and height, as a fraction of + the chart area, MUST be greater than or equal to 0.0, and MUST be less than or equal to 1.0. + + + + + x and y specify the offset of the upper-left corner; dx and dy specify the offset of the bottom-right corner. + x, y, dx and dy are specified relative to the upper-left corner of the chart area as a fraction of the chart area. + x, y, dx and dy MUST be greater than or equal to 0.0, and MUST be less than or equal to 1.0. + + + + + The CrtLayout12 record specifies the layout information for attached label, when contained + in the sequence of records that conforms to the ATTACHEDLABEL rule, + or legend, when contained in the sequence of records that conforms to the LD rule. + + + + + automatic layout type of the legend. + MUST be ignored when this record is in the sequence of records that conforms to the ATTACHEDLABEL rule. + MUST be a value from the following table: + 0x0 Align to the bottom + 0x1 Align to top right corner + 0x2 Align to the top + 0x3 Align to the right + 0x4 Align to the left + + + + + specifies the checksum of the values in the order as follows, + + + + + A CrtLayout12Mode structure that specifies the meaning of x. + + + + + A CrtLayout12Mode structure that specifies the meaning of y. + + + + + A CrtLayout12Mode structure that specifies the meaning of dx. + + + + + A CrtLayout12Mode structure that specifies the meaning of dy. + + + + + An Xnum (section 2.5.342) value that specifies a horizontal offset. The meaning is determined by wXMode. + + + + + An Xnum value that specifies a vertical offset. The meaning is determined by wYMode. + + + + + An Xnum value that specifies a width or an horizontal offset. The meaning is determined by wWidthMode. + + + + + An Xnum value that specifies a height or an vertical offset. The meaning is determined by wHeightMode. + + + + + The CrtMlFrt record specifies additional properties for chart elements, as specified by + the Chart Sheet Substream ABNF. These properties complement the record to which they + correspond, and are stored as a structure chain defined in XmlTkChain. An application + can ignore this record without loss of functionality, except for the additional properties. + If this record is longer than 8224 bytes, it MUST be split into several records. The first + section of the data appears in this record and subsequent sections appear in one or more + CrtMlFrtContinue records that follow this record. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + specifies the color, size, and shape of the associated data markers that appear on line, radar, + and scatter chart groups. The associated data markers are specified by the preceding DataFormat record. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + the border color of the data marker. + + + + + the interior color of the data marker. + + + + + the type of data marker. + + + + + whether the data marker is automatically generated. + false The data marker is not automatically generated. + true The data marker type, size, and color are automatically generated and the values are set accordingly in this record. + + + + + whether to show the data marker interior. + false The data marker interior is shown. + true The data marker interior is not shown. + + + + + whether to show the data marker border. + false The data marker border is shown. + true The data marker border is not shown. + + + + + the border color of the data marker. + + + + + the interior color of the data marker. + + + + + specifies the size in twips of the data marker. + + + + + The PieFormat record specifies the distance of a data point or data points in a series from the center of one of the following: + The plot area for a doughnut or pie chart group. + The primary pie in a pie of pie or bar of pie chart group. + The secondary bar/pie of a pie of pie chart group. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + A signed integer that specifies the distance of a data point or data points in a series from the center of one of the following: + The plot area for a doughnut or pie chart group. + The primary pie in a pie of pie or bar of pie chart group. + The secondary bar/pie of a pie of pie chart group. + + + + + The Pie record specifies that the chart group is a pie chart group or + a doughnut chart group, and specifies the chart group attributes. + + + author: Antony liu (antony.apollo at gmail.com) + + + + + An unsigned integer that specifies the starting angle of the first data point, + clockwise from the top of the circle. MUST be less than or equal to 360. + + + + + An unsigned integer that specifies the size of the center hole in a doughnut chart group + as a percentage of the plot area size. MUST be a value from the following table: + 0 Pie chart group. + 10 to 90 Doughnut chart group. + + + + + A bit that specifies whether one data point or more data points in the chart group have shadows. + + + + + A bit that specifies whether the leader lines to the data labels are shown. + + + + * The area format record is used to define the colours and patterns for an area. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a AreaFormat record and s its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + the foreground color field for the AreaFormat record. + + + the background color field for the AreaFormat record. + + + the pattern field for the AreaFormat record. + + + the format flags field for the AreaFormat record. + + + the forecolor index field for the AreaFormat record. + + + the backcolor index field for the AreaFormat record. + + + automatic formatting + @return the automatic field value. + + + swap foreground and background colours when data is negative + @return the invert field value. + + + * The area record is used to define a area chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Area record and s its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + the format flags field for the Area record. + + + series is stacked + @return the stacked field value. + + + results Displayed as percentages + @return the Display as percentage field value. + + + Display a shadow for the chart + @return the shadow field value. + + + * The axis size and location + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a AxisParent record and s its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + the axis type field for the AxisParent record. + + @return One of + AXIS_TYPE_MAIN + AXIS_TYPE_SECONDARY + + + the x field for the AxisParent record. + + + the y field for the AxisParent record. + + + the width field for the AxisParent record. + + + the height field for the AxisParent record. + + + * The axis record defines the type of an axis. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Axis record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the axis type field for the Axis record. + + @return One of + AXIS_TYPE_CATEGORY_OR_X_AXIS + AXIS_TYPE_VALUE_AXIS + AXIS_TYPE_SERIES_AXIS + + + Get the reserved1 field for the Axis record. + + + Get the reserved2 field for the Axis record. + + + Get the reserved3 field for the Axis record. + + + Get the reserved4 field for the Axis record. + + + * The bar record is used to define a bar chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Bar record and s its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + the bar space field for the Bar record. + + + the category space field for the Bar record. + + + the format flags field for the Bar record. + + + true to Display horizontal bar charts, false for vertical + @return the horizontal field value. + + + stack Displayed values + @return the stacked field value. + + + Display chart values as a percentage + @return the Display as percentage field value. + + + Display a shadow for the chart + @return the shadow field value. + + + The begin record defines the start of a block of records for a (grpahing + data object. This record is matched with a corresponding EndRecord. + + @see EndRecord + + @author Glen Stampoultzis (glens at apache.org) + + + Constructs a BeginRecord record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + CATLAB - Category Labels (0x0856)
    + + @author Patrick Cheng +
    + + ENDBLOCK - Chart Future Record Type End Block (0x0853)
    + + @author Patrick Cheng +
    + + ENDOBJECT - Chart Future Record Type End Object (0x0855)
    + + @author Patrick Cheng +
    + + + The ChartFrtInfo record specifies the versions of the application that originally created and last saved the file. + + + + * The chart record is used to define the location and size of a chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Chart record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the x field for the Chart record. + + + Get the y field for the Chart record. + + + Get the width field for the Chart record. + + + Get the height field for the Chart record. + + + STARTBLOCK - Chart Future Record Type Start Block (0x0852)
    + + @author Patrick Cheng +
    + + STARTOBJECT - Chart Future Record Type Start Object (0x0854)
    + + @author Patrick Cheng +
    + + + The CrtLink record is written but unused. + + + + * The data format record is used to index into a series. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a DataFormat record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the point number field for the DataFormat record. + + + Get the series index field for the DataFormat record. + + + Get the series number field for the DataFormat record. + + + Get the format flags field for the DataFormat record. + + + Set true to use excel 4 colors. + @return the use excel 4 colors field value. + + + DATALABEXT - Chart Data Label Extension (0x086A)
    + + @author Patrick Cheng +
    + + * The dat record is used to store options for the chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Dat record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the options field for the Dat record. + + + Sets the horizontal border field value. + has a horizontal border + + + has a horizontal border + @return the horizontal border field value. + + + Sets the vertical border field value. + has vertical border + + + has vertical border + @return the vertical border field value. + + + Sets the border field value. + data table has a border + + + data table has a border + @return the border field value. + + + Sets the show series key field value. + shows the series key + + + shows the series key + @return the show series key field value. + + + The end record defines the end of a block of records for a (Graphing) + data object. This record is matched with a corresponding BeginRecord. + + @see BeginRecord + + @author Glen Stampoultzis (glens at apache.org) + + + Constructs a EndRecord record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + * The font basis record stores various font metrics. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a FontBasis record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the x Basis field for the FontBasis record. + + + Get the y Basis field for the FontBasis record. + + + Get the height basis field for the FontBasis record. + + + Get the scale field for the FontBasis record. + + + Get the index to font table field for the FontBasis record. + + + * The frame record indicates whether there is a border around the Displayed text of a chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Frame record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the border type field for the Frame record. + + @return One of + BORDER_TYPE_REGULAR + BORDER_TYPE_SHADOW + + + Get the options field for the Frame record. + + + excel calculates the size automatically if true + @return the auto size field value. + + + excel calculates the position automatically + @return the auto position field value. + + + * Defines a legend for a chart. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver (acoliver at apache.org) + + + Constructs a Legend record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the x axis upper left field for the Legend record. + + + Get the y axis upper left field for the Legend record. + + + Get the x size field for the Legend record. + + + Get the y size field for the Legend record. + + + Get the type field for the Legend record. + + @return One of + TYPE_BOTTOM + TYPE_CORNER + TYPE_TOP + TYPE_RIGHT + TYPE_LEFT + TYPE_UNDOCKED + + + Get the spacing field for the Legend record. + + @return One of + SPACING_CLOSE + SPACING_MEDIUM + SPACING_OPEN + + + Get the options field for the Legend record. + + + automatic positioning (1=docked) + @return the auto position field value. + + + excel 5 only (true) + @return the auto series field value. + + + position of legend on the x axis is automatic + @return the auto x positioning field value. + + + position of legend on the y axis is automatic + @return the auto y positioning field value. + + + vertical or horizontal legend (1 or 0 respectively). Always 0 if not automatic. + @return the vertical field value. + + + 1 if chart Contains data table + @return the data table field value. + + + * Describes a line format record. The line format record controls how a line on a chart appears. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a LineFormat record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the line color field for the LineFormat record. + + + Get the line pattern field for the LineFormat record. + + @return One of + LINE_PATTERN_SOLID + LINE_PATTERN_DASH + LINE_PATTERN_DOT + LINE_PATTERN_DASH_DOT + LINE_PATTERN_DASH_DOT_DOT + LINE_PATTERN_NONE + LINE_PATTERN_DARK_GRAY_PATTERN + LINE_PATTERN_MEDIUM_GRAY_PATTERN + LINE_PATTERN_LIGHT_GRAY_PATTERN + + + Get the weight field for the LineFormat record. + specifies the thickness of the line. + @return One of + WEIGHT_HAIRLINE + WEIGHT_NARROW + WEIGHT_MEDIUM + WEIGHT_WIDE + + + Get the format field for the LineFormat record. + + + Get the colour palette index field for the LineFormat record. + + + automatic format + @return the auto field value. + + + draw tick marks + @return the draw ticks field value. + + + book marks this as reserved = 0 but it seems to do something + @return the Unknown field value. + + + * The number format index record indexes format table. This applies to an axis. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a NumberFormatIndex record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the format index field for the NumberFormatIndex record. + + + * Links text to an object on the chart or identifies it as the title. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver (acoliver at apache.org) + + + Constructs a ObjectLink record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the anchor id field for the ObjectLink record. + + @return One of + ANCHOR_ID_CHART_TITLE + ANCHOR_ID_Y_AXIS + ANCHOR_ID_X_AXIS + ANCHOR_ID_SERIES_OR_POINT + ANCHOR_ID_Z_AXIS + + + Get the link 1 field for the ObjectLink record. + + + Get the link 2 field for the ObjectLink record. + + + * preceeds and identifies a frame as belonging to the plot area. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver (acoliver at apache.org) + + + Constructs a PlotArea record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + * The plot growth record specifies the scaling factors used when a font is scaled. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a PlotGrowth record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the horizontalScale field for the PlotGrowth record. + + + Get the verticalScale field for the PlotGrowth record. + + + + pecifies positioning mode for position information saved in a Pos record. + + + + + Relative position to the chart, in points. + + + + + Absolute width and height in points. It can only be applied to the mdBotRt field of Pos. + + + + + Owner of Pos determines how to interpret the position data. + + + + + Offset to default position, in 1/1000th of the plot area size. + + + + + Relative position to the chart, in SPRC. + + + + + specifies the size and position for a legend, an attached label, or the plot area, as specified by the primary axis group. + + + + + specifies the positioning mode for the upper-left corner of a legend, an attached label, or the plot area. + + + + + specifies the positioning mode for the lower-right corner of a legend, an attached label, or the plot area + + + + + specifies a position. The meaning is specified in the earlier table showing the valid combinations mdTopLt and mdBotRt by type. + + + + + specifies a width. The meaning is specified in the earlier table showing the valid combinations mdTopLt and mdBotRt by type. + + + + + specifies a position. The meaning is specified in the earlier table showing the valid combinations mdTopLt and mdBotRt by type. + + + + + specifies a height. The meaning is specified in the earlier table showing the valid combinations mdTopLt and mdBotRt by type. + + + + * The series chart Group index record stores the index to the CHARTFORMAT record (0 based). + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a SeriesChartGroupIndex record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the chart Group index field for the SeriesChartGroupIndex record. + + + * links a series to its position in the series list. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver (acoliver at apache.org) + + + Constructs a SeriesIndex record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the index field for the SeriesIndex record. + + + * The series label record defines the type of label associated with the data format record. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a SeriesLabels record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the format flags field for the SeriesLabels record. + + + show actual value of the data point + @return the show actual field value. + + + show value as percentage of total (pie charts only) + @return the show percent field value. + + + show category label/value as percentage (pie charts only) + @return the label as percentage field value. + + + show smooth line + @return the smoothed line field value. + + + Display category label + @return the show label field value. + + + ?? + @return the show bubble sizes field value. + + + * The series list record defines the series Displayed as an overlay to the main chart record. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a SeriesList record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the series numbers field for the SeriesList record. + + + * The series record describes the overall data for a series. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Series record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the category data type field for the Series record. + + @return One of + CATEGORY_DATA_TYPE_DATES + CATEGORY_DATA_TYPE_NUMERIC + CATEGORY_DATA_TYPE_SEQUENCE + CATEGORY_DATA_TYPE_TEXT + + + Get the values data type field for the Series record. + + @return One of + VALUES_DATA_TYPE_DATES + VALUES_DATA_TYPE_NUMERIC + VALUES_DATA_TYPE_SEQUENCE + VALUES_DATA_TYPE_TEXT + + + Get the num categories field for the Series record. + + + Get the num values field for the Series record. + + + Get the bubble series type field for the Series record. + + @return One of + BUBBLE_SERIES_TYPE_DATES + BUBBLE_SERIES_TYPE_NUMERIC + BUBBLE_SERIES_TYPE_SEQUENCE + BUBBLE_SERIES_TYPE_TEXT + + + Get the num bubble values field for the Series record. + + + * Defines a series name + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver (acoliver at apache.org) + + + the actual text cannot be longer than 255 characters + + + Constructs a SeriesText record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the id field for the SeriesText record. + + + Get the text field for the SeriesText record. + + + * Indicates the chart-group index for a series. The order probably defines the mapping. So the 0th record probably means the 0th series. The only field in this of course defines which chart Group the 0th series (for instance) would map to. Confusing? Well thats because it Is. (p 522 BCG) + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver (acoliver at apache.org) + + + Constructs a SeriesToChartGroup record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the chart Group index field for the SeriesToChartGroup record. + + + * The value range record defines the range of the value axis. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a ValueRange record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the minimum axis value field for the ValueRange record. + + + Get the maximum axis value field for the ValueRange record. + + + Get the major increment field for the ValueRange record. + + + Get the minor increment field for the ValueRange record. + + + Get the category axis cross field for the ValueRange record. + + + Get the options field for the ValueRange record. + + + automatic minimum value selected + @return the automatic minimum field value. + + + automatic maximum value selected + @return the automatic maximum field value. + + + automatic major Unit selected + @return the automatic major field value. + + + automatic minor Unit selected + @return the automatic minor field value. + + + category crossing point is automatically selected + @return the automatic category crossing field value. + + + use logarithmic scale + @return the logarithmic scale field value. + + + values are reverses in graph + @return the values in reverse field value. + + + category axis to cross at maximum value + @return the cross category axis at maximum field value. + + + reserved, must equal 1 (excel dev. guide says otherwise) + @return the reserved field value. + + + + @return Palette color index, if type is {@link #TYPE_INDEXED} + + + @return Red Green Blue Alpha, if type is {@link #TYPE_RGB} + + + @return Theme color type index, eg {@link #THEME_DARK_1}, if type is {@link #TYPE_THEMED} + + + @return Tint and Shade value, between -1 and +1 + + + Title: Future Record, a newer (largely Excel 2007+) record + which Contains a Future Record Header ({@link FtrHeader}) + + + FeatFormulaErr2 (Formula Evaluation Shared Feature) common record part + + This record part specifies Formula Evaluation & Error Ignoring data + for a sheet, stored as part of a Shared Feature. It can be found in + records such as {@link FeatRecord}. + For the full meanings of the flags, see pages 669 and 670 + of the Excel binary file format documentation. + + + What errors we should ignore + + + Title: FeatProtection (Protection Shared Feature) common record part + + This record part specifies Protection data for a sheet, stored + as part of a Shared Feature. It can be found in records such + as {@link FeatRecord} + + + 0 means no password. Otherwise indicates the + password verifier algorithm (same kind as + {@link PasswordRecord} and + {@link PasswordRev4Record}) + + + Title: FeatSmartTag (Smart Tag Shared Feature) common record part + + This record part specifies Smart Tag data for a sheet, stored as part + of a Shared Feature. It can be found in records such as {@link FeatRecord}. + It is made up of a hash, and a Set of Factoid Data that Makes up + the smart tags. + For more details, see page 669 of the Excel binary file + format documentation. + + + Title: FtrHeader (Future Record Header) common record part + + This record part specifies a header for a Ftr (Future) + style record, which includes extra attributes above and + beyond those of a traditional record. + + + This MUST match the type on the Containing record + + + This is a FrtFlags + + + The range of cells the parent record applies to, or 0 if N/A + + + Common Interface for all Shared Features + + + + The ContinueFrt12 record specifies a continuation of the data in a preceding Future Record + Type record that has data longer than 8,224 bytes. Such records are split into several records. + The first section of the data appears in the base record and subsequent sections appear in + one or more ContinueFrt12 records that appear after the base record. The preceding base record + MUST contain a FrtRefHeader or a FrtHeader field. + + + author: Antony liu (antony.apollo at gmail.com) + + + + DConRef records specify a range in a workbook (internal or external) that serves as a data source + for pivot tables or data consolidation. + + Represents a DConRef Structure + [MS-XLS s. + 2.4.86], and the contained DConFile structure + + [MS-XLS s. 2.5.69]. This in turn contains a XLUnicodeStringNoCch + + [MS-XLS s. 2.5.296]. + +
    +                     _______________________________
    +                    |          DConRef              |
    +            (bytes) +-+-+-+-+-+-+-+-+-+-+...+-+-+-+-+
    +                    |    ref    |cch|  stFile   | un|
    +                    +-+-+-+-+-+-+-+-+-+-+...+-+-+-+-+
    +                                          |
    +                                 _________|_____________________
    +                                |DConFile / XLUnicodeStringNoCch|
    +                                +-+-+-+-+-+-+-+-+-+-+-+...+-+-+-+
    +                         (bits) |h|   reserved  |      rgb      |
    +                                +-+-+-+-+-+-+-+-+-+-+-+...+-+-+-+
    +             
    + Where +
      +
    • DConFile.h = 0x00 if the characters inrgb are single byte, and + DConFile.h = 0x01 if they are double byte.
      + If they are double byte, then
      +
        +
      • If it exists, the length of DConRef.un = 2. Otherwise it is 1.
      • +
      • The length of DConFile.rgb = (2 * DConRef.cch). Otherwise it is equal to + DConRef.cch
      • . +
      +
    • +
    • DConRef.rgb starts with 0x01 if it is an external reference, + and with 0x02 if it is a self-reference.
    • +
    + + At the moment this class is read-only. + + @author Niklas Rehfeld +
    + + The id of the record type, + sid = {@value} + + + A RefU structure specifying the range of cells if this record is part of an SXTBL. + + [MS XLS s.2.5.211] + + + A RefU structure specifying the range of cells if this record is part of an SXTBL. + + [MS XLS s.2.5.211] + + + A RefU structure specifying the range of cells if this record is part of an SXTBL. + + [MS XLS s.2.5.211] + + + A RefU structure specifying the range of cells if this record is part of an SXTBL. + + [MS XLS s.2.5.211] + + + the number of chars in the link + + + the type of characters (single or double byte) + + + The link's path string. This is the rgb field of a + XLUnicodeStringNoCch. Therefore it will contain at least one leading special + character (0x01 or 0x02) and probably other ones.

    + @see + DConFile [MS-XLS s. 2.5.77] and + + VirtualPath [MS-XLS s. 2.5.69] +

    + + + unused bits at the end, must be set to 0. + + + Read constructor. + + @param data byte array containing a DConRef Record, including the header. + + + Read Constructor. + + @param inStream RecordInputStream containing a DConRefRecord structure. + + + @return The first column of the range. + + + @return The first row of the range. + + + @return The last column of the range. + + + @return The last row of the range. + + + + @return raw path byte array. + + + @return the link's path, with the special characters stripped/replaced. May be null. + See MS-XLS 2.5.277 (VirtualPath) + + + Checks if the data source in this reference record is external to this sheet or internal. + + @return true iff this is an external reference. + + + The FtCf structure specifies the clipboard format of the picture-type Obj record Containing this FtCf. + + + Specifies the format of the picture is an enhanced metafile. + + + Specifies the format of the picture is a bitmap. + + + Specifies the picture is in an unspecified format that is + neither and enhanced metafile nor a bitmap. + + + Construct a new FtPioGrbitSubRecord and + fill its data with the default values + + + Convert this record to string. + Used by BiffViewer and other utilities. + + + Serialize the record data into the supplied array of bytes + + @param out the stream to serialize into + + + @return id of this record. + + + This structure appears as part of an Obj record that represents image display properties. + + + A bit that specifies whether the picture's aspect ratio is preserved when rendered in + different views (Normal view, Page Break Preview view, Page Layout view and printing). + + + A bit that specifies whether the pictFmla field of the Obj record that Contains + this FtPioGrbit specifies a DDE reference. + + + A bit that specifies whether this object is expected to be updated on print to + reflect the values in the cell associated with the object. + + + A bit that specifies whether the picture is displayed as an icon. + + + A bit that specifies whether this object is an ActiveX control. + It MUST NOT be the case that both fCtl and fDde are equal to 1. + + + A bit that specifies whether the object data are stored in an + embedding storage (= 0) or in the controls stream (ctls) (= 1). + + + A bit that specifies whether this is a camera picture. + + + A bit that specifies whether this picture's size has been explicitly Set. + 0 = picture size has been explicitly Set, 1 = has not been Set + + + A bit that specifies whether the OLE server for the object is called + to load the object's data automatically when the parent workbook is opened. + + + Construct a new FtPioGrbitSubRecord and + fill its data with the default values + + + Use one of the bitmasks MANUAL_ADVANCE_BIT ... CURSOR_VISIBLE_BIT + @param bitmask + @param enabled + + + Convert this record to string. + Used by BiffViewer and other utilities. + + + Serialize the record data into the supplied array of bytes + + @param out the stream to serialize into + + + @return id of this record. + + + Base class for all old (Biff 2 - Biff 4) cell value records + (implementors of {@link CellValueRecordInterface}). + Subclasses are expected to manage the cell data values (of various types). + + + Get the index to the ExtendedFormat, for non-Biff2 + + @see NPOI.HSSF.Record.ExtendedFormatRecord + @return index to the XF record + + + Is this a Biff2 record, or newer? + + + Append specific debug info (used by {@link #ToString()} for the value + Contained in this record. Trailing new-line should not be Appended + (superclass does that). + + + Gets the debug info BIFF record type name (used by {@link #ToString()}. + + + Formula Record (0x0006 / 0x0206 / 0x0406) - holds a formula in + encoded form, along with the value if a number + + + Get the calculated value of the formula + + @return calculated value + + + Get the option flags + + @return bitmask + + + @return the formula tokens. never null + + + Biff2 - Biff 4 Label Record (0x0004 / 0x0204) - read only support for + strings stored directly in the cell, from the older file formats that + didn't use {@link LabelSSTRecord} + + + @param in the RecordInputstream to read the record from + + + Get the number of characters this string Contains + @return number of characters + + + Get the String of the cell + + + Not supported + + + Title: Bound Sheet Record (aka BundleSheet) (0x0085) for BIFF 5
    + Description: Defines a sheet within a workbook. Basically stores the sheet name + and tells where the Beginning of file record is within the HSSF + file. +
    + + Get the offset in bytes of the Beginning of File Marker within the HSSF Stream part of the POIFS file + + @return offset in bytes + + + Get the sheetname for this sheet. (this appears in the tabs at the bottom) + @return sheetname the name of the sheet + + + Biff2 - Biff 4 Label Record (0x0007 / 0x0207) - read only support for + formula string results. + + + @param in the RecordInputstream to read the record from + + + @return The string represented by this record. + + +

    + this record only used for record that has name and not implemented. + +
    + + + DOPER Structure for AutoFilter record + + author: Tony Qu + + + + get or set the RK record + + + + + Gets or sets Length of the string (the string is stored in the rgch field that follows the DOPER structures) + + + + + Whether the bBoolErr field contains a Boolean value + + + + + Whether the bBoolErr field contains a Error value + + + + + Get or sets the boolean value + + + + + Get or sets the boolean value + + + + Title: Unicode String

    + Description: Unicode String - just standard fields that are in several records. + It is considered more desirable then repeating it in all of them.

    + This is often called a XLUnicodeRichExtendedString in MS documentation.

    + REFERENCE: PG 264 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)

    + REFERENCE: PG 951 Excel Binary File Format (.xls) Structure Specification v20091214 + + + Returns our size, excluding our + 4 byte header + + + Our handling of Equals is inconsistent with CompareTo. The trouble is because we don't truely understand + rich text fields yet it's difficult to make a sound comparison. + + @param o The object to Compare. + @return true if the object is actually Equal. + + + construct a unicode string record and fill its fields, ID is ignored + @param in the RecordInputstream to read the record from + + + get the number of characters in the string, + as an un-wrapped int + + @return number of characters + + + Get the option flags which among other things return if this is a 16-bit or + 8 bit string + + @return optionflags bitmask + + + + @return the actual string this Contains as a java String object + + + Adds a font run to the formatted string. + + If a font run exists at the current charcter location, then it is + Replaced with the font run to be Added. + + + Swaps all use in the string of one font index + for use of a different font index. + Normally only called when fonts have been + Removed / re-ordered + + + unlike the real records we return the same as "getString()" rather than debug info + @see #getDebugInfo() + @return String value of the record + + + return a character representation of the fields of this record + + + @return String of output for biffviewer etc. + + + + Serialises out the String. There are special rules + about where we can and can't split onto + Continue records. + + + A decorated {@link RecordInputStream} that can read primitive data types + (short, int, long, etc.) spanned across a {@link ContinueRecord } boundary. + +

    + Most records construct themselves from {@link RecordInputStream}. + This class assumes that a {@link ContinueRecord} record break always occurs at the type boundary, + however, it is not always so. +

    + Two attachments to Bugzilla 50779 + demonstrate that a CONTINUE break can appear right in between two bytes of a unicode character + or between two bytes of a short. The problematic portion of the data is + in a Asian Phonetic Settings Block (ExtRst) of a UnicodeString. +

    + {@link RecordInputStream} greedily requests the bytes to be read and stumbles on such files with a + "Not enough data (1) to read requested (2) bytes" exception. The ContinuableRecordInput + class circumvents this "type boundary" rule and Reads data byte-by-byte rolling over CONTINUE if necessary. +

    + +

    + YK: For now (March 2011) this class is only used to read + @link NPOI.HSSF.Record.Common.UnicodeString.ExtRst} blocks of a UnicodeString. + +

    + + @author Yegor Kozlov +
    + + Common superclass of all records that can produce {@link ContinueRecord}s while being Serialized. + + @author Josh Micich + + + Serializes this record's content to the supplied data output.
    + The standard BIFF header (ushort sid, ushort size) has been handled by the superclass, so + only BIFF data should be written by this method. Simple data types can be written with the + standard {@link LittleEndianOutput} methods. Methods from {@link ContinuableRecordOutput} + can be used to Serialize strings (with {@link ContinueRecord}s being written as required). + If necessary, implementors can explicitly start {@link ContinueRecord}s (regardless of the + amount of remaining space). + + @param out a data output stream +
    + + @return the total Length of the encoded record(s) + (Note - if any {@link ContinueRecord} is required, this result includes the + size of those too) + + + An augmented {@link LittleEndianOutput} used for serialization of {@link ContinuableRecord}s. + This class keeps track of how much remaining space is available in the current BIFF record and + can start new {@link ContinueRecord}s as required. + + @author Josh Micich + + + @return total number of bytes written so far (including all BIFF headers) + + + Terminates the last record (also updates its 'ushort size' field) + + + @return number of remaining bytes of space in current record + + + Terminates the current record and starts a new {@link ContinueRecord} (regardless + of how much space is still available in the current record). + + + Writes the 'optionFlags' byte and encoded character data of a unicode string. This includes: +
      +
    • byte optionFlags
    • +
    • encoded character data (in "ISO-8859-1" or "UTF-16LE" encoding)
    • +
    + + Notes: +
      +
    • The value of the 'is16bitEncoded' flag is determined by the actual character data + of text
    • +
    • The string options flag is never separated (by a {@link ContinueRecord}) from the + first chunk of character data it refers to.
    • +
    • The 'ushort Length' field is assumed to have been explicitly written earlier. Hence, + there may be an intervening {@link ContinueRecord}
    • +
    +
    + + Writes a unicode string complete with header and character data. This includes: +
      +
    • ushort Length
    • +
    • byte optionFlags
    • +
    • ushort numberOfRichTextRuns (optional)
    • +
    • ushort extendedDataSize (optional)
    • +
    • encoded character data (in "ISO-8859-1" or "UTF-16LE" encoding)
    • +
    + + The following bits of the 'optionFlags' byte will be set as appropriate: + + + + + +
    MaskDescription
    0x01is16bitEncoded
    0x04hasExtendedData
    0x08isRichText
    + Notes: +
      +
    • The value of the 'is16bitEncoded' flag is determined by the actual character data + of text
    • +
    • The string header fields are never separated (by a {@link ContinueRecord}) from the + first chunk of character data (i.e. the first character is always encoded in the same + record as the string header).
    • +
    +
    + + ** + + + Allows the writing of BIFF records when the 'ushort size' header field is not known in advance. + When the client is finished writing data, it calls {@link #terminate()}, at which point this + class updates the 'ushort size' with its value. + + @author Josh Micich + + + for writing the 'ushort size' field once its value is known + + + includes 4 byte header + + + Finishes writing the current record and updates 'ushort size' field.
    + After this method is called, only {@link #getTotalSize()} may be called. +
    + + Title: FeatHdr (Feature Header) Record + + This record specifies common information for Shared Features, and + specifies the beginning of a collection of records to define them. + The collection of data (Globals Substream ABNF, macro sheet substream + ABNF or worksheet substream ABNF) specifies Shared Feature data. + + + Specifies the enhanced protection type. Used to protect a + shared workbook by restricting access to some areas of it + + + Specifies that formula errors should be ignored + + + Specifies the smart tag type. Recognises certain + types of entries (proper names, dates/times etc) and + flags them for action + + + Specifies the shared list type. Used for a table + within a sheet + + + 0x00000000 = rgbHdrData not present + 0xffffffff = rgbHdrData present + + + We need a BOFRecord to make sense of this... + + + Title: Feat (Feature) Record + + This record specifies Shared Features data. It is normally paired + up with a {@link FeatHdrRecord}. + + + See SHAREDFEATURES_* on {@link FeatHdrRecord} + + + Only matters if type is ISFFEC2 + + + Contents depends on isf_sharedFeatureType : + ISFPROTECTION -> FeatProtection + ISFFEC2 -> FeatFormulaErr2 + ISFFACTOID -> FeatSmartTag + + + Construct a new FtCblsSubRecord and + fill its data with the default values + + + Convert this record to string. + Used by BiffViewer and other utilities. + + + Serialize the record data into the supplied array of bytes + + @param out the stream to serialize into + + + @return id of this record. + + + + + + + + The escher container record is used to hold escher records. It is abstract and + must be subclassed for maximum benefit. + + @author Glen Stampoultzis (glens at apache.org) + @author Michael Zalewski (zalewski at optonline.net) + + + Constructs a Bar record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (including 4 byte header) + + + Clone the current record, via a call to serialise + it, and another to Create a new record from the + bytes. + May only be used for classes which don't have + internal counts / ids in them. For those which + do, a full record-aware serialise is needed, which + allocates new ids / counts as needed. + + + If we have a EscherContainerRecord as one of our + children (and most top level escher holders do), + then return that. + + + Descends into all our children, returning the + first EscherRecord with the given id, or null + if none found + + + Big drawing Group records are split but it's easier to deal with them + as a whole Group so we need to join them toGether. + + + Convert raw data to escher records. + + + ARRAY (0x0221)

    + + Treated in a similar way to SharedFormulaRecord + + @author Josh Micich + + + Title: Backup Record + Description: bool specifying whether + the GUI should store a backup of the file. + REFERENCE: PG 287 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a BackupRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + Get the backup flag + + @return short 0/1 (off/on) + + + Read an unsigned short from the stream without decrypting + + + Read an unsigned short from the stream without decrypting + + + Title: Blank cell record + Description: Represents a column in a row with no value but with styling. + REFERENCE: PG 287 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Creates a new instance of BlankRecord + + + Constructs a BlankRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + Get the row this cell occurs on + + @return the row + + + Get the column this cell defines within the row + + @return the column + + + Set the index of the extended format record to style this cell with + + @param xf - the 0-based index of the extended format + @see org.apache.poi.hssf.record.ExtendedFormatRecord + + + return the non static version of the id for this record. + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + @return byte array containing instance data + + + Title: Beginning Of File + Description: Somewhat of a misnomer, its used for the beginning of a Set of + records that have a particular pupose or subject. + Used in sheets and workbooks. + REFERENCE: PG 289 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + for BIFF8 files the BOF is 0x809. For earlier versions see + {@link #biff2_sid} {@link #biff3_sid} {@link #biff4_sid} + {@link #biff5_sid} + + + suggested default (0x06 - BIFF8) + + + suggested default 0x10d3 + + + suggested default 0x07CC (1996) + + + suggested default for a normal sheet (0x41) + + + Constructs an empty BOFRecord with no fields Set. + + + Constructs a BOFRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + Version number - for BIFF8 should be 0x06 + @see #VERSION + @param version version to be Set + + + Set the history bit mask (not very useful) + @see #HISTORY_MASK + @param bitmask bitmask to Set for the history + + + Set the minimum version required to Read this file + + @see #VERSION + @param version version to Set + + + type of object this marks + @see #TYPE_WORKBOOK + @see #TYPE_VB_MODULE + @see #TYPE_WORKSHEET + @see #TYPE_CHART + @see #TYPE_EXCEL_4_MACRO + @see #TYPE_WORKSPACE_FILE + @return short type of object + + + Get the build that wrote this file + @see #BUILD + @return short build number of the generator of this file + + + Year of the build that wrote this file + @see #BUILD_YEAR + @return short build year of the generator of this file + + + Title: Save External Links record (BookBool) + Description: Contains a flag specifying whether the Gui should save externally + linked values from other workbooks. + REFERENCE: PG 289 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a BookBoolRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + Get the save ext links flag + + @return short 0/1 (off/on) + + + Creates new BoolErrRecord. + REFERENCE: PG ??? Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Michael P. Harhen + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + If true, this record represents an error cell value, otherwise this record represents a boolean cell value + + + Creates new BoolErrRecord + + + Constructs a BoolErr record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Set the bool value for the cell + + @param value representing the bool value + + + set the error value for the cell. See {@link FormulaError} for valid codes. + + @param value error representing the error value + this value can only be 0,7,15,23,29,36 or 42 + see bugzilla bug 16560 for an explanation + + + Set the error value for the cell + + @param value error representing the error value + this value can only be 0,7,15,23,29,36 or 42 + see bugzilla bug 16560 for an explanation + + + Get the value for the cell + + @return bool representing the bool value + + + Get the error value for the cell + + @return byte representing the error value + + + Indicates whether the call holds a boolean value + + @return boolean true if the cell holds a boolean value + + + Indicates whether the call holds an error value + + @return bool true if the cell holds an error value + + + Record for the bottom margin. + NOTE: This source was automatically generated. + + @author Shawn Laubach (slaubach at apache dot org) + + + Constructs a BottomMargin record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Get the margin field for the BottomMargin record. + + + Title: Bound Sheet Record (aka BundleSheet) + Description: Defines a sheet within a workbook. Basically stores the sheetname + and tells where the Beginning of file record Is within the HSSF + file. + REFERENCE: PG 291 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Sergei Kozello (sergeikozello at mail.ru) + + + Constructs a BoundSheetRecord and Sets its fields appropriately + + @param in the RecordInputstream to Read the record from + + + Get the offset in bytes of the Beginning of File Marker within the HSSF Stream part of the POIFS file + + @return offset in bytes + + + Is the sheet very hidden? Different from (normal) hidden + + + Get the sheetname for this sheet. (this appears in the tabs at the bottom) + @return sheetname the name of the sheet + + + Converts a List of {@link BoundSheetRecord}s to an array and sorts by the position of their + BOFs. + + + Title: Calc Count Record + Description: Specifies the maximum times the gui should perform a formula + recalculation. For instance: in the case a formula includes + cells that are themselves a result of a formula and a value + Changes. This Is essentially a failsafe against an infinate + loop in the event the formulas are not independant. + REFERENCE: PG 292 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + @see org.apache.poi.hssf.record.CalcModeRecord + + + Constructs a CalcCountRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + + Get the number of iterations to perform + @return iterations + + + Title: Calc Mode Record + Description: Tells the gui whether to calculate formulas + automatically, manually or automatically + except for tables. + REFERENCE: PG 292 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + @see org.apache.poi.hssf.record.CalcCountRecord + + + manually calculate formulas (0) + + + automatically calculate formulas (1) + + + automatically calculate formulas except for tables (-1) + + + Constructs a CalcModeRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + Set the calc mode flag for formulas + + @see #MANUAL + @see #AUTOMATIC + @see #AUTOMATIC_EXCEPT_TABLES + + @param calcmode one of the three flags above + + + Get the calc mode flag for formulas + + @see #MANUAL + @see #AUTOMATIC + @see #AUTOMATIC_EXCEPT_TABLES + + @return calcmode one of the three flags above + + + get the index to the ExtendedFormat + + @see org.apache.poi.hssf.record.ExtendedFormatRecord + @return index to the XF record + + + Append specific debug info (used by {@link #toString()} for the value + contained in this record. Trailing new-line should not be Appended + (superclass does that). + + + Gets the debug info BIFF record type name (used by {@link #toString()}. + + + writes out the value data for this cell record + + + @return the size (in bytes) of the value data for this cell record + + + The cell value record interface Is implemented by all classes of type Record that + contain cell values. It allows the containing sheet to move through them and Compare + them. + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + + @see org.apache.poi.hssf.model.Sheet + @see org.apache.poi.hssf.record.Record + @see org.apache.poi.hssf.record.RecordFactory + + + Get the row this cell occurs on + + @return the row + + + Get the column this cell defines within the row + + @return the column + + + Conditional Formatting Header record CFHEADER (0x01B0). + Used to describe a {@link CFRuleRecord}. + @see CFHeader12Record + + + Creates new CFHeaderRecord + + + + Creates new CFRuleRecord + + + Creates a new comparison operation rule + + + Creates a new comparison operation rule + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + @param out the stream to write to + + + Class ChartFormatRecord + + + @author Glen Stampoultzis (glens at apache.org) + @version %I%, %G% + + + Constructs a ChartFormatRecord record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + +

    + Section [2.4.324]. The Text record specifies the properties of an attached label and specifies the beginning of + a collection of records as defined by the chart sheet substream ABNF. This collection of records specifies an attached label. + +
    + + + Left-alignment if iReadingOrder specifies left-to-right reading order; otherwise, right-alignment + + + + + Center-alignment + + + + + Right-alignment if iReadingOrder specifies left-to-right reading order; otherwise, left-alignment + + + + + Justify-alignment + + + + + distributed alignment + + + + + distributed alignment + + + + + Transparent background + + + + + Opaque background + + + + Constructs a Text record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the horizontal alignment field for the Text record. + + @return One of + HORIZONTAL_ALIGNMENT_LEFT + HORIZONTAL_ALIGNMENT_CENTER + HORIZONTAL_ALIGNMENT_BOTTOM + HORIZONTAL_ALIGNMENT_JUSTIFY + + + Get the vertical alignment field for the Text record. + + @return One of + VERTICAL_ALIGNMENT_TOP + VERTICAL_ALIGNMENT_CENTER + VERTICAL_ALIGNMENT_BOTTOM + VERTICAL_ALIGNMENT_JUSTIFY + + + Get the Display mode field for the Text record. + + @return One of + DISPLAY_MODE_TRANSPARENT + DISPLAY_MODE_OPAQUE + + + Get the rgbColor field for the Text record. + + + Get the x field for the Text record. + + + Get the y field for the Text record. + + + Set the width field for the Text record. + + + Get the height field for the Text record. + + + Get the options1 field for the Text record. + + + Get the index of color value field for the Text record. + + + Get the options2 field for the Text record. + + + Get the text rotation field for the Text record. + + + true = automaticly selected colour, false = user-selected + @return the auto color field value. + + + true = draw legend + @return the show key field value. + + + false = text is category label + @return the show value field value. + + + + @return the auto generated text field value. + + + + @return the generated field value. + + + + @return the auto label deleted field value. + + + + @return the auto background field value. + + + + @return the show category label as percentage field value. + + + + @return the show value as percentage field value. + + + + @return the show bubble sizes field value. + + + + @return the show label field value. + + + + @return the data label placement field value. + + + * The Tick record defines how tick marks and label positioning/formatting + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver(acoliver at apache.org) + + + Constructs a Tick record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the major tick type field for the Tick record. + + + Get the minor tick type field for the Tick record. + + + Get the label position field for the Tick record. + + + Get the background field for the Tick record. + + + Get the label color rgb field for the Tick record. + + + Get the zero 1 field for the Tick record. + + + Get the zero 2 field for the Tick record. + + + Get the options field for the Tick record. + + + Get the tick color field for the Tick record. + + + Get the zero 3 field for the Tick record. + + + use the quote Unquote automatic color for text + @return the auto text color field value. + + + use the quote Unquote automatic color for text background + @return the auto text background field value. + + + rotate text (0=none, 1=normal, 2=90 degrees counterclockwise, 3=90 degrees clockwise) + @return the rotation field value. + + + automatically rotate the text + @return the autorotate field value. + + + * The Units record describes Units. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Units record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the Units field for the Units record. + + + Title: Codepage Record +

    Description: the default characterset. for the workbook

    +

    REFERENCE: PG 293 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)

    +

    Use {@link CodePageUtil} to turn these values into Java code pages + to encode/decode strings.

    + @version 2.0-pre +
    + + Excel 97+ (Biff 8) should always store strings as UTF-16LE or + compressed versions of that. As such, this should always be + 0x4b0 = UTF_16, except for files coming from older versions. + + + Constructs a CodepageRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + Get the codepage for this workbook + + @see #CODEPAGE + @return codepage - the codepage to Set + + + Title: COLINFO Record

    + Description: Defines with width and formatting for a range of columns

    + REFERENCE: PG 293 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)

    + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a ColumnInfo record and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + @return true if the format, options and column width match + + + Get the first column this record defines formatting info for + @return the first column index (0-based) + + + Get the last column this record defines formatting info for + @return the last column index (0-based) + + + Get the columns' width in 1/256 of a Char width + @return column width + + + Get the columns' default format info + @return the extended format index + @see org.apache.poi.hssf.record.ExtendedFormatRecord + + + Get the options bitfield - use the bitSetters instead + @return the bitfield raw value + + + Get whether or not these cells are hidden + @return whether the cells are hidden. + @see #SetOptions(short) + + + Get the outline level for the cells + @see #SetOptions(short) + @return outline level for the cells + + + Get whether the cells are collapsed + @return wether the cells are collapsed + @see #SetOptions(short) + + + Title: Continue Record - Helper class used primarily for SST Records + Description: handles overflow for prior record in the input + stream; content Is tailored to that prior record + @author Marc Johnson (mjohnson at apache dot org) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Csaba Nagy (ncsaba at yahoo dot com) + @version 2.0-pre + + + default constructor + + + Main constructor -- kinda dummy because we don't validate or fill fields + + @param in the RecordInputstream to Read the record from + + + Writes the full encoding of a Continue record without making an instance + + + @param initialDataByte (optional - often used for unicode flag). + If supplied, this will be written before srcData + @return the total number of bytes written + + + Get the data for continuation + @return byte array containing all of the continued data + + + Debugging toString + + @return string representation + + + Clone this record. + + + Title: Country Record (aka WIN.INI country) + Description: used for localization. Currently HSSF always Sets this to 1 + and it seems to work fine even in Germany. (es geht's auch fuer Deutschland) + + REFERENCE: PG 298 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a CountryRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + Gets the default country + + @return country ID (1 = US) + + + Gets the current country + + @return country ID (1 = US) + + + XCT ?CRN Count + + REFERENCE: 5.114 + + @author Josh Micich + + + return the non static version of the id for this record. + + + Title: CRN + Description: This record stores the contents of an external cell or cell range + REFERENCE: 5.23 + + @author josh micich + + + return the non static version of the id for this record. + + + + @author Josh Micich + + + Reads an unsigned short value without decrypting + + + Reads an unsigned short value without decrypting + + + Create using the default password and a specified docId + @param docId 16 bytes + + + @return true if the keyDigest is compatible with the specified saltData and saltHash + + + The {@link RC4} instance needs to be Changed every 1024 bytes. + @param keyBlockNo used to seed the newly Created {@link RC4} + + + Stores the BIFF8 encryption/decryption password for the current thread. This has been done + using a {@link ThreadLocal} in order to avoid further overloading the various public APIs + (e.g. {@link HSSFWorkbook}) that need this functionality. + + + @return the BIFF8 encryption/decryption password for the current thread. + null if it is currently unSet. + + + Used for both encrypting and decrypting BIFF8 streams. The internal + {@link RC4} instance is renewed (re-keyed) every 1024 bytes. + + @author Josh Micich + + + This field is used to keep track of when to change the {@link RC4} + instance. The change occurs every 1024 bytes. Every byte passed over is + counted. + + + TODO: Additionally, the lbPlyPos (position_of_BOF) field of the BoundSheet8 record MUST NOT be encrypted. + + @return true if record type specified by sid is never encrypted + + + Used when BIFF header fields (sid, size) are being Read. The internal + {@link RC4} instance must step even when unencrypted bytes are read + + + Simple implementation of the alleged RC4 algorithm. + + Inspired by wikipedia's RC4 article + + @author Josh Micich + + + @return The size of this field in bytes. This operation Is not valid + Until after the call to FillField() + + + Populates this fields data from the byte array passed in1. + @param in the RecordInputstream to Read the record from + + + Appends the string representation of this field to the supplied + StringBuilder. + + @param str The string buffer to Append to. + + + Converts this field to it's byte array form. + @param offset The offset into the byte array to start writing to. + @param data The data array to Write to. + @return The number of bytes written. + + + Title: Date Window 1904 Flag record + Description: Flag specifying whether 1904 date windowing Is used. + (tick toc tick toc...BOOM!) + REFERENCE: PG 280 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a DateWindow1904 record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Gets whether or not to use 1904 date windowing (which means you'll be screwed in 2004) + @return window flag - 0/1 (false,true) + + + Title: DBCell Record + Description: Used by Excel and other MS apps to quickly Find rows in the sheets. + REFERENCE: PG 299/440 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height + @version 2.0-pre + + + Constructs a DBCellRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + offset from the start of this DBCellRecord to the start of the first cell in + the next DBCell block. + + + Gets offset from the start of this DBCellRecord to the start of the first cell in + the next DBCell block. + + @return rowoffset to the start of the first cell in the next DBCell block + + + return the cell offset in the array + + @param index of the cell offset to retrieve + @return celloffset from the celloffset array + + + Get the number of cell offsets in the celloffset array + + @return number of cell offsets + + + @returns the size of the Group of DBCellRecords needed to encode + the specified number of blocks and rows + + + Title: Default Column Width Record + Description: Specifies the default width for columns that have no specific + width Set. + REFERENCE: PG 302 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + The default column width is 8 characters + + + Constructs a DefaultColumnWidth record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the default column width + @return defaultwidth for columns + + + Title: Default Row Height Record + Description: Row height for rows with Undefined or not explicitly defined + heights. + REFERENCE: PG 301 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + The default row height for empty rows is 255 twips (255 / 20 == 12.75 points) + + +

    + Constructs a DefaultRowHeight record and Sets its fields appropriately. + + the RecordInputstream to Read the record from +
    + + + Get the default row height + + + + Title: Delta Record + Description: controls the accuracy of the calculations + REFERENCE: PG 303 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a Delta record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the maximum Change + @return maxChange - maximum rounding error + + + Title: Dimensions Record + Description: provides the minumum and maximum bounds + of a sheet. + REFERENCE: PG 303 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a Dimensions record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the first row number for the sheet + @return row - first row on the sheet + + + Get the last row number for the sheet + @return row - last row on the sheet + + + Get the first column number for the sheet + @return column - first column on the sheet + + + Get the last col number for the sheet + @return column - last column on the sheet + + + Process the bytes into escher records. + (Not done by default in case we break things, + Unless you Set the "poi.deSerialize.escher" + system property) + + + Size of record (including 4 byte headers for all sections) + + + DrawingRecord (0x00EC)

    + + + + Cloning of drawing records must be executed through HSSFPatriarch, because all id's must be changed + @return cloned drawing records + + + This Is purely for the biff viewer. During normal operations we don't want + to be seeing this. + + + Title: double Stream Flag Record + Description: tells if this Is a double stream file. (always no for HSSF generated files) + double Stream files contain both BIFF8 and BIFF7 workbooks. + REFERENCE: PG 305 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a DBCellRecord and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Title: DATAVALIDATIONS Record + Description: used in data validation ; + This record Is the list header of all data validation records (0x01BE) in the current sheet. + @author Dragos Buleandra (dragos.buleandra@trade2b.ro) + + + Options of the DVAL + + + Horizontal position of the dialog + + + Vertical position of the dialog + + + Object ID of the drop down arrow object for list boxes ; + in our case this will be always FFFF , Until + MSODrawingGroup and MSODrawing records are implemented + + + Number of following DV Records + + + Constructs a DVAL record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + @return the field_1_options + + + @return the Horizontal position of the dialog + + + @return the the Vertical position of the dialog + + + Get Object ID of the drop down arrow object for list boxes + + + Get number of following DV records + + + Title: DATAVALIDATION Record (0x01BE)

    + Description: This record stores data validation Settings and a list of cell ranges + which contain these Settings. The data validation Settings of a sheet + are stored in a sequential list of DV records. This list Is followed by + DVAL record(s) + @author Dragos Buleandra (dragos.buleandra@trade2b.ro) + @version 2.0-pre + + + Option flags + + + Title of the prompt box + + + Title of the error box + + + Text of the prompt box + + + Text of the error box + + + Not used - Excel seems to always write 0x3FE0 + + + Formula data for first condition (RPN token array without size field) + + + Not used - Excel seems to always write 0x0000 + + + Formula data for second condition (RPN token array without size field) + + + Cell range address list with all affected ranges + + + Option flags field + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + Constructs a DV record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + When entered via the UI, Excel translates empty string into "\0" + While it is possible to encode the title/text as empty string (Excel doesn't exactly crash), + the resulting tool-tip text / message box looks wrong. It is best to do the same as the + Excel UI and encode 'not present' as "\0". + + + Get the condition data type + @return the condition data type + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + Get the condition error style + @return the condition error style + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + return true if in list validations the string list Is explicitly given in the formula, false otherwise + @return true if in list validations the string list Is explicitly given in the formula, false otherwise + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + return true if empty values are allowed in cells, false otherwise + @return if empty values are allowed in cells, false otherwise + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + @return true if drop down arrow should be suppressed when list validation is + used, false otherwise + + + return true if a prompt window should appear when cell Is selected, false otherwise + @return if a prompt window should appear when cell Is selected, false otherwise + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + return true if an error window should appear when an invalid value Is entered in the cell, false otherwise + @return if an error window should appear when an invalid value Is entered in the cell, false otherwise + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + Get the condition operator + @return the condition operator + @see org.apache.poi.hssf.util.HSSFDataValidation utility class + + + Gets the option flags field. + @return options - the option flags field + + + Clones the object. Uses serialisation, as the + contents are somewhat complex + + + End Of File record. + + Description: Marks the end of records belonging to a particular object in the + HSSF File + REFERENCE: PG 307 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a EOFRecord record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + This class Is used to aggregate the MSODRAWING and OBJ record + combinations. This Is necessary due to the bizare way in which + these records are Serialized. What happens Is that you Get a + combination of MSODRAWING -> OBJ -> MSODRAWING -> OBJ records + but the escher records are Serialized _across_ the MSODRAWING + records. + + It Gets even worse when you start looking at TXO records. + + So what we do with this class Is aggregate lazily. That Is + we don't aggregate the MSODRAWING -> OBJ records Unless we + need to modify them. + + At first document contains 4 types of records which belong to drawing layer. + There are can be such sequence of record: +

    + DrawingRecord + ContinueRecord + ... + ContinueRecord + ObjRecord | TextObjectRecord + ..... + ContinueRecord + ... + ContinueRecord + ObjRecord | TextObjectRecord + NoteRecord + ... + NoteRecord +

    + To work with shapes we have to read data from Drawing and Continue records into single array of bytes and + build escher(office art) records tree from this array. + Each shape in drawing layer matches corresponding ObjRecord + Each textbox matches corresponding TextObjectRecord +

    + ObjRecord contains information about shape. Thus each ObjRecord corresponds EscherContainerRecord(SPGR) +

    + EscherAggrefate contains also NoteRecords + NoteRecords must be serial + + @author Glen Stampoultzis (glens at apache.org) + + + Maps shape container objects to their OBJ records + + + list of "tail" records that need to be Serialized after all drawing Group records + + + @return Returns the current sid. + + + Calculates the string representation of this record. This Is + simply a dump of all the records. + + + Calculates the xml representation of this record. This is + simply a dump of all the records. + @param tab - string which must be added before each line (used by default '\t') + @return xml representation of the all aggregated records + + + @param sid - record sid we want to check if it belongs to drawing layer + @return true if record is instance of DrawingRecord or ContinueRecord or ObjRecord or TextObjRecord + + + Collapses the drawing records into an aggregate. + read Drawing, Obj, TxtObj, Note and Continue records into single byte array, + create Escher tree from byte array, create map <EscherRecord, Record> + + @param records - list of all records inside sheet + @param locFirstDrawingRecord - location of the first DrawingRecord inside sheet + @return new EscherAggregate create from all aggregated records which belong to drawing layer + + + Serializes this aggregate to a byte array. Since this Is an aggregate + record it will effectively Serialize the aggregated records. + + @param offset The offset into the start of the array. + @param data The byte array to Serialize to. + @return The number of bytes Serialized. + + + @param drawingData - escher records saved into single byte array + @param writtenEscherBytes - count of bytes already saved into drawing records (we should know it to decide create + drawing or continue record) + @param pos current position of data array + @param data - array of bytes where drawing records must be serialized + @param i - number of shape, saved into data array + @return offset of data array after serialization + + + How many bytes do the raw escher records contain. + + @param records List of escher records + @return the number of bytes + + + @param records list of records to look into + @param loc - location of the record which sid must be returned + @return sid of the record with selected location + + + @return record size, including header size of obj, text, note, drawing, continue records + + + create base tree with such structure: + EscherDgContainer + -EscherSpgrContainer + --EscherSpContainer + ---EscherSpRecord + ---EscherSpgrRecord + ---EscherSpRecord + -EscherDgRecord + + id of DgRecord and SpRecord are empty and must be set later by HSSFPatriarch + + + Unused since this Is an aggregate record. Use CreateAggregate(). + + @see #CreateAggregate + + + Converts the Records into UserModel + objects on the bound HSSFPatriarch + + +

    + Associates an escher record to an OBJ record or a TXO record. + + ClientData or Textbox record + Obj or TextObj record +
    + + + Remove echerRecord and associated to it Obj or TextObj record + + clientData or textbox record to be removed + + + @return unmodifiable copy of tail records. We need to access them when building shapes. + Every HSSFComment shape has a link to a NoteRecord from the tailRec collection. + + + @param obj - ObjRecord with id == NoteRecord.id + @return null if note record is not found else returns note record with id == obj.id + + + Title: Extended Format Record + Description: Probably one of the more complex records. There are two breeds: + Style and Cell. + + It should be noted that fields in the extended format record are + somewhat arbitrary. Almost all of the fields are bit-level, but + we name them as best as possible by functional Group. In some + places this Is better than others. + + + REFERENCE: PG 426 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructor ExtendedFormatRecord + + + + + Constructs an ExtendedFormat record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Clones all the style information from another + ExtendedFormatRecord, onto this one. This + will then hold all the same style options. + + If The source ExtendedFormatRecord comes from + a different Workbook, you will need to sort + out the font and format indicies yourself! + + + + Get the index to the FONT record (which font to use 0 based) + + + + + Get the index to the Format record (which FORMAT to use 0-based) + + + + + Gets the options bitmask - you can also use corresponding option bit Getters + (see other methods that reference this one) + + + + + Get whether the cell Is locked or not + + + + + Get whether the cell Is hidden or not + + + + + Get whether the cell Is a cell or style XFRecord + + + + + Get some old holdover from lotus 123. Who cares, its all over for Lotus. + RIP Lotus. + + + + + for cell XF types this Is the parent style (usually 0/normal). For + style this should be NULL. + + + + + Get the alignment options bitmask. See corresponding bitGetter methods + that reference this one. + + + + + Get the horizontal alignment of the cell. + + + + + Get whether to wrap the text in the cell + + + + + Get the vertical alignment of text in the cell + + + + + Docs just say this Is for far east versions.. (I'm guessing it + justifies for right-to-left Read languages) + + + + + Get the degree of rotation. (I've not actually seen this used anywhere) + + + + + Get the indent options bitmask (see corresponding bit Getters that reference + this field) + + + + + Get indention (not sure of the Units, think its spaces) + + + + + Get whether to shrink the text to fit + + + + + Get whether to merge cells + + + + + Get the Reading order for far east versions (0 - Context, 1 - Left to right, + 2 - right to left) - We could use some help with support for the far east. + + + + + Get whether or not to use the format in this XF instead of the parent XF. + + + + + Get whether or not to use the font in this XF instead of the parent XF. + + + + + Get whether or not to use the alignment in this XF instead of the parent XF. + + + + + Get whether or not to use the border in this XF instead of the parent XF. + + + + + Get whether or not to use the pattern in this XF instead of the parent XF. + (foregrount/background) + + + + + Get whether or not to use the locking/hidden in this XF instead of the parent XF. + + + + + Get the border options bitmask (see the corresponding bit Getter methods + that reference back to this one) + + + + + Get the borderline style for the left border + + + + + Get the borderline style for the right border + + + + + Get the borderline style for the top border + + + + + Get the borderline style for the bottom border + + + + + Get the palette options bitmask (see the individual bit Getter methods that + reference this one) + + + + + Get the palette index for the left border color + + + + + Get the palette index for the right border color + + + + + Get the Additional palette options bitmask (see individual bit Getter methods + that reference this method) + + + + + Get the palette index for the top border + + + + + Get the palette index for the bottom border + + + + + Get for diagonal borders + + + + + Get the diagonal border line style + + + + + Not sure what this Is for (maybe Fill lines?) 1 = down, 2 = up, 3 = both, 0 for none.. + + + + + Get the Additional Fill pattern + + + + + Get the Fill palette options bitmask (see indivdual bit Getters that + reference this method) + + + + + Get the foreground palette color index + + + + + Get the background palette color index + + + + Will consider two different records with the same + contents as Equals, as the various indexes + that matter are embedded in the records + + + EXTERNALNAME

    + + @author Josh Micich + + + 'rgoper' / 'Last received results of the DDE link' + (seems to be only applicable to DDE links)
    + Logically this is a 2-D array, which has been flattened into 1-D array here. +
    + + (logical) number of columns in the {@link #_ddeValues} array + + + (logical) number of rows in the {@link #_ddeValues} array + + + Convenience Function to determine if the name Is a built-in name + + + For OLE and DDE, links can be either 'automatic' or 'manual' + + + only for OLE and DDE + + + DDE links only. If true, this denotes the 'StdDocumentName' + + + @return the standard String representation of this name + + + index to External Book Block (which starts with a EXTERNALBOOK record) + + + a Constructor for making new sub record + + + @param in the RecordInputstream to Read the record from + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + @param offset to begin writing at + @param data byte array containing instance data + @return number of bytes written + + + Title: Extern Sheet + Description: A List of Inndexes to SupBook + REFERENCE: + @author Libin Roman (Vista Portal LDT. Developer) + @version 1.0-pre + + + Constructs a Extern Sheet record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Add a zero-based reference to a {@link org.apache.poi.hssf.record.SupBookRecord}. +

    + If the type of the SupBook record is same-sheet referencing, Add-In referencing, + DDE data source referencing, or OLE data source referencing, + then no scope is specified and this value MUST be -2. Otherwise, + the scope must be set as follows: +

      +
    1. -2 Workbook-level reference that applies to the entire workbook.
    2. +
    3. -1 Sheet-level reference.
    4. +
    5. >=0 Sheet-level reference. This specifies the first sheet in the reference. +

      + If the SupBook type is unused or external workbook referencing, + then this value specifies the zero-based index of an external sheet name, + see {@link org.apache.poi.hssf.record.SupBookRecord#getSheetNames()}. + This referenced string specifies the name of the first sheet within the external workbook that is in scope. + This sheet MUST be a worksheet or macro sheet. +

      +

      + If the supporting link type is self-referencing, then this value specifies the zero-based index of a + {@link org.apache.poi.hssf.record.BoundSheetRecord} record in the workbook stream that specifies + the first sheet within the scope of this reference. This sheet MUST be a worksheet or a macro sheet. +

      +
    6. +

    + + @param firstSheetIndex the scope, must be -2 for add-in references + @param lastSheetIndex the scope, must be -2 for add-in references + @return index of newly added ref +
    + + returns the number of REF Records, which is in model + @return number of REF records + + + @return number of REF structures + + + Adds REF struct (ExternSheetSubRecord) + @param rec REF struct + + + Returns the index of the SupBookRecord for this index + + + @return -1 if not found + + + Returns the first sheet that the reference applies to, or + -1 if the referenced sheet can't be found, or -2 if the + reference is workbook scoped. + + + Returns the last sheet that the reference applies to, or + -1 if the referenced sheet can't be found, or -2 if the + reference is workbook scoped. + For a single sheet reference, the first and last should be + the same. + + + called by the class that Is responsible for writing this sucker. + Subclasses should implement this so that their data Is passed back in a + byte array. + + @param offset to begin writing at + @param data byte array containing instance data + @return number of bytes written + + + return the non static version of the id for this record. + + + Title: A sub Record for Extern Sheet + Description: Defines a named range within a workbook. + REFERENCE: + @author Libin Roman (Vista Portal LDT. Developer) + @version 1.0-pre + + + a Constractor for making new sub record + + + Constructs a Extern Sheet Sub Record record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Sets the Index to the sup book + @param index sup book index + + + Gets the index to sup book + @return sup book index + + + Sets the index to first sheet in supbook + @param index index to first sheet + + + Gets the index to first sheet from supbook + @return index to first supbook + + + Sets the index to last sheet in supbook + @param index index to last sheet + + + Gets the index to last sheet in supbook + @return index to last supbook + + + called by the class that Is responsible for writing this sucker. + Subclasses should implement this so that their data Is passed back in a + byte array. + + @param offset to begin writing at + @param data byte array containing instance data + @return number of bytes written + + + returns the record size + + + return the non static version of the id for this record. + + + Extended SST table info subrecord + Contains the elements of "info" in the SST's array field + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + @see org.apache.poi.hssf.record.ExtSSTRecord + + + Creates new ExtSSTInfoSubRecord + + + Title: Extended Static String Table + Description: This record Is used for a quick Lookup into the SST record. This + record breaks the SST table into a Set of buckets. The offsets + to these buckets within the SST record are kept as well as the + position relative to the start of the SST record. + REFERENCE: PG 313 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at apache dot org) + @version 2.0-pre + @see org.apache.poi.hssf.record.ExtSSTInfoSubRecord + + + Constructs a EOFRecord record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Returns the size of this record + + + Given a number of strings (in the sst), returns the size of the extsst record + + + + + + + Rc4KeyData + + + key (2 bytes): An unsigned integer that specifies the obfuscation key. + See [MS-OFFCRYPTO], 2.3.6.2 section, the first step of Initializing XOR + array where it describes the generation of 16-bit XorKey value. + + + verificationBytes (2 bytes): An unsigned integer that specifies + the password verification identifier. + + + + + + XorKeyData + + + + + + FilePassRecord + + + Title: FILESHARING + Description: stores the encrypted Readonly for a workbook (Write protect) + This functionality Is accessed from the options dialog box available when performing 'Save As'.

    + REFERENCE: PG 314 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)

    + @author Andrew C. Oliver (acoliver at apache dot org) + + + Constructs a FileSharing record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the Readonly + + @return short representing if this Is Read only (1 = true) + + + @returns password hashed with hashPassword() (very lame) + + + @returns username of the user that Created the file + + + Clone this record. + + + Title: Function Group Count Record + Description: Number of built in function Groups in the current version of the + SpReadsheet (probably only used on Windoze) + REFERENCE: PG 315 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + suggested default (14 dec) + + + Constructs a FnGroupCount record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the number of built-in functions + + @return number of built-in functions + + + Title: Font Record - descrbes a font in the workbook (index = 0-3,5-infinity - skip 4) + Description: An element in the Font Table + REFERENCE: PG 315 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a Font record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Clones all the font style information from another + FontRecord, onto this one. This + will then hold all the same font style options. + + + Set the font to be italics or not + + @param italics - whether the font Is italics or not + @see #SetAttributes(short) + + + Set the font to be stricken out or not + + @param strike - whether the font Is stricken out or not + @see #SetAttributes(short) + + + whether to use the mac outline font style thing (mac only) - Some mac person + should comment this instead of me doing it (since I have no idea) + + @param mac - whether to do that mac font outline thing or not + @see #SetAttributes(short) + + + whether to use the mac shado font style thing (mac only) - Some mac person + should comment this instead of me doing it (since I have no idea) + + @param mac - whether to do that mac font shadow thing or not + @see #SetAttributes(short) + + + Set the type of Underlining for the font + + + Set the font family (TODO) + + @param f family + + + Set the Char Set + + @param charSet - CharSet + + + Set the name of the font + + @param fn - name of the font (i.e. "Arial") + + + Gets the height of the font in 1/20th point Units + + @return fontheight (in points/20) + + + Get the font attributes (see individual bit Getters that reference this method) + + @return attribute - the bitmask + + + Get the font's color palette index + + @return cpi - font color index + + + Get the bold weight for this font (100-1000dec or 0x64-0x3e8). Default Is + 0x190 for normal and 0x2bc for bold + + @return bw - a number between 100-1000 for the fonts "boldness" + + + Get the type of base or subscript for the font + + @return base or subscript option + + + Does this FontRecord have all the same font + properties as the supplied FontRecord? + Note that {@link #equals(Object)} will check + for exact objects, while this will check + for exact contents, because normally the + font record's position makes a big + difference too. + + + Only returns two for the same exact object - + creating a second FontRecord with the same + properties won't be considered equal, as + the record's position in the record stream + matters. + + + Title: Footer Record + Description: Specifies the footer for a sheet + REFERENCE: PG 317 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Shawn Laubach (slaubach at apache dot org) Modified 3/14/02 + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + +

    + Initializes a new instance of the class. + + the RecordInputstream to Read the record from +
    + + + Returns a that represents the current . + + + A that represents the current . + + + + + + + return the non static version of the id for this record. + + + Title: Format Record + Description: describes a number format -- those goofy strings like $(#,###) + + REFERENCE: PG 317 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Shawn M. Laubach (slaubach at apache dot org) + @version 2.0-pre + + + Constructs a Format record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the format index code (for built in formats) + + @return the format index code + @see org.apache.poi.hssf.model.Workbook + + + Get the format string + + @return the format string + + + Manages the cached formula result values of other types besides numeric. + Excel encodes the same 8 bytes that would be field_4_value with various NaN + values that are decoded/encoded by this class. + + + deliberately chosen by Excel in order to encode other values within Double NaNs + + + @return null if the double value encoded by valueLongBits + is a normal (non NaN) double value. + + + Formula Record. + REFERENCE: PG 317/444 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Since the NaN support seems sketchy (different constants) we'll store and spit it out directly + + + Creates new FormulaRecord + + + Constructs a Formula record and Sets its fields appropriately. + Note - id must be 0x06 (NOT 0x406 see MSKB #Q184647 for an + "explanation of this bug in the documentation) or an exception + will be throw upon validation + + @param in the RecordInputstream to Read the record from + + + @return true if this {@link FormulaRecord} is followed by a + {@link StringRecord} representing the cached text result of the formula + evaluation. + + + Get the calculated value of the formula + + @return calculated value + + + Get the option flags + + @return bitmask + + + Get the stack as a list + + @return list of tokens (casts stack to a list and returns it!) + this method can return null Is we are Unable to Create Ptgs from + existing excel file + callers should Check for null! + + + Title: GridSet Record. + Description: flag denoting whether the user specified that gridlines are used when + printing. + REFERENCE: PG 320 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Jason Height (jheight at chariot dot net dot au) + + @version 2.0-pre + + + Constructs a GridSet record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether the gridlines are shown during printing. + + @return gridSet - true if gridlines are NOT printed, false if they are. + + + Title: Guts Record + Description: Row/column gutter sizes + REFERENCE: PG 320 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a Guts record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the size of the gutter that appears at the left of the rows + + @return gutter size in screen Units + + + Get the size of the gutter that appears at the above the columns + + @return gutter size in screen Units + + + Get the maximum outline level for the row gutter. + + @return maximum outline level + + + Get the maximum outline level for the col gutter. + + @return maximum outline level + + + Title: HCenter record + Description: whether to center between horizontal margins + REFERENCE: PG 320 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs an HCenter record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether or not to horizonatally center this sheet. + @return center - t/f + + + Common header/footer base class + + @author Josh Micich + + + get the length of the footer string + + @return length of the footer string + + + The HEADERFOOTER record stores information Added in Office Excel 2007 for headers/footers. + + @author Yegor Kozlov + + + construct a HeaderFooterRecord record. No fields are interpreted and the record will + be Serialized in its original form more or less + @param in the RecordInputstream to read the record from + + + spit the record out AS IS. no interpretation or identification + + + If this header belongs to a specific sheet view , the sheet view?s GUID will be saved here. + + If it is zero, it means the current sheet. Otherwise, this field MUST match the guid field + of the preceding {@link UserSViewBegin} record. + + @return the sheet view's GUID + + + @return whether this record belongs to the current sheet + + + Title: Header Record + Description: Specifies a header for a sheet + REFERENCE: PG 321 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Shawn Laubach (slaubach at apache dot org) Modified 3/14/02 + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs an Header record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Title: Hide Object Record + Description: flag defines whether to hide placeholders and object + REFERENCE: PG 321 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs an HideObj record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Set hide object options + + @param hide options + @see #HIDE_ALL + @see #SHOW_PLACEHOLDERS + @see #SHOW_ALL + + + Get hide object options + + @return hide options + @see #HIDE_ALL + @see #SHOW_PLACEHOLDERS + @see #SHOW_ALL + + + HorizontalPageBreak record that stores page breaks at rows + + This class Is just used so that SID Compares work properly in the RecordFactory + @see PageBreakRecord + @author Danny Mui (dmui at apache dot org) + + + + + + @param in the RecordInputstream to Read the record from + + + The HyperlinkRecord wraps an HLINK-record + from the Excel-97 format. + Supports only external links for now (eg http://) + + @author Mark Hissink Muller mark@hissinkmuller.nl + @author Yegor Kozlov (yegor at apache dot org) + + + Link flags + + + Tail of a URL link + + + Tail of a file link + + + cell range of this hyperlink + + + 16-byte GUID + + + Some sort of options for file links. + + + Link options. Can include any of HLINK_* flags. + + + Test label + + + Moniker. Makes sense only for URL and file links + + + in 8:3 DOS format No Unicode string header, + always 8-bit characters, zero-terminated + + + Link + + + Text describing a place in document. In Excel UI, this is appended to the + address, (after a '#' delimiter).
    + This field is optional. If present, the {@link #HLINK_PLACE} must be set. +
    + + Remaining bytes + + + Create a new hyperlink + + + Read hyperlink from input stream + + @param in the stream to Read from + + + Return the column of the first cell that Contains the hyperlink + + @return the 0-based column of the first cell that Contains the hyperlink + + + Set the column of the last cell that Contains the hyperlink + + @return the 0-based column of the last cell that Contains the hyperlink + + + Return the row of the first cell that Contains the hyperlink + + @return the 0-based row of the first cell that Contains the hyperlink + + + Return the row of the last cell that Contains the hyperlink + + @return the 0-based row of the last cell that Contains the hyperlink + + + Returns a 16-byte guid identifier. Seems to always equal {@link STD_MONIKER} + + @return 16-byte guid identifier + + + Returns a 16-byte moniker. + + @return 16-byte moniker + + + Return text label for this hyperlink + + @return text to Display + + + Hypelink Address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc. + + @return the Address of this hyperlink + + + Link options. Must be a combination of HLINK_* constants. + + + Label options + + + Options for a file link + + + Based on the link options, is this a url? + + + Based on the link options, is this a file? + + + Based on the link options, is this a document? + + + + Initialize a new url link + + + + + Initialize a new file link + + + + + Initialize a new document link + + + + Title: Index Record + Description: Occurs right after BOF, tells you where the DBCELL records are for a sheet + Important for locating cells + NOT USED IN THIS RELEASE + REFERENCE: PG 323 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs an Index record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Returns the size of an INdexRecord when it needs to index the specified number of blocks + + + + Title: Interface End Record + Description: Shows where the Interface Records end (MMS) + (has no fields) + REFERENCE: PG 324 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs an InterfaceEnd record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + + for test TestInterfaceEndRecord.TestCreate() + + + + + Title: Interface Header Record + Description: Defines the beginning of Interface records (MMS) + REFERENCE: PG 324 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + suggested (and probably correct) default + + + Constructs an Codepage record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Title: Iteration Record + Description: Tells whether to iterate over forumla calculations or not + (if a formula Is dependant upon another formula's result) + (odd feature for something that can only have 32 elements in + a formula!) + REFERENCE: PG 325 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs an Iteration record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether or not to iterate for calculations + + @return whether iterative calculations are turned off or on + + + Label Record - Read only support for strings stored directly in the cell.. Don't + use this (except to Read), use LabelSST instead + REFERENCE: PG 325 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + + @see org.apache.poi.hssf.record.LabelSSTRecord + + + Creates new LabelRecord + + + Constructs an Label record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Get the number of Chars this string Contains + @return number of Chars + + + Is this Uncompressed Unicode (16bit)? Or just 8-bit compressed? + @return IsUnicode - True for 16bit- false for 8bit + + + Get the value + + @return the text string + @see #GetStringLength + + + THROWS A RUNTIME EXCEPTION.. USE LABELSSTRecords. YOU HAVE NO REASON to use LABELRecord!! + + + Title: Label SST Record + Description: Refers to a string in the shared string table and Is a column + value. + REFERENCE: PG 325 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs an LabelSST record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the index to the string in the SSTRecord + + @return index of string in the SST Table + @see org.apache.poi.hssf.record.SSTRecord + + + Record for the left margin. + NOTE: This source was automatically generated. + @author Shawn Laubach (slaubach at apache dot org) + + + Constructs a LeftMargin record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Get the margin field for the LeftMargin record. + + + Not implemented yet. May commit it anyway just so people can see + where I'm heading. + + @author Glen Stampoultzis (glens at apache.org) + + + The margin interface Is a parent used to define left, right, top and bottom margins. + This allows much of the code to be generic when it comes to handling margins. + NOTE: This source wass automatically generated. + + @author Shawn Laubach (slaubach at apache dot org) + + + Get the margin field for the Margin. + + + Title: Merged Cells Record + + Description: Optional record defining a square area of cells to "merged" into + one cell. + REFERENCE: NONE (UNDOCUMENTED PRESENTLY) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + sometimes the regions array is shared with other MergedCellsRecords + + + Constructs a MergedCellsRecord and Sets its fields appropriately + @param in the RecordInputstream to Read the record from + + + Get the number of merged areas. If this drops down to 0 you should just go + ahead and delete the record. + @return number of areas + + + @return MergedRegion at the given index representing the area that is Merged (r1,c1 - r2,c2) + + + Title: MMS Record + Description: defines how many Add menu and del menu options are stored + in the file. Should always be Set to 0 for HSSF workbooks + REFERENCE: PG 328 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a MMS record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Set number of Add menu options (Set to 0) + @param am number of Add menu options + + + Set number of del menu options (Set to 0) + @param dm number of del menu options + + + Title: Mulitple Blank cell record + Description: Represents a Set of columns in a row with no value but with styling. + In this release we have Read-only support for this record type. + The RecordFactory Converts this to a Set of BlankRecord objects. + REFERENCE: PG 329 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @version 2.0-pre + @see org.apache.poi.hssf.record.BlankRecord + + + Creates new MulBlankRecord + + + Constructs a MulBlank record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Get the row number of the cells this represents + + @return row number + + + starting column (first cell this holds in the row) + @return first column number + + + ending column (last cell this holds in the row) + @return first column number + + + Get the number of columns this Contains (last-first +1) + @return number of columns (last - first +1) + + + returns the xf index for column (coffset = column - field_2_first_col) + @param coffset the column (coffset = column - field_2_first_col) + @return the XF index for the column + + + Used to store multiple RK numbers on a row. 1 MulRk = Multiple Cell values. + HSSF just Converts this into multiple NUMBER records. Read-ONLY SUPPORT! + REFERENCE: PG 330 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Creates new MulRKRecord + + + Constructs a MulRK record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + starting column (first cell this holds in the row) + @return first column number + + + ending column (last cell this holds in the row) + @return first column number + + + Get the number of columns this Contains (last-first +1) + @return number of columns (last - first +1) + + + returns the xf index for column (coffset = column - field_2_first_col) + @return the XF index for the column + + + returns the rk number for column (coffset = column - field_2_first_col) + @return the value (decoded into a double) + + + Title: NAMECMT Record (0x0894) + Description: Defines a comment associated with a specified name. + REFERENCE: + + @author Andrew Shirley (aks at corefiling.co.uk) + + + @param ris the RecordInputstream to read the record from + + + return the non static version of the id for this record. + + + @return the name of the NameRecord to which this comment applies. + + + @return the text of the comment. + + + Title: Name Record (aka Named Range) + Description: Defines a named range within a workbook. + REFERENCE: + @author Libin Roman (Vista Portal LDT. Developer) + @author Sergei Kozello (sergeikozello at mail.ru) + @author Glen Stampoultzis (glens at apache.org) + @version 1.0-pre + + + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + Included for completeness sake, not implemented + + + One-based extern index of sheet (resolved via LinkTable). Zero if this is a global name + + + the one based sheet number. + + + Creates new NameRecord + + + Constructs a Name record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Constructor to Create a built-in named region + @param builtin Built-in byte representation for the name record, use the public constants + @param index + + + @return function Group + @see FnGroupCountRecord + + + Gets the option flag + @return option flag + + + returns the keyboard shortcut + @return keyboard shortcut + + + ** + + + Indicates that the defined name refers to a user-defined function. + This attribute is used when there is an add-in or other code project associated with the file. + + @param function true indicates the name refers to a function. + + + @return true if name has a formula (named range or defined value) + + + @return true if name Is hidden + + + @return true if name Is a function + + + @return true if name Is a command + + + @return true if function macro or command macro + + + @return true if array formula or user defined + + + Convenience Function to determine if the name Is a built-in name + + + Gets the name + @return name + + + Gets the Built In Name + @return the built in Name + + + Gets the definition, reference (Formula) + @return definition -- can be null if we cant Parse ptgs + + + Get the custom menu text + @return custom menu text + + + Gets the description text + @return description text + + + Get the help topic text + @return gelp topic text + + + Gets the status bar text + @return status bar text + + + For named ranges, and built-in names + @return the 1-based sheet number. + + + called by the class that Is responsible for writing this sucker. + Subclasses should implement this so that their data Is passed back in a + @param offset to begin writing at + @param data byte array containing instance data + @return number of bytes written + + + Gets the extern sheet number + @return extern sheet index + + + return the non static version of the id for this record. + + + @see Object#ToString() + + + Creates a human Readable name for built in types + @return Unknown if the built-in name cannot be translated + + + NOTE: Comment Associated with a Cell (1Ch) + + @author Yegor Kozlov + + + Flag indicating that the comment Is hidden (default) + + + Flag indicating that the comment Is visible + + + Saves padding byte value to reduce delta during round-trip serialization.
    + + The documentation is not clear about how padding should work. In any case + Excel(2007) does something different. +
    + + Construct a new NoteRecord and + Fill its data with the default values + + + Constructs a NoteRecord and Fills its fields + from the supplied RecordInputStream. + + @param in the stream to Read from + + + @return id of this record. + + + Serialize the record data into the supplied array of bytes + + @param offset offset in the data + @param data the data to Serialize into + + @return size of the record + + + Size of record + + + Convert this record to string. + Used by BiffViewer and other utulities. + + + Return the row that Contains the comment + + @return the row that Contains the comment + + + Return the column that Contains the comment + + @return the column that Contains the comment + + + Options flags. + + @return the options flag + @see #NOTE_VISIBLE + @see #NOTE_HIDDEN + + + Object id for OBJ record that Contains the comment + + + Name of the original comment author + + @return the name of the original author of the comment + + + For unit testing only! + + + Contains a numeric cell value. + REFERENCE: PG 334 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Creates new NumberRecord + + + Constructs a Number record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Get the value for the cell + + @return double representing the value + + + Title: Object Protect Record + Description: Protect embedded object with the lamest "security" ever invented. + This record tells "I want to protect my objects" with lame security. It + appears in conjunction with the PASSWORD and PROTECT records as well as its + scenario protect cousin. + REFERENCE: PG 368 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + + + Constructs a Protect record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether the sheet Is protected or not + @return whether to protect the sheet or not + + + The obj record is used to hold various graphic objects and controls. + + @author Glen Stampoultzis (glens at apache.org) + + + used when POI has no idea what is going on + + + Excel seems to tolerate padding to quad or double byte length + + + Constructs a OBJ record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Some XLS files have ObjRecords with nearly 8Kb of excessive padding. These were probably + written by a version of POI (around 3.1) which incorrectly interpreted the second short of + the ftLbs subrecord (0x1FEE) as a length, and read that many bytes as padding (other bugs + helped allow this to occur). + + Excel reads files with this excessive padding OK, truncating the over-sized ObjRecord back + to the its proper size. POI does the same. + + + Size of record (excluding 4 byte header) + + + Record that Contains the functionality page _breaks (horizontal and vertical) + + The other two classes just specifically Set the SIDS for record creation. + + REFERENCE: Microsoft Excel SDK page 322 and 420 + + @see HorizontalPageBreakRecord + @see VerticalPageBreakRecord + @author Danny Mui (dmui at apache dot org) + + + Since both records store 2byte integers (short), no point in + differentiating it in the records. + + The subs (rows or columns, don't seem to be able to Set but excel Sets + them automatically) + + + Adds the page break at the specified parameters + @param main Depending on sid, will determine row or column to put page break (zero-based) + @param subFrom No user-interface to Set (defaults to minumum, 0) + @param subTo No user-interface to Set + + + Removes the break indicated by the parameter + @param main (zero-based) + + + Retrieves the region at the row/column indicated + @param main FIXME: Document this! + @return The Break or null if no break exists at the row/col specified. + + + PaletteRecord - Supports custom palettes. + @author Andrew C. Oliver (acoliver at apache dot org) + @author Brian Sanders (bsanders at risklabs dot com) - custom palette editing + @version 2.0-pre + + + The standard size of an XLS palette + + + The byte index of the first color + + + Constructs a PaletteRecord record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + + Dangerous! Only call this if you intend to replace the colors! + + + + Returns the color value at a given index + + @return the RGB triplet for the color, or null if the specified index + does not exist + + + Sets the color value at a given index + + If the given index Is greater than the current last color index, + then black Is Inserted at every index required to make the palette continuous. + + @param byteIndex the index to Set; if this index Is less than 0x8 or greater than + 0x40, then no modification Is made + + + Creates the default palette as PaletteRecord binary data + + @see org.apache.poi.hssf.model.Workbook#createPalette + + + PColor - element in the list of colors - consider it a "struct" + + + * Describes the frozen and Unfozen panes. + * NOTE: This source Is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Pane record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Get the x field for the Pane record. + + + Get the y field for the Pane record. + + + Get the top row field for the Pane record. + + + Get the left column field for the Pane record. + + + Get the active pane field for the Pane record. + + @return One of + ACTIVE_PANE_LOWER_RIGHT + ACTIVE_PANE_UPPER_RIGHT + ACTIVE_PANE_LOWER_LEFT + ACTIVE_PANE_UPPER_LEFT + + + Title: Password Record + Description: stores the encrypted password for a sheet or workbook (HSSF doesn't support encryption) + REFERENCE: PG 371 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a Password record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the password + + @return short representing the password + + + Clone this record. + + + Title: Protection Revision 4 password Record + Description: Stores the (2 byte??!!) encrypted password for a shared + workbook + REFERENCE: PG 374 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a PasswordRev4 (PROT4REVPASS) record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + set the password + + @param pw representing the password + + + SXDI - Data Item (0x00C5)
    + + @author Patrick Cheng +
    + + SXVDEX - Extended PivotTable View Fields (0x0100)
    + + @author Patrick Cheng +
    + + the value of the cchSubName field when the subName is not present + + + SXPI - Page Item (0x00B6)
    + + @author Patrick Cheng +
    + + Index to the View Item SXVI(0x00B2) record + + + Index to the {@link ViewFieldsRecord} SXVD(0x00B1) record + + + Object ID for the drop-down arrow + + + SXIDSTM - Stream ID (0x00D5)
    + + @author Patrick Cheng +
    + + SXVIEW - View Definition (0x00B0)
    + + @author Patrick Cheng +
    + + SXVD - View Fields (0x00B1)
    + + @author Patrick Cheng +
    + + values for the {@link ViewFieldsRecord#sxaxis} field + + + the value of the cchName field when the name is not present + + + 5 shorts + + + SXVS - View Source (0x00E3)
    + + @author Patrick Cheng +
    + + Title: Precision Record + Description: defines whether to store with full precision or what's Displayed by the gui + (meaning have really screwed up and skewed figures or only think you do!) + REFERENCE: PG 372 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a Precision record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether to use full precision or just skew all you figures all to hell. + + @return fullprecision - or not + + + Title: Print Gridlines Record + Description: whether to print the gridlines when you enjoy you spReadsheet on paper. + REFERENCE: PG 373 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a PrintGridlines record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether or not to print the gridlines (and make your spReadsheet ugly) + + @return make spReadsheet ugly - Y/N + + + Title: Print Headers Record + Description: Whether or not to print the row/column headers when you + enjoy your spReadsheet in the physical form. + REFERENCE: PG 373 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a PrintHeaders record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + + Get whether to print the headers - y/n + + true if [print headers]; otherwise, false. + + + Title: Print Setup Record + Description: Stores print Setup options -- bogus for HSSF (and marked as such) + REFERENCE: PG 385 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a PrintSetup (SetUP) record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Title: Protection Revision 4 Record + Description: describes whether this is a protected shared/tracked workbook + ( HSSF does not support encryption because we don't feel like going to jail ) + REFERENCE: PG 373 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a ProtectionRev4 record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether the this is protected shared/tracked workbook or not + @return whether to protect the workbook or not + + + Title: Protect Record + Description: defines whether a sheet or workbook is protected (HSSF DOES NOT SUPPORT ENCRYPTION) + (kindly ask the US government to stop having arcane stupid encryption laws and we'll support it) + (after all terrorists will all use US-legal encrypton right??) + HSSF now supports the simple "protected" sheets (where they are not encrypted and open office et al + ignore the password record entirely). + REFERENCE: PG 373 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + + + Constructs a Protect record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether the sheet is protected or not + @return whether to protect the sheet or not + + + Title: Recalc Id Record + Description: This record Contains an ID that marks when a worksheet was last + recalculated. It's an optimization Excel uses to determine if it + needs to recalculate the spReadsheet when it's opened. So far, only + the two values 0xC1 0x01 0x00 0x00 0x80 0x38 0x01 0x00 + (do not recalculate) and 0xC1 0x01 0x00 0x00 0x60 0x69 0x01 + 0x00 have been seen. If the field isNeeded Is + Set to false (default), then this record Is swallowed during the + serialization Process + REFERENCE: http://chicago.sourceforge.net/devel/docs/excel/biff8.html + @author Luc Girardin (luc dot girardin at macrofocus dot com) + @version 2.0-pre + @see org.apache.poi.hssf.model.Workbook + + + An unsigned integer that specifies the recalculation engine identifier + of the recalculation engine that performed the last recalculation. + If the value is less than the recalculation engine identifier associated with the application, + the application will recalculate the results of all formulas on + this workbook immediately after loading the file + + + Constructs a RECALCID record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Title: Record + Description: All HSSF Records inherit from this class. It + populates the fields common to all records (id, size and data). + Subclasses should be sure to validate the id, + Company: + @author Andrew C. Oliver + @author Marc Johnson (mjohnson at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + instantiates a blank record strictly for ID matching + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + @return byte array containing instance data + + + return the non static version of the id for this record. + + + Common base class of {@link Record} and {@link RecordAggregate} + + @author Josh Micich + + + called by the class that is responsible for writing this sucker. + Subclasses should implement this so that their data is passed back in a + byte array. + + @param offset to begin writing at + @param data byte array containing instance data + @return number of bytes written + + + gives the current serialized size of the record. Should include the sid + and reclength (4 bytes). + + + Title: Record Factory + Description: Takes a stream and outputs an array of Record objects. + + @deprecated use {@link org.apache.poi.hssf.eventmodel.EventRecordFactory} instead + @see org.apache.poi.hssf.eventmodel.EventRecordFactory + @author Andrew C. Oliver (acoliver at apache dot org) + @author Marc Johnson (mjohnson at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Csaba Nagy (ncsaba at yahoo dot com) + + + A "create" method is used instead of the usual constructor if the created record might + be of a different class to the declaring class. + + + cache of the recordsToMap(); + + + Debug / diagnosis method
    + Gets the POI implementation class for a given sid. Only a subset of the any BIFF + records are actually interpreted by POI. A few others are known but not interpreted + (see {@link UnknownRecord#getBiffName(int)}). + @return the POI implementation class for the specified record sid. + null if the specified record is not interpreted by POI. +
    + + Changes the default capacity (10000) to handle larger files + + + Create an array of records from an input stream + + @param in the InputStream from which the records will be + obtained + + @return an array of Records Created from the InputStream + + @exception RecordFormatException on error Processing the + InputStream + + + Converts a {@link MulBlankRecord} into an equivalent array of {@link BlankRecord}s + + + + RK record is a slightly smaller alternative to NumberRecord + POI likes NumberRecord better + + The rk. + + + + + Converts a MulRKRecord into an equivalent array of NumberRecords + + The MRK. + + + + A stream based way to get at complete records, with + as low a memory footprint as possible. + This handles Reading from a RecordInputStream, turning + the data into full records, processing continue records + etc. + Most users should use {@link HSSFEventFactory} / + {@link HSSFListener} and have new records pushed to + them, but this does allow for a "pull" style of coding. + + + Keeps track of the sizes of the Initial records up to and including {@link FilePassRecord} + Needed for protected files because each byte is encrypted with respect to its absolute + position from the start of the stream. + + + @return last record scanned while looking for encryption info. + This will typically be the first or second record Read. Possibly null + if stream was empty + + + false in some test cases + + + Temporarily stores a group of {@link Record}s, for future return by {@link #nextRecord()}. + This is used at the start of the workbook stream, and also when the most recently read + underlying record is a {@link MulRKRecord} + + + used to help iterating over the unread records + + + The most recent record that we gave to the user + + + The most recent DrawingRecord seen + + + @param shouldIncludeContinueRecords caller can pass false if loose + {@link ContinueRecord}s should be skipped (this is sometimes useful in event based + processing). + + + Returns the next (complete) record from the + stream, or null if there are no more. + + + @return the next {@link Record} from the multiple record group as expanded from + a recently read {@link MulRKRecord}. null if not present. + + + @return the next available record, or null if + this pass didn't return a record that's + suitable for returning (eg was a continue record). + + + Title: Record Input Stream + Description: Wraps a stream and provides helper methods for the construction of records. + + @author Jason Height (jheight @ apache dot org) + + + Maximum size of a single record (minus the 4 byte header) without a continue + + + Header {@link LittleEndianInput} facet of the wrapped {@link InputStream} + + + Data {@link LittleEndianInput} facet of the wrapped {@link InputStream} + + + the record identifier of the BIFF record currently being read + + + This method will Read a byte from the current record + + + + @return the sid of the next record or {@link #INVALID_SID_VALUE} if at end of stream + + + Moves to the next record in the stream. + + Note: The auto continue flag is Reset to true + + + Reads an 8 bit, signed value + + + Reads a 16 bit, signed value + + + Reads an 8 bit, Unsigned value + + + Reads a 16 bit,un- signed value. + @return + + + given a byte array of 16-bit Unicode Chars, compress to 8-bit and + return a string + + { 0x16, 0x00 } -0x16 + + @param Length the Length of the string + @return the Converted string + @exception ArgumentException if len is too large (i.e., + there is not enough data in string to Create a String of that + Length) + + + Returns the remaining bytes for the current record. + + @return The remaining bytes of the current record. + + + Reads all byte data for the current record, including any + that overlaps into any following continue records. + + @deprecated Best to write a input stream that wraps this one where there Is + special sub record that may overlap continue records. + + + The remaining number of bytes in the current record. + + @return The number of bytes remaining in the current record + + + Returns true iif a Continue record is next in the excel stream _currentDataOffset + + @return True when a ContinueRecord is next. + + + @return sid of next record. Can be called after hasNextRecord() + + + Title: RefMode Record + Description: Describes which reference mode to use + REFERENCE: PG 376 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a RefMode record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the reference mode to use (HSSF uses/assumes A1) + @return mode to use + @see #USE_A1_MODE + @see #USE_R1C1_MODE + + + Title: Refresh All Record + Description: Flag whether to refresh all external data when loading a sheet. + (which hssf doesn't support anyhow so who really cares?) + REFERENCE: PG 376 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a RefreshAll record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether to refresh all external data when loading a sheet + @return refreshall or not + + + Record for the right margin. * NOTE: This source was automatically generated. * @author Shawn Laubach (slaubach at apache dot org) + + + Constructs a RightMargin record and Sets its fields appropriately. * * @param id id must be 0x27 or an exception * will be throw upon validation * @param size size the size of the data area of the record * @param data data of the record (should not contain sid/len) + + + Get the margin field for the RightMargin record. + + + Title: RK Record + Description: An internal 32 bit number with the two most significant bits + storing the type. This is part of a bizarre scheme to save disk + space and memory (gee look at all the other whole records that + are in the file just "cause"..,far better to waste Processor + cycles on this then leave on of those "valuable" records out). + We support this in Read-ONLY mode. HSSF Converts these to NUMBER records + + + + REFERENCE: PG 376 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + @see org.apache.poi.hssf.record.NumberRecord + + + Constructs a RK record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the type of the number + + @return one of these values: +
      +
    1. RK_IEEE_NUMBER
    2. +
    3. RK_IEEE_NUMBER_TIMES_100
    4. +
    5. RK_INTEGER
    6. +
    7. RK_INTEGER_TIMES_100
    8. +
    +
    + + Extract the value of the number + + The mechanism for determining the value is dependent on the two + low order bits of the raw number. If bit 1 is Set, the number + is an integer and can be cast directly as a double, otherwise, + it's apparently the exponent and mantissa of a double (and the + remaining low-order bits of the double's mantissa are 0's). + + If bit 0 is Set, the result of the conversion to a double Is + divided by 100; otherwise, the value is left alone. + + [Insert picture of Screwy Squirrel in full Napoleonic regalia] + + @return the value as a proper double (hey, it could + happen) + + + Title: Row Record + Description: stores the row information for the sheet. + REFERENCE: PG 379 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + The maximum row number that excel can handle (zero based) ie 65536 rows Is + max number of rows. + + + 16 bit options flags + + + Constructs a Row record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the logical row number for this row (0 based index) + @return row - the row number + + + Get the logical col number for the first cell this row (0 based index) + @return col - the col number + + + Get the logical col number for the last cell this row plus one (0 based index) + @return col - the last col number + 1 + + + Get the height of the row + @return height of the row + + + Get whether to optimize or not (Set to 0) + @return optimize (Set to 0) + + + Gets the option bitmask. (use the individual bit Setters that refer to this + method) + @return options - the bitmask + + + Get the outline level of this row + @return ol - the outline level + @see #GetOptionFlags() + + + Get whether or not to colapse this row + @return c - colapse or not + @see #GetOptionFlags() + + + Get whether or not to Display this row with 0 height + @return - z height is zero or not. + @see #GetOptionFlags() + + + Get whether the font and row height are not compatible + @return - f -true if they aren't compatible (damn not logic) + @see #GetOptionFlags() + + + Get whether the row has been formatted (even if its got all blank cells) + @return formatted or not + @see #GetOptionFlags() + + + if the row is formatted then this is the index to the extended format record + @see org.apache.poi.hssf.record.ExtendedFormatRecord + @return index to the XF record or bogus value (undefined) if Isn't formatted + + + bit that specifies whether any cell in the row has a thick top border, or any + cell in the row directly above the current row has a thick bottom border. + @param f has thick top border + + + A bit that specifies whether any cell in the row has a medium or thick + bottom border, or any cell in the row directly below the current row has + a medium or thick top border. + @param f has thick bottom border + + + A bit that specifies whether the phonetic guide feature is enabled for + any cell in this row. + @param f use phoenetic guide + + + Title: Save Recalc Record + Description: defines whether to recalculate before saving (Set to true) + REFERENCE: PG 381 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs an SaveRecalc record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether to recalculate formulas/etc before saving or not + @return recalc - whether to recalculate or not + + + Title: Scenario Protect Record + Description: I have no idea what a Scenario is or why on would want to + protect it with the lamest "security" ever invented. However this record tells + excel "I want to protect my scenarios" (0xAF) with lame security. It appears + in conjunction with the PASSWORD and PROTECT records as well as its object + protect cousin. + REFERENCE: PG 383 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + + + Constructs a Protect record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether the sheet is protected or not + @return whether to protect the sheet or not + + + * Specifies the window's zoom magnification. If this record Isn't present then the windows zoom is 100%. see p384 Excel Dev Kit + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Andrew C. Oliver (acoliver at apache.org) + + + Constructs a SCL record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the numerator field for the SCL record. + + + Get the denominator field for the SCL record. + + + Title: Selection Record + Description: shows the user's selection on the sheet + for Write Set num refs to 0 + + TODO : Fully implement reference subrecords. + REFERENCE: PG 291 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @author Glen Stampoultzis (glens at apache.org) + + + + Constructs a Selection record and Sets its fields appropriately. + + the RecordInputstream to Read the record from + + + + Gets or sets the pane this is for. + + The pane. + + + + Gets or sets the active cell row. + + row number of active cell + + + + Gets or sets the active cell's col + + number of active cell + + + + Gets or sets the active cell's reference number + + ref number of active cell + + + Title: SharedFormulaRecord + Description: Primarily used as an excel optimization so that multiple similar formulas + are not written out too many times. We should recognize this record and + Serialize as Is since this Is used when Reading templates. + + Note: the documentation says that the SID Is BC where biffviewer reports 4BC. The hex dump shows + that the two byte sid representation to be 'BC 04' that Is consistent with the other high byte + record types. + @author Danny Mui at apache dot org + + + @param in the RecordInputstream to Read the record from + + + print a sort of string representation ([SHARED FORMULA RECORD] id = x [/SHARED FORMULA RECORD]) + + + @return the equivalent {@link Ptg} array that the formula would have, were it not shared. + + + Common base class for {@link SharedFormulaRecord}, {@link ArrayRecord} and + {@link TableRecord} which are have similarities. + + @author Josh Micich + + + reads only the range (1 {@link CellRangeAddress8Bit}) from the stream + + + @return true if (rowIx, colIx) is within the range ({@link #Range}) + of this shared value object. + + + @return true if (rowIx, colIx) describes the first cell in this shared value + object's range ({@link #Range}) + + + Handles the task of deserializing a SST string. The two main entry points are + + @author Glen Stampoultzis (glens at apache.org) + @author Jason Height (jheight at apache.org) + + + This Is the starting point where strings are constructed. Note that + strings may span across multiple continuations. Read the SST record + carefully before beginning to hack. + + + Title: Static String Table Record + + Description: This holds all the strings for LabelSSTRecords. + + REFERENCE: PG 389 Microsoft Excel 97 Developer's Kit (ISBN: + 1-57231-498-2) + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Marc Johnson (mjohnson at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + + @see org.apache.poi.hssf.record.LabelSSTRecord + @see org.apache.poi.hssf.record.ContinueRecord + + + how big can an SST record be? As big as any record can be: 8228 bytes + + + standard record overhead: two shorts (record id plus data space size) + + + SST overhead: the standard record overhead, plus the number of strings and the number of Unique strings -- two ints + + + how much data can we stuff into an SST record? That would be _max minus the standard SST record overhead + + + Union of strings in the SST and EXTSST + + + according to docs ONLY SST + + + Offsets from the beginning of the SST record (even across continuations) + + + Offsets relative the start of the current SST or continue record + + + default constructor + + + Constructs an SST record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Add a string. + + @param string string to be Added + + @return the index of that string in the table + + + @return number of strings + + + @return number of Unique strings + + + Get a particular string by its index + + @param id index into the array of strings + + @return the desired string + + + Return a debugging string representation + + @return string representation + + + @return sid + + + @return hashcode + + + @return an iterator of the strings we hold. All instances are + UnicodeStrings + + + @return count of the strings we hold. + + + called by the class that Is responsible for writing this sucker. + Subclasses should implement this so that their data Is passed back in a + byte array. + + @return size + + + Creates an extended string record based on the current contents of + the current SST record. The offset within the stream to the SST record + Is required because the extended string record points directly to the + strings in the SST record. + + NOTE: THIS FUNCTION MUST ONLY BE CALLED AFTER THE SST RECORD HAS BEEN + SERIALIZED. + + @param sstOffset The offset in the stream to the start of the + SST record. + @return The new SST record. + + + Calculates the size in bytes of the EXTSST record as it would be if the + record was Serialized. + + @return The size of the ExtSST record in bytes. + + + This class handles serialization of SST records. It utilizes the record processor + class write individual records. This has been refactored from the SSTRecord class. + + @author Glen Stampoultzis (glens at apache.org) + + + OffSets from the beginning of the SST record (even across continuations) + + + OffSets relative the start of the current SST or continue record + + + Subclasses of this class (the majority of BIFF records) are non-continuable. This allows for + some simplification of serialization logic + + @author Josh Micich + + + + Write the data content of this BIFF record including the sid and record length. + The subclass must write the exact number of bytes as reported by Record#getRecordSize() + + offset + data + + + + Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields + have already been written by the superclass.
    + + The number of bytes written must equal the record size reported by + {@link Record#getDataSize()} minus four + ( record header consiting of a 'ushort sid' and 'ushort reclength' has already been written + by thye superclass). +
    + + Supports the STRING record structure. + + @author Glen Stampoultzis (glens at apache.org) + + + Constructs a String record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + called by the class that Is responsible for writing this sucker. + Subclasses should implement this so that their data Is passed back in a + byte array. + + @param offset to begin writing at + @param data byte array containing instance data + @return number of bytes written + + + return the non static version of the id for this record. + + + @return The string represented by this record. + + + Title: Style Record + Description: Describes a builtin to the gui or user defined style + REFERENCE: PG 390 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author aviks : string fixes for UserDefined Style + @version 2.0-pre + + + Constructs a Style record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + if this is a builtin style set the number of the built in style + @param builtinStyleId style number (0-7) + + + + Get the actual index of the style extended format record + @see #Index + @return index of the xf record + + + Get the style's name + @return name of the style + @see #NameLength + + + Get the row or column level of the style (if builtin 1||2) + + + * The common object data record is used to store all common preferences for an excel object. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a CommonObjectData record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + Get the object type field for the CommonObjectData record. + + + Get the object id field for the CommonObjectData record. + + + Get the option field for the CommonObjectData record. + + + Get the reserved1 field for the CommonObjectData record. + + + Get the reserved2 field for the CommonObjectData record. + + + Get the reserved3 field for the CommonObjectData record. + + + true if object is locked when sheet has been protected + @return the locked field value. + + + object appears when printed + @return the printable field value. + + + whether object uses an automatic Fill style + @return the autoFill field value. + + + whether object uses an automatic line style + @return the autoline field value. + + + A sub-record within the OBJ record which stores a reference to an object + stored in a Separate entry within the OLE2 compound file. + + @author Daniel Noll + + + either an area or a cell ref + + + Formulas often have a single non-zero trailing byte. + This is in a similar position to he pre-streamId padding + It is unknown if the value is important (it seems to mirror a value a few bytes earlier) + + + + Constructs an EmbeddedObjectRef record and Sets its fields appropriately. + + @param in the record input stream. + + + Gets the stream ID containing the actual data. The data itself + can be found under a top-level directory entry in the OLE2 filesystem + under the name "MBDxxxxxxxx" where xxxxxxxx is + this ID converted into hex (in big endian order, funnily enough.) + + @return the data stream ID. Possibly null + + + * The end data record is used to denote the end of the subrecords. + * NOTE: This source is automatically generated please do not modify this file. Either subclass or + * Remove the record in src/records/definitions. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a End record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + * The Group marker record is used as a position holder for Groups. + + * @author Glen Stampoultzis (glens at apache.org) + + + Constructs a Group marker record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Size of record (exluding 4 byte header) + + + From [MS-XLS].pdf 2.5.147 FtLbsData: + + An unsigned integer that indirectly specifies whether + some of the data in this structure appear in a subsequent Continue record. + If _cbFContinued is 0x00, all of the fields in this structure except sid and _cbFContinued + MUST NOT exist. If this entire structure is Contained within the same record, + then _cbFContinued MUST be greater than or equal to the size, in bytes, + of this structure, not including the four bytes for the ft and _cbFContinued fields + + + a formula that specifies the range of cell values that are the items in this list. + + + An unsigned integer that specifies the number of items in the list. + + + An unsigned integer that specifies the one-based index of the first selected item in this list. + A value of 0x00 specifies there is no currently selected item. + + + flags that tell what data follows + + + An ObjId that specifies the edit box associated with this list. + A value of 0x00 specifies that there is no edit box associated with this list. + + + An optional LbsDropData that specifies properties for this dropdown control. + This field MUST exist if and only if the Containing Obj?s cmo.ot is equal to 0x14. + + + An optional array of strings where each string specifies an item in the list. + The number of elements in this array, if it exists, MUST be {@link #_cLines} + + + An optional array of bools that specifies + which items in the list are part of a multiple selection + + + @param in the stream to read data from + @param cbFContinued the seconf short in the record header + @param cmoOt the Containing Obj's {@link CommonObjectDataSubRecord#field_1_objectType} + + + + @return the formula that specifies the range of cell values that are the items in this list. + + + @return the number of items in the list + + + + @return a new instance of LbsDataSubRecord to construct auto-filters + @see org.apache.poi.hssf.model.ComboboxShape#createObjRecord(org.apache.poi.hssf.usermodel.HSSFSimpleShape, int) + + + This structure specifies properties of the dropdown list control + + + Combo dropdown control + + + Combo Edit dropdown control + + + Simple dropdown control (just the dropdown button) + + + An unsigned integer that specifies the style of this dropdown. + + + An unsigned integer that specifies the number of lines to be displayed in the dropdown. + + + An unsigned integer that specifies the smallest width in pixels allowed for the dropdown window + + + a string that specifies the current string value in the dropdown + + + Optional, undefined and MUST be ignored. + This field MUST exist if and only if the size of str in bytes is an odd number + + + Represents a NoteStructure (0xD) sub record. + + + The docs say nothing about it. The Length of this record is always 26 bytes. + + + @author Yegor Kozlov + + + Construct a new NoteStructureSubRecord and + Fill its data with the default values + + + Constructs a NoteStructureSubRecord and Sets its fields appropriately. + + + + Convert this record to string. + Used by BiffViewer and other utulities. + + + Serialize the record data into the supplied array of bytes + + @param offset offset in the data + @param data the data to Serialize into + + @return size of the record + + + Size of record + + + @return id of this record. + + + + FtSbs structure + + + + Subrecords are part of the OBJ class. + + + Wether this record terminates the sub-record stream. + There are two cases when this method must be overridden and return true + - EndSubRecord (sid = 0x00) + - LbsDataSubRecord (sid = 0x12) + + @return whether this record is the last in the sub-record stream + + + Title: Sup Book (EXTERNALBOOK) + Description: A External Workbook Description (Suplemental Book) + Its only a dummy record for making new ExternSheet Record + REFERENCE: 5.38 + @author Libin Roman (Vista Portal LDT. Developer) + @author Andrew C. Oliver (acoliver@apache.org) + + + + Constructs a Extern Sheet record and Sets its fields appropriately. + + @param id id must be 0x16 or an exception will be throw upon validation + @param size the size of the data area of the record + @param data data of the record (should not contain sid/len) + + + Title: Sheet Tab Index Array Record + Description: Contains an array of sheet id's. Sheets always keep their ID + regardless of what their name Is. + REFERENCE: PG 412 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a TabID record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Set the tab array. (0,1,2). + @param array of tab id's {0,1,2} + + + Get the tab array. (0,1,2). + @return array of tab id's {0,1,2} + + + DATATABLE (0x0236)

    + + TableRecord - The record specifies a data table. + This record Is preceded by a single Formula record that + defines the first cell in the data table, which should + only contain a single Ptg, {@link TblPtg}. + + See p536 of the June 08 binary docs + + + TABLESTYLES (0x088E)
    + + @author Patrick Cheng +
    + + expect tRef, tRef3D, tArea, tArea3D or tName + + + Not clear if needed . Excel seems to be OK if this byte is not present. + Value is often the same as the earlier firstColumn byte. + + + Get the text orientation field for the TextObjectBase record. + + @return a TextOrientation + + + @return the Horizontal text alignment field value. + + + @return the Vertical text alignment field value. + + + Text has been locked + @return the text locked field value. + + + Record for the top margin. + NOTE: This source was automatically generated. + + @author Shawn Laubach (slaubach at apache dot org) + + + Constructs a TopMargin record and Sets its fields appropriately. + + @param in the RecordInputstream to Read the record from + + + Get the margin field for the TopMargin record. + + + Title: Uncalced Record + + If this record occurs in the Worksheet Substream, it indicates that the formulas have not + been recalculated before the document was saved. + + @author Olivier Leprince + + + Default constructor + + + Read constructor + + + Title: Unknown Record (for debugging) + Description: Unknown record just tells you the sid so you can figure out + what records you are missing. Also helps us Read/modify sheets we + don't know all the records to. (HSSF leaves these alone!) + Company: SuperLink Software, Inc. + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @author Glen Stampoultzis (glens at apache.org) + + + @param id id of the record -not Validated, just stored for serialization + @param data the data + + + construct an Unknown record. No fields are interperated and the record will + be Serialized in its original form more or less + @param in the RecordInputstream to Read the record from + + + spit the record out AS IS. no interpretation or identification + + + print a sort of string representation ([UNKNOWN RECORD] id = x [/UNKNOWN RECORD]) + + + These BIFF record types are known but still uninterpreted by POI + + @return the documented name of this BIFF record type, null if unknown to POI + + + @return true if the unknown record id has been observed in POI unit tests + + + Unlike the other Record.Clone methods this Is a shallow Clone + + + The UserSViewBegin record specifies Settings for a custom view associated with the sheet. + This record also marks the start of custom view records, which save custom view Settings. + Records between {@link UserSViewBegin} and {@link UserSViewEnd} contain Settings for the custom view, + not Settings for the sheet itself. + + @author Yegor Kozlov + + + construct an UserSViewBegin record. No fields are interpreted and the record will + be Serialized in its original form more or less + @param in the RecordInputstream to read the record from + + + spit the record out AS IS. no interpretation or identification + + + @return Globally unique identifier for the custom view + + + The UserSViewEnd record marks the end of the Settings for a custom view associated with the sheet + + @author Yegor Kozlov + + + construct an UserSViewEnd record. No fields are interpreted and the record will + be Serialized in its original form more or less + @param in the RecordInputstream to read the record from + + + spit the record out AS IS. no interpretation or identification + + + Title: Use Natural Language Formulas Flag + Description: Tells the GUI if this was written by something that can use + "natural language" formulas. HSSF can't. + REFERENCE: PG 420 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a UseSelFS record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Title: VCenter record + Description: tells whether to center the sheet between vertical margins + REFERENCE: PG 420 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a VCENTER record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get whether to center vertically or not + @return vcenter or not + + + VerticalPageBreak record that stores page breaks at columns + + This class Is just used so that SID Compares work properly in the RecordFactory + @see PageBreakRecord + @author Danny Mui (dmui at apache dot org) + + + + + + @param in the RecordInputstream to Read the record from + + + Title: Window1 Record + Description: Stores the attributes of the workbook window. This Is basically + so the gui knows how big to make the window holding the spReadsheet + document. + REFERENCE: PG 421 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a WindowOne record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the horizontal position of the window (in 1/20ths of a point) + @return h - horizontal location + + + Get the vertical position of the window (in 1/20ths of a point) + @return v - vertical location + + + Get the width of the window + @return width + + + Get the height of the window + @return height + + + Get the options bitmask (see bit Setters) + + @return o - the bitmask + + + Get whether the window Is hidden or not + @return Ishidden or not + + + Get whether the window has been iconized or not + @return iconize or not + + + Get whether to Display the horizontal scrollbar or not + @return Display or not + + + Get whether to Display the vertical scrollbar or not + @return Display or not + + + Get whether to Display the tabs or not + @return Display or not + + + @return the index of the currently Displayed sheet + + + @return the first visible sheet in the worksheet tab-bar. + I.E. the scroll position of the tab-bar. + + + Get the number of selected tabs + @return number of tabs + + + ratio of the width of the tabs to the horizontal scrollbar + @return ratio + + + Title: Window Protect Record + Description: flags whether workbook windows are protected + REFERENCE: PG 424 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + Constructs a WindowProtect record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Is this window protected or not + + @return protected or not + + + Title: Window Two Record + Description: sheet window Settings + REFERENCE: PG 422 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a WindowTwo record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the options bitmask or just use the bit Setters. + @return options + + + Get whether the window should Display formulas + @return formulas or not + + + Get whether the window should Display gridlines + @return gridlines or not + + + Get whether the window should Display row and column headings + @return headings or not + + + Get whether the window should freeze panes + @return freeze panes or not + + + Get whether the window should Display zero values + @return zeros or not + + + Get whether the window should Display a default header + @return header or not + + + Is this arabic? + @return arabic or not + + + Get whether the outline symbols are displaed + @return symbols or not + + + freeze Unsplit panes or not + @return freeze or not + + + sheet tab Is selected + @return selected or not + + + Is the sheet currently Displayed in the window + @return Displayed or not + + + was the sheet saved in page break view + @return pagebreaksaved or not + + + Get the top row visible in the window + @return toprow + + + Get the leftmost column Displayed in the window + @return leftmost + + + Get the palette index for the header color + @return color + + + zoom magification in page break view + @return zoom + + + Get the zoom magnification in normal view + @return zoom + + + Get the reserved bits - why would you do this? + @return reserved stuff -probably garbage + + + Title: Write Access Record + Description: Stores the username of that who owns the spReadsheet generator + (on Unix the user's login, on Windoze its the name you typed when + you installed the thing) + REFERENCE: PG 424 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @version 2.0-pre + + + this record is always padded to a constant length + + + Constructs a WriteAccess record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get the username for the user that Created the report. HSSF uses the logged in user. On + natively Created M$ Excel sheet this would be the name you typed in when you installed it + in most cases. + @return username of the user who Is logged in (probably "tomcat" or "apache") + + + Title: Write Protect Record + Description: Indicated that the sheet/workbook Is Write protected. + REFERENCE: PG 425 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @version 3.0-pre + + + Constructs a WriteAccess record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Title: WSBool Record. + Description: stores workbook Settings (aka its a big "everything we didn't + put somewhere else") + REFERENCE: PG 425 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (gstamp@iprimus.com.au) + @author Jason Height (jheight at chariot dot net dot au) + @version 2.0-pre + + + Constructs a WSBool record and Sets its fields appropriately. + @param in the RecordInputstream to Read the record from + + + Get first byte (see bit Getters) + + +

    + Whether to show automatic page breaks or not + +
    + + + Whether sheet is a dialog sheet or not + + + + + Get if row summaries appear below detail in the outline + + + + + Get if col summaries appear right of the detail in the outline + + + + + Get the second byte (see bit Getters) + + + + + fit to page option is on + + + + + Whether to display the guts or not + + + + + whether alternate expression evaluation is on + + + + + whether alternative formula entry is on + + + + Helper for Shifting rows up or down + + When possible, code should be implemented in the RowShifter abstract class to avoid duplication with {@link NPOI.XSSF.UserModel.helpers.XSSFRowShifter} + + + High level representation for Color Scale / Color Gradient + Formatting component of Conditional Formatting Settings + + + High level representation for Icon / Multi-State / Databar / + Colour Scale change thresholds + + + High level representation for DataBar / Data-Bar Formatting + component of Conditional Formatting Settings + + + The HSSF file format normally stores Color information in the + Palette (see PaletteRecord), but for a few cases (eg Conditional + Formatting, Sheet Extensions), this XSSF-style color record + can be used. + + + High level representation for Icon / Multi-State Formatting + component of Conditional Formatting Settings + + + @author Evgeniy Berlog + date: 05.06.12 + + + build shape tree from escher container + @param container root escher container from which escher records must be taken + @param agg - EscherAggregate + @param out - shape container to which shapes must be added + @param root - node to create HSSFObjectData shapes + + + + @author Josh Micich + + + Creates a list constraint + + + Creates a number based data validation constraint. The text values entered for expr1 and expr2 + can be either standard Excel formulas or formatted number values. If the expression starts + with '=' it is Parsed as a formula, otherwise it is Parsed as a formatted number. + + @param validationType one of {@link NPOI.SS.UserModel.DataValidationConstraint.ValidationType#ANY}, + {@link NPOI.SS.UserModel.DataValidationConstraint.ValidationType#DECIMAL}, + {@link NPOI.SS.UserModel.DataValidationConstraint.ValidationType#INTEGER}, + {@link NPOI.SS.UserModel.DataValidationConstraint.ValidationType#TEXT_LENGTH} + @param comparisonOperator any constant from {@link NPOI.SS.UserModel.DataValidationConstraint.OperatorType} enum + @param expr1 date formula (when first char is '=') or formatted number value + @param expr2 date formula (when first char is '=') or formatted number value + + + Creates a time based data validation constraint. The text values entered for expr1 and expr2 + can be either standard Excel formulas or formatted time values. If the expression starts + with '=' it is Parsed as a formula, otherwise it is Parsed as a formatted time. To parse + formatted times, two formats are supported: "HH:MM" or "HH:MM:SS". This is contrary to + Excel which uses the default time format from the OS. + + @param comparisonOperator constant from {@link NPOI.SS.UserModel.DataValidationConstraint.OperatorType} enum + @param expr1 date formula (when first char is '=') or formatted time value + @param expr2 date formula (when first char is '=') or formatted time value + + + Creates a date based data validation constraint. The text values entered for expr1 and expr2 + can be either standard Excel formulas or formatted date values. If the expression starts + with '=' it is Parsed as a formula, otherwise it is Parsed as a formatted date (Excel uses + the same convention). To parse formatted dates, a date format needs to be specified. This + is contrary to Excel which uses the default short date format from the OS. + + @param comparisonOperator constant from {@link NPOI.SS.UserModel.DataValidationConstraint.OperatorType} enum + @param expr1 date formula (when first char is '=') or formatted date value + @param expr2 date formula (when first char is '=') or formatted date value + @param dateFormat ignored if both expr1 and expr2 are formulas. Default value is "YYYY/MM/DD" + otherwise any other valid argument for SimpleDateFormat can be used + @see SimpleDateFormat + + + Distinguishes formula expressions from simple value expressions. This logic is only + required by a few factory methods in this class that create data validation constraints + from more or less the same parameters that would have been entered in the Excel UI. The + data validation dialog box uses the convention that formulas begin with '='. Other methods + in this class follow the POI convention (formulas and values are distinct), so the '=' + convention is not used there. + + @param textExpr a formula or value expression + @return all text After '=' if textExpr begins with '='. Otherwise null if textExpr does not begin with '=' + + + @return null if numberStr is null + + + @return null if timeStr is null + + + @param dateFormat pass null for default YYYYMMDD + @return null if timeStr is null + + + Convenience method + @return true if this constraint is a 'list' validation + + + Convenience method + @return true if this constraint is a 'list' validation with explicit values + + + @return the numeric value for expression 1. May be null + + + @return the numeric value for expression 2. May be null + + + @return both Parsed formulas (for expression 1 and 2). + + + @return The Parsed token array representing the formula or value specified. + Empty array if both formula and value are null + + + HSSFDataFormatter contains methods for formatting the value stored in an + HSSFCell. This can be useful for reports and GUI presentations when you + need to display data exactly as it appears in Excel. Supported formats + include currency, SSN, percentages, decimals, dates, phone numbers, zip + codes, etc. + + Internally, formats will be implemented using subclasses of + such as and . Therefore the + formats used by this class must obey the same pattern rules as these Format + subclasses. This means that only legal number pattern characters ("0", "#", + ".", "," etc.) may appear in number formats. Other characters can be + inserted before or after the number pattern to form a + prefix or suffix. + + For example the Excel pattern "$#,##0.00 "USD"_);($#,##0.00 "USD")" + will be correctly formatted as "$1,000.00 USD" or "($1,000.00 USD)". + However the pattern "00-00-00" is incorrectly formatted by + DecimalFormat as "000000--". For Excel formats that are not compatible with + DecimalFormat, you can provide your own custom {@link Format} implementation + via HSSFDataFormatter.AddFormat(String,Format). The following + custom formats are already provided by this class: + +
    +             
    • SSN "000-00-0000"
    • +
    • Phone Number "(###) ###-####"
    • +
    • Zip plus 4 "00000-0000"
    • +
    +
    + + If the Excel format pattern cannot be parsed successfully, then a default + format will be used. The default number format will mimic the Excel General + format: "#" for whole numbers and "#.##########" for decimal numbers. You + can override the default format pattern with + HSSFDataFormatter.DefaultNumberFormat=(Format). Note: the + default format will only be used when a Format cannot be created from the + cell's data format string. + + @author James May (james dot may at fmr dot com) +
    + + Creates a formatter using the given locale. + + + Creates a formatter using the {@link Locale#getDefault() default locale}. + + + Utility class for creating data validation cells + + @author Dragos Buleandra (dragos.buleandra@trade2b.ro) + + + Constructor which Initializes the cell range on which this object will be + applied + @param constraint + + + @author Radhakrishnan J + + + + Contains methods for dealing with Excel dates. + + @author Michael Harhen + @author Glen Stampoultzis (glens at apache.org) + @author Dan Sherman (dsherman at isisph.com) + @author Hack Kampbjorn (hak at 2mba.dk) + @author Alex Jacoby (ajacoby at gmail.com) + @author Pavel Krupets (pkrupets at palmtreebusiness dot com) + + + Has methods for construction of a chart object. + + @author Glen Stampoultzis (glens at apache.org) + + + Creates a bar chart. API needs some work. :) + + NOTE: Does not yet work... checking it in just so others + can take a look. + + + Returns all the charts for the given sheet. + + NOTE: You won't be able to do very much with + these charts yet, as this is very limited support + + + Get the X offset of the chart + + + Get the Y offset of the chart + + + Get the width of the chart. {@link ChartRecord} + + + Get the height of the chart. {@link ChartRecord} + + + Returns the series of the chart + + + Returns the chart's title, if there is one, + or null if not + + + Set value range (basic Axis Options) + @param axisIndex 0 - primary axis, 1 - secondary axis + @param minimum minimum value; Double.NaN - automatic; null - no change + @param maximum maximum value; Double.NaN - automatic; null - no change + @param majorUnit major unit value; Double.NaN - automatic; null - no change + @param minorUnit minor unit value; Double.NaN - automatic; null - no change + + + A series in a chart + + + See {@link SeriesRecord} + + + Returns the series' title, if there is one, + or null if not + + + @return record with data names + + + @return record with data values + + + @return record with data category labels + + + @return record with data secondary category labels + + + @return record with series + + + Translates Graphics calls into escher calls. The translation Is lossy so + many features are not supported and some just aren't implemented yet. If + in doubt test the specific calls you wish to make. Graphics calls are + always performed into an EscherGroup so one will need to be Created. + + Important: +
    + One important concept worth considering Is that of font size. One of the + difficulties in Converting Graphics calls into escher Drawing calls Is that + Excel does not have the concept of absolute pixel positions. It measures + it's cell widths in 'Chars' and the cell heights in points. + Unfortunately it's not defined exactly what a type of Char it's + measuring. Presumably this Is due to the fact that the Excel will be + using different fonts on different platforms or even within the same + platform. + + Because of this constraint we've had to calculate the + verticalPointsPerPixel. This the amount the font should be scaled by when + you Issue commands such as DrawString(). A good way to calculate this + Is to use the follow formula: + +
    +                  multipler = GroupHeightInPoints / heightOfGroup
    +             
    + + The height of the Group Is calculated fairly simply by calculating the + difference between the y coordinates of the bounding box of the shape. The + height of the Group can be calculated by using a convenience called + HSSFClientAnchor.GetAnchorHeightInPoints(). +
    + + @author Glen Stampoultzis (glens at apache.org) +
    + + Construct an escher graphics object. + + @param escherGroup The escher Group to Write the graphics calls into. + @param workbook The workbook we are using. + @param forecolor The foreground color to use as default. + @param verticalPointsPerPixel The font multiplier. (See class description for information on how this works.). + + + Constructs an escher graphics object. + + @param escherGroup The escher Group to Write the graphics calls into. + @param workbook The workbook we are using. + @param foreground The foreground color to use as default. + @param verticalPointsPerPixel The font multiplier. (See class description for information on how this works.). + @param font The font to use. + + + Fills a (closed) polygon, as defined by a pair of arrays, which + hold the x and y coordinates. + + This Draws the polygon, with nPoint line segments. + The first nPoint - 1 line segments are + Drawn between sequential points + (xPoints[i],yPoints[i],xPoints[i+1],yPoints[i+1]). + The line segment Is a closing one, from the last point to + the first (assuming they are different). + + The area inside of the polygon Is defined by using an + even-odd Fill rule (also known as the alternating rule), and + the area inside of it Is Filled. + @param xPoints array of the x coordinates. + @param yPoints array of the y coordinates. + @param nPoints the total number of points in the polygon. + @see java.awt.Graphics#DrawPolygon(int[], int[], int) + + + Instances of this class keep track of multiple dependent cell evaluations due + to recursive calls to HSSFFormulaEvaluator.internalEvaluate(). + The main purpose of this class Is to detect an attempt to evaluate a cell + that Is alReady being evaluated. In other words, it detects circular + references in spReadsheet formulas. + + @author Josh Micich + + + Stores the parameters that identify the evaluation of one cell.
    +
    + + @return human Readable string for debug purposes + + + Notifies this evaluation tracker that evaluation of the specified cell Is + about to start.
    + + In the case of a true return code, the caller should + continue evaluation of the specified cell, and also be sure to call + endEvaluate() when complete.
    + + In the case of a false return code, the caller should + return an evaluation result of + ErrorEval.CIRCULAR_REF_ERROR, and not call endEvaluate(). +
    + @return true if the specified cell has not been visited yet in the current + evaluation. false if the specified cell Is alReady being evaluated. +
    + + Notifies this evaluation tracker that the evaluation of the specified + cell Is complete.

    + + Every successful call to startEvaluate must be followed by a + call to endEvaluate (recommended in a finally block) to enable + proper tracking of which cells are being evaluated at any point in time.

    + + Assuming a well behaved client, parameters to this method would not be + required. However, they have been included to assert correct behaviour, + and form more meaningful error messages. + + + This class makes an EvaluationCycleDetector instance available to + each thRead via a ThReadLocal in order to avoid Adding a parameter + to a few protected methods within HSSFFormulaEvaluator. + + @author Josh Micich + + + @return + + +

    + Stores width and height details about a font. + @author Glen Stampoultzis (glens at apache.org) + +
    + + + Construct the font details with the given name and height. + + The font name. + The height of the font. + + + + Gets the name of the font. + + + + + + Gets the height. + + + + + + Adds the char. + + The c. + The width. + + + + Retrieves the width of the specified Char. If the metrics for + a particular Char are not available it defaults to returning the + width for the 'W' Char. + + The character. + + + + + Adds the chars. + + The chars. + The widths. + + + + Builds the font height property. + + Name of the font. + + + + + Builds the font widths property. + + Name of the font. + + + + + Builds the font chars property. + + Name of the font. + + + + + Create an instance of + FontDetails + by loading them from the + provided property object. + + the font name. + the property object holding the details of this + particular font. + a new FontDetails instance. + + + + Gets the width of all Chars in a string. + + The string to measure. + The width of the string for a 10 point font. + + + + Split the given string into an array of strings using the given + delimiter. + + The text. + The separator. + The max. + + + + + Common class for HSSFHeader and HSSFFooter + + + + @return the internal text representation (combining center, left and right parts). + Possibly empty string if no header or footer is set. Never null. + + + + Creates the complete footer string based on the left, center, and middle + strings. + + The parts. + + + + Sets the header footer text. + + the new header footer text (contains mark-up tags). Possibly + empty string never + + + + Get the left side of the header or footer. + + The string representing the left side. + + + + Get the center of the header or footer. + + The string representing the center. + + + + Get the right side of the header or footer. + + The string representing the right side.. + + + + Returns the string that represents the change in font size. + + the new font size. + The special string to represent a new font size + + + + Returns the string that represents the change in font. + + the new font. + the fonts style, one of regular, italic, bold, italic bold or bold italic. + The special string to represent a new font size + + + + Returns the string representing the current page number + + The special string for page number. + + + + Returns the string representing the number of pages. + + The special string for the number of pages. + + + + Returns the string representing the current date + + The special string for the date + + + + Gets the time. + + The time. + Returns the string representing the current time + @return The special string for the time + + + + Returns the string representing the current file name + + The special string for the file name. + + + + Returns the string representing the current tab (sheet) name + + The special string for tab name. + + + + Returns the string representing the start bold + + The special string for start bold + + + + Returns the string representing the end bold + + The special string for end bold. + + + + Returns the string representing the start underline + + The special string for start underline. + + + + Returns the string representing the end underline + + The special string for end underline. + + + + Returns the string representing the start double underline + + The special string for start double underline. + + + + Returns the string representing the end double underline + + The special string for end double underline. + + + + Removes any fields (eg macros, page markers etc) + from the string. + Normally used to make some text suitable for showing + to humans, and the resultant text should not normally + be saved back into the document! + + The text. + + + + + Are fields currently being Stripped from + the text that this {@link HeaderStories} returns? + Default is false, but can be changed + + true if [are fields stripped]; otherwise, false. + + + + Represents a special field in a header or footer, + eg the page number + + + + The character sequence that marks this field + + + + A special field that normally comes in a pair, eg + turn on underline / turn off underline + + + + + Instance to this class. + + + + + Explicit static constructor to tell C# compiler not to mark type as beforefieldinit. + + + + + Initialize AllFields. + + + + + Accessing the initialized instance. + + + + + An anchor Is what specifics the position of a shape within a client object + or within another containing shape. + @author Glen Stampoultzis (glens at apache.org) + + + + + Initializes a new instance of the class. + + The DX1. + The dy1. + The DX2. + The dy2. + + + + Gets or sets the DX1. + + The DX1. + + + + Gets or sets the dy1. + + The dy1. + + + + Gets or sets the dy2. + + The dy2. + + + + Gets or sets the DX2. + + The DX2. + + + + Gets a value indicating whether this instance is horizontally flipped. + + + true if this instance is horizontally flipped; otherwise, false. + + + + + Gets a value indicating whether this instance is vertically flipped. + + + true if this instance is vertically flipped; otherwise, false. + + + + High level representation for Border Formatting component + of Conditional Formatting Settings + + @author Dmitriy Kumshayev + + + + + High level representation of a cell in a row of a spReadsheet. + Cells can be numeric, formula-based or string-based (text). The cell type + specifies this. String cells cannot conatin numbers and numeric cells cannot + contain strings (at least according to our model). Client apps should do the + conversions themselves. Formula cells have the formula string, as well as + the formula result, which can be numeric or string. + Cells should have their number (0 based) before being Added to a row. Only + cells that have values should be Added. + + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Dan Sherman (dsherman at Isisph.com) + @author Brian Sanders (kestrel at burdell dot org) Active Cell support + @author Yegor Kozlov cell comments support + + + + + Creates new Cell - Should only be called by HSSFRow. This Creates a cell + from scratch. + When the cell is initially Created it is Set to CellType.Blank. Cell types + can be Changed/overwritten by calling SetCellValue with the appropriate + type as a parameter although conversions from one type to another may be + prohibited. + + Workbook record of the workbook containing this cell + Sheet record of the sheet containing this cell + the row of this cell + the column for this cell + + + + Creates new Cell - Should only be called by HSSFRow. This Creates a cell + from scratch. + + Workbook record of the workbook containing this cell + Sheet record of the sheet containing this cell + the row of this cell + the column for this cell + CellType.Numeric, CellType.String, CellType.Formula, CellType.Blank, + CellType.Boolean, CellType.Error + + + + Creates an Cell from a CellValueRecordInterface. HSSFSheet uses this when + reading in cells from an existing sheet. + + Workbook record of the workbook containing this cell + Sheet record of the sheet containing this cell + the Cell Value Record we wish to represent + + + private constructor to prevent blank construction + + + used internally -- given a cell value record, figure out its type + + + + the Workbook that this Cell is bound to + + + + + the HSSFRow this cell belongs to + + + + + Set the cells type (numeric, formula or string) + + Type of the cell. + + + + Sets the cell type. The SetValue flag indicates whether to bother about + trying to preserve the current value in the new record if one is Created. + The SetCellValue method will call this method with false in SetValue + since it will overWrite the cell value later + + Type of the cell. + if set to true [set value]. + The row. + The col. + Index of the style. + + + + Get the cells type (numeric, formula or string) + + The type of the cell. + + + + Set a numeric value for the cell + + the numeric value to Set this cell to. For formulas we'll Set the + precalculated value, for numerics we'll Set its value. For other types we + will Change the cell to a numeric cell and Set its value. + + + + Set a date value for the cell. Excel treats dates as numeric so you will need to format the cell as + a date. + + the date value to Set this cell to. For formulas we'll Set the + precalculated value, for numerics we'll Set its value. For other types we + will Change the cell to a numeric cell and Set its value. + + + + Set a string value for the cell. Please note that if you are using + full 16 bit Unicode you should call SetEncoding() first. + + value to Set the cell to. For formulas we'll Set the formula + string, for String cells we'll Set its value. For other types we will + Change the cell to a string cell and Set its value. + If value is null then we will Change the cell to a Blank cell. + + + set a error value for the cell + + @param errorCode the error value to set this cell to. For formulas we'll set the + precalculated value , for errors we'll set + its value. For other types we will change the cell to an error + cell and set its value. + + + set a error value for the cell + + @param error the error value to set this cell to. For formulas we'll set the + precalculated value , for errors we'll set + its value. For other types we will change the cell to an error + cell and set its value. + + + + Set a string value for the cell. Please note that if you are using + full 16 bit Unicode you should call SetEncoding() first. + + value to Set the cell to. For formulas we'll Set the formula + string, for String cells we'll Set its value. For other types we will + Change the cell to a string cell and Set its value. + If value is null then we will Change the cell to a Blank cell. + + + Should be called any time that a formula could potentially be deleted. + Does nothing if this cell currently does not hold a formula + + + + Gets or sets the cell formula. + + The cell formula. + + + + Get the value of the cell as a number. For strings we throw an exception. + For blank cells we return a 0. + + The numeric cell value. + + + + Used to help format error messages + + The cell type code. + + + + + Types the mismatch. + + The expected type code. + The actual type code. + if set to true [is formula cell]. + + + + + Checks the type of the formula cached value. + + The expected type code. + The fr. + + + + Get the value of the cell as a date. For strings we throw an exception. + For blank cells we return a null. + + The date cell value. + + + + Get the value of the cell as a string - for numeric cells we throw an exception. + For blank cells we return an empty string. + For formulaCells that are not string Formulas, we return empty String + + The string cell value. + + + + Get the value of the cell as a string - for numeric cells we throw an exception. + For blank cells we return an empty string. + For formulaCells that are not string Formulas, we return empty String + + The rich string cell value. + + + + Set a bool value for the cell + + the bool value to Set this cell to. For formulas we'll Set the + precalculated value, for bools we'll Set its value. For other types we + will Change the cell to a bool cell and Set its value. + + + + Chooses a new bool value for the cell when its type is changing. + Usually the caller is calling SetCellType() with the intention of calling + SetCellValue(bool) straight afterwards. This method only exists to give + the cell a somewhat reasonable value until the SetCellValue() call (if at all). + TODO - perhaps a method like SetCellTypeAndValue(int, Object) should be introduced to avoid this + + + + + + Get the value of the cell as a bool. For strings, numbers, and errors, we throw an exception. + For blank cells we return a false. + + true if [boolean cell value]; otherwise, false. + + + + Get the value of the cell as an error code. For strings, numbers, and bools, we throw an exception. + For blank cells we return a 0. + + The error cell value. + + + + Get the style for the cell. This is a reference to a cell style contained in the workbook + object. + + The cell style. + + + Applying a user-defined style (UDS) is special. Excel does not directly reference user-defined styles, but + instead create a 'proxy' ExtendedFormatRecord referencing the UDS as parent. + + The proceudre to apply a UDS is as follows: + + 1. search for a ExtendedFormatRecord with parentIndex == style.getIndex() + and xfType == ExtendedFormatRecord.XF_CELL. + 2. if not found then create a new ExtendedFormatRecord and copy all attributes from the user-defined style + and set the parentIndex to be style.getIndex() + 3. return the index of the ExtendedFormatRecord, this will be assigned to the parent cell record + + @param style the user style to apply + + @return the index of a ExtendedFormatRecord record that will be referenced by the cell + + + + Should only be used by HSSFSheet and friends. Returns the low level CellValueRecordInterface record + + the cell via the low level api. + + + + Checks the bounds. + + The cell num. + if the bounds are exceeded. + + + + Sets this cell as the active cell for the worksheet + + + + + Returns a string representation of the cell + This method returns a simple representation, + anthing more complex should be in user code, with + knowledge of the semantics of the sheet being Processed. + Formula cells return the formula string, + rather than the formula result. + Dates are Displayed in dd-MMM-yyyy format + Errors are Displayed as #ERR<errIdx> + + + + + Returns comment associated with this cell + + The cell comment associated with this cell. + + + + Removes the comment for this cell, if + there is one. + + WARNING - some versions of excel will loose + all comments after performing this action! + + + + Gets the index of the column. + + The index of the column. + + + Updates the cell record's idea of what + column it belongs in (0 based) + @param num the new cell number + + + + Gets the (zero based) index of the row containing this cell + + The index of the row. + + + + Get or set hyperlink associated with this cell + If the supplied hyperlink is null on setting, the hyperlink for this cell will be removed. + + The hyperlink associated with this cell or null if not found + + + + Removes the hyperlink for this cell, if there is one. + + + + + Only valid for formula cells + + one of (CellType.Numeric,CellType.String, CellType.Boolean, CellType.Error) depending + on the cached value of the formula + + + + The purpose of this method is to validate the cell state prior to modification + + + + + + Called when this cell is modified. + The purpose of this method is to validate the cell state prior to modification. + + + + + High level representation of the style of a cell in a sheet of a workbook. + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + + + + + Initializes a new instance of the class. + + The index. + The record. + The workbook. + + + + Initializes a new instance of the class. + + The index. + The record. + The workbook. + + + + Get the index within the HSSFWorkbook (sequence within the collection of ExtnededFormat objects) + + Unique index number of the Underlying record this style represents (probably you don't care + Unless you're comparing which one is which) + + + + Gets the parent style. + + the parent style for this cell style. + In most cases this will be null, but in a few + cases there'll be a fully defined parent. + + + + Get the index of the format + + The data format. + + + + Get the contents of the format string, by looking up + the DataFormat against the bound workbook + + + + + + Get the contents of the format string, by looking up the DataFormat against the supplied workbook + + The workbook + the format string or "General" if not found + + + + Get the contents of the format string, by looking up + the DataFormat against the supplied workbook + + The internal workbook. + + + + + Set the font for this style + + a font object Created or retreived from the HSSFWorkbook object + + + + Gets the index of the font for this style. + + The index of the font. + + + + Gets the font for this style + + The parent workbook that this style belongs to. + + + + + Get whether the cell's using this style are to be hidden + + whether the cell using this style should be hidden + + + + Get whether the cell's using this style are to be locked + + whether the cell using this style should be locked + + + + Get the type of horizontal alignment for the cell + + the type of alignment + + + + Gets or sets a value indicating whether the text should be wrapped + + true if [wrap text]; otherwise, false. + + + + Gets or sets the vertical alignment for the cell. + + the type of alignment + + + + Gets or sets the degree of rotation for the text in the cell + + Note: HSSF uses values from -90 to 90 degrees, whereas XSSF + uses values from 0 to 180 degrees.The implementations of this method will map between these two value-ranges + accordingly, however the corresponding getter is returning values in the range mandated by the current type + of Excel file-format that this CellStyle is applied to. + + The rotation degrees (between -90 and 90 degrees). + + + + Verifies that this style belongs to the supplied Workbook. + Will throw an exception if it belongs to a different one. + This is normally called when trying to assign a style to a + cell, to ensure the cell and the style are from the same + workbook (if they're not, it won't work) + + The workbook. + + + + Gets or sets the number of spaces to indent the text in the cell + + number of spaces + + + + Gets or sets the type of border to use for the left border of the cell + + The border type. + + + + Gets or sets the type of border to use for the right border of the cell + + The border type. + + + + Gets or sets the type of border to use for the top border of the cell + + The border type. + + + + Gets or sets the type of border to use for the bottom border of the cell + + The border type. + + + + Gets or sets the color to use for the left border + + The index of the color definition + + + + Gets or sets the color to use for the left border. + + The index of the color definition + + + + Gets or sets the color to use for the top border + + The index of the color definition. + + + + Gets or sets the color to use for the left border + + The index of the color definition. + + + + Gets or sets the color to use for the diagional border + + The index of the color definition. + + + + Gets or sets the line type to use for the diagional border + + The line type. + + + + Gets or sets the type of diagional border + . + The border diagional type. + + + + Gets or sets whether the cell is shrink-to-fit + + + + Get or set the reading order, for RTL/LTR ordering of + the text. +

    0 means Context (Default), 1 means Left To Right, + and 2 means Right to Left

    + + @return order - the reading order (0,1,2) +
    + + + Gets or sets the fill pattern. - Set to 1 to Fill with foreground color + + The fill pattern. + + + + Checks if the background and foreground Fills are Set correctly when one + or the other is Set to the default color. + Works like the logic table below: + BACKGROUND FOREGROUND + NONE AUTOMATIC + 0x41 0x40 + NONE RED/ANYTHING + 0x40 0xSOMETHING + + + + Clones all the style information from another + HSSFCellStyle, onto this one. This + HSSFCellStyle will then have all the same + properties as the source, but the two may + be edited independently. + Any stylings on this HSSFCellStyle will be lost! + + The source HSSFCellStyle could be from another + HSSFWorkbook if you like. This allows you to + copy styles from one HSSFWorkbook to another. + + + + Clones all the style information from another + HSSFCellStyle, onto this one. This + HSSFCellStyle will then have all the same + properties as the source, but the two may + be edited independently. + Any stylings on this HSSFCellStyle will be lost! + The source HSSFCellStyle could be from another + HSSFWorkbook if you like. This allows you to + copy styles from one HSSFWorkbook to another. + + The source. + + + + Gets or sets the color of the fill background. + + The color of the fill background. + Set the background Fill color. + + cs.SetFillPattern(HSSFCellStyle.FINE_DOTS ); + cs.SetFillBackgroundColor(new HSSFColor.RED().Index); + optionally a Foreground and background Fill can be applied: + Note: Ensure Foreground color is Set prior to background + cs.SetFillPattern(HSSFCellStyle.FINE_DOTS ); + cs.SetFillForegroundColor(new HSSFColor.BLUE().Index); + cs.SetFillBackgroundColor(new HSSFColor.RED().Index); + or, for the special case of SOLID_Fill: + cs.SetFillPattern(HSSFCellStyle.SOLID_FOREGROUND ); + cs.SetFillForegroundColor(new HSSFColor.RED().Index); + It is necessary to Set the Fill style in order + for the color to be shown in the cell. + + + + + Gets or sets the foreground Fill color + + Fill color. + @see org.apache.poi.hssf.usermodel.HSSFPalette#GetColor(short) + + + Gets the name of the user defined style. + Returns null for built in styles, and + styles where no name has been defined + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + create anchor from existing file + @param escherChildAnchorRecord + + + create anchor from scratch + @param dx1 x coordinate of the left up corner + @param dy1 y coordinate of the left up corner + @param dx2 x coordinate of the right down corner + @param dy2 y coordinate of the right down corner + + + @param dx1 x coordinate of the left up corner + @param dy1 y coordinate of the left up corner + @param dx2 x coordinate of the right down corner + @param dy2 y coordinate of the right down corner + + + + A client anchor Is attached to an excel worksheet. It anchors against a + top-left and buttom-right cell. + @author Glen Stampoultzis (glens at apache.org) + + + + + Creates a new client anchor and defaults all the anchor positions to 0. + + + + + Creates a new client anchor and Sets the top-left and bottom-right + coordinates of the anchor. + + Note: Microsoft Excel seems to sometimes disallow + higher y1 than y2 or higher x1 than x2 in the anchor, you might need to + reverse them and draw shapes vertically or horizontally flipped! + + the x coordinate within the first cell. + the y coordinate within the first cell. + the x coordinate within the second cell. + the y coordinate within the second cell. + the column (0 based) of the first cell. + the row (0 based) of the first cell. + the column (0 based) of the second cell. + the row (0 based) of the second cell. + + + + Calculates the height of a client anchor in points. + + the sheet the anchor will be attached to + the shape height. + + + + Gets the row height in points. + + The sheet. + The row num. + + + + + Gets or sets the col1. + + The col1. + + + + Gets or sets the col2. + + The col2. + + + + Gets or sets the row1. + + The row1. + + + + Gets or sets the row2. + + The row2. + + + + Sets the top-left and bottom-right + coordinates of the anchor + + Note: Microsoft Excel seems to sometimes disallow + higher y1 than y2 or higher x1 than x2 in the anchor, you might need to + reverse them and draw shapes vertically or horizontally flipped! + + the column (0 based) of the first cell. + the row (0 based) of the first cell. + the x coordinate within the first cell. + the y coordinate within the first cell. + the column (0 based) of the second cell. + the row (0 based) of the second cell. + the x coordinate within the second cell. + the y coordinate within the second cell. + + + + Gets a value indicating whether this instance is horizontally flipped. + + + true if the anchor goes from right to left; otherwise, false. + + + + + Gets a value indicating whether this instance is vertically flipped. + + + true if the anchor goes from bottom to top.; otherwise, false. + + + + + Gets the anchor type + 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells. + + The type of the anchor. + + + + Checks the range. + + The value. + The min range. + The max range. + Name of the variable. + + + Given a 16-bit unsigned integer stored in a short, return the unsigned value. + + @param s A 16-bit value intended to be interpreted as an unsigned integer. + @return The value represented by s. + + + + Represents a cell comment - a sticky note associated with a cell. + @author Yegor Kozlov + + + + + Construct a new comment with the given parent and anchor. + + + defines position of this anchor in the sheet + + + + Initializes a new instance of the class. + + The note. + The txo. + + + + Gets or sets a value indicating whether this is visible. + + true if visible; otherwise, false. + Sets whether this comment Is visible. + @return + true + if the comment Is visible, + false + otherwise + + + + Gets or sets the row of the cell that Contains the comment + + the 0-based row of the cell that Contains the comment + + + + Gets or sets the column of the cell that Contains the comment + + the 0-based column of the cell that Contains the comment + + + + Gets or sets the name of the original comment author + + the name of the original author of the comment + + + + Gets the note record. + + the underlying Note record. + + + Do we know which cell this comment belongs to? + + + + HSSFConditionalFormatting class encapsulates all Settings of Conditional Formatting. + The class can be used to make a copy HSSFConditionalFormatting Settings + + + HSSFConditionalFormatting cf = sheet.GetConditionalFormattingAt(index); + newSheet.AddConditionalFormatting(cf); + or to modify existing Conditional Formatting Settings (formatting regions and/or rules). + Use {@link HSSFSheet#GetConditionalFormattingAt(int)} to Get access to an instance of this class. + To Create a new Conditional Formatting Set use the following approach: + + // Define a Conditional Formatting rule, which triggers formatting + // when cell's value Is greater or equal than 100.0 and + // applies patternFormatting defined below. + HSSFConditionalFormattingRule rule = sheet.CreateConditionalFormattingRule( + ComparisonOperator.GE, + "100.0", // 1st formula + null // 2nd formula Is not used for comparison operator GE + ); + // Create pattern with red background + HSSFPatternFormatting patternFmt = rule.cretePatternFormatting(); + patternFormatting.SetFillBackgroundColor(HSSFColor.RED.index); + // Define a region containing first column + Region [] regions = + { + new Region(1,(short)1,-1,(short)1) + }; + // Apply Conditional Formatting rule defined above to the regions + sheet.AddConditionalFormatting(regions, rule); + + @author Dmitriy Kumshayev + + + + Initializes a new instance of the class. + + The workbook. + The cf aggregate. + + + + Gets the CF records aggregate. + + + + + + Gets array of CellRangeAddresses + + + + + + Replaces an existing Conditional Formatting rule at position idx. + Excel allows to Create up to 3 Conditional Formatting rules. + This method can be useful to modify existing Conditional Formatting rules. + + position of the rule. Should be between 0 and 2. + Conditional Formatting rule + + + + Add a Conditional Formatting rule. + Excel allows to Create up to 3 Conditional Formatting rules. + + Conditional Formatting rule + + + + Gets the Conditional Formatting rule at position idx + + The index. + + + + + Gets the number of Conditional Formatting rules. + + The number of rules. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + High level representation of Conditional Formatting Rule. + It allows to specify formula based conditions for the Conditional Formatting + and the formatting Settings such as font, border and pattern. + + @author Dmitriy Kumshayev + + + @return - font formatting object if defined, null otherwise + + + Create a new font formatting structure if it does not exist, + otherwise just return existing object. + @return - font formatting object, never returns null. + + + @return - border formatting object if defined, null otherwise + + + Create a new border formatting structure if it does not exist, + otherwise just return existing object. + @return - border formatting object, never returns null. + + + @return - pattern formatting object if defined, null otherwise + + + Create a new pattern formatting structure if it does not exist, + otherwise just return existing object. + @return - pattern formatting object, never returns null. + + + @return databar / data-bar formatting object if defined, null otherwise + + + create a new databar / data-bar formatting object if it does not exist, + otherwise just return the existing object. + + + @return icon / multi-state formatting object if defined, null otherwise + + + create a new icon / multi-state formatting object if it does not exist, + otherwise just return the existing object. + + + @return color scale / gradient formatting object if defined, null otherwise + + + create a new color scale / gradient formatting object if it does not exist, + otherwise just return the existing object. + + + @return - the conditiontype for the cfrule + + + @return - the comparisionoperatation for the cfrule + + + Creates a HSSFFormulaEvaluator, the object that Evaluates formula cells. + + @return a HSSFFormulaEvaluator instance + + + Creates a HSSFClientAnchor. Use this object to position drawing object in a sheet + + @return a HSSFClientAnchor instance + @see NPOI.SS.usermodel.Drawing + + + The first user-defined format starts at 164. + + + + Construncts a new data formatter. It takes a workbook to have + access to the workbooks format records. + + the workbook the formats are tied to. + + + + Get the format index that matches the given format string + Automatically Converts "text" to excel's format string to represent text. + + The format string matching a built in format. + index of format or -1 if Undefined. + + + + Get the format index that matches the given format + string, creating a new format entry if required. + Aliases text to the proper format as required. + + The format string matching a built in format. + index of format. + + + + Get the format string that matches the given format index + + The index of a format. + string represented at index of format or null if there Is not a format at that index + + + + Get the format string that matches the given format index + + The index of a built in format. + string represented at index of format or null if there Is not a builtin format at that index + + + + Get the number of builtin and reserved builtinFormats + + number of builtin and reserved builtinFormats + + + Ensures that the formats list can hold entries + up to and including the entry with this index + + + + HSSF wrapper for a cell under evaluation + @author Josh Micich + + + + HSSF wrapper for a sheet under evaluation + + @author Josh Micich + + + Internal POI use only + + @author Josh Micich + + + + Return an external name (named range, function, user-defined function) Ptg + + + + + + + + Represents a Font used in a workbook. + @version 1.0-pre + @author Andrew C. Oliver + + + + + Initializes a new instance of the class. + + The index. + The record. + + + + Get the name for the font (i.e. Arial) + + the name of the font to use + + + + Get the index within the HSSFWorkbook (sequence within the collection of Font objects) + + Unique index number of the Underlying record this Font represents (probably you don't care + Unless you're comparing which one is which) + + + + Get or sets the font height in Unit's of 1/20th of a point. Maybe you might want to + use the GetFontHeightInPoints which matches to the familiar 10, 12, 14 etc.. + + height in 1/20ths of a point. + + + + Gets or sets the font height in points. + + height in the familiar Unit of measure - points. + + + + Gets or sets whether to use italics or not + + true if this instance is italic; otherwise, false. + + + + Get whether to use a strikeout horizontal line through the text or not + + + strikeout or not + + + + + Gets or sets the color for the font. + + The color to use. + + + + get the color value for the font + + HSSFWorkbook + + + + + Gets or sets the boldness to use + + The boldweight. + + + get or set if the font bold style + + + + Gets or sets normal,base or subscript. + + offset type to use (none,base,sub) + + + + Gets or sets the type of text Underlining to use + + The Underlining type. + + + + Gets or sets the char set to use. + + The char set. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + High level representation for Font Formatting component + of Conditional Formatting Settings + + @author Dmitriy Kumshayev + + + + Get the type of base or subscript for the font + + @return base or subscript option + + + @return font color index + + + Gets the height of the font in 1/20th point Units + + @return fontheight (in points/20); or -1 if not modified + + + Get the font weight for this font (100-1000dec or 0x64-0x3e8). Default Is + 0x190 for normal and 0x2bc for bold + + @return bw - a number between 100-1000 for the fonts "boldness" + + + @return + @see org.apache.poi.hssf.record.cf.FontFormatting#GetRawRecord() + + + Get the type of Underlining for the font + + @return font Underlining type + + @see #U_NONE + @see #U_SINGLE + @see #U_DOUBLE + @see #U_SINGLE_ACCOUNTING + @see #U_DOUBLE_ACCOUNTING + + + Get whether the font weight Is Set to bold or not + + @return bold - whether the font Is bold or not + + + @return true if escapement type was modified from default + + + @return true if font cancellation was modified from default + + + @return true if font outline type was modified from default + + + @return true if font shadow type was modified from default + + + @return true if font style was modified from default + + + @return true if font style was Set to italic + + + @return true if font outline Is on + + + @return true if font shadow Is on + + + @return true if font strikeout Is on + + + @return true if font Underline type was modified from default + + + @return true if font weight was modified from default + + + Set font style options. + + @param italic - if true, Set posture style to italic, otherwise to normal + @param bold- if true, Set font weight to bold, otherwise to normal + + + Set font style options to default values (non-italic, non-bold) + + + + Class to Read and manipulate the footer. + The footer works by having a left, center, and right side. The total cannot + be more that 255 bytes long. One uses this class by Getting the HSSFFooter + from HSSFSheet and then Getting or Setting the left, center, and right side. + For special things (such as page numbers and date), one can use a the methods + that return the Chars used to represent these. One can also Change the + fonts by using similar methods. + @author Shawn Laubach (slaubach at apache dot org) + + + + + Initializes a new instance of the class. + + Footer record to create the footer with + + + + Gets the raw footer. + + The raw footer. + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @param stabilityClassifier used to optimise caching performance. Pass null + for the (conservative) assumption that any cell may have its definition changed after + evaluation begins. + + + @param udfFinder pass null for default (AnalysisToolPak only) + + + @param stabilityClassifier used to optimise caching performance. Pass null + for the (conservative) assumption that any cell may have its definition changed after + evaluation begins. + @param udfFinder pass null for default (AnalysisToolPak only) + + + Coordinates several formula evaluators together so that formulas that involve external + references can be evaluated. + @param workbookNames the simple file names used to identify the workbooks in formulas + with external links (for example "MyData.xls" as used in a formula "[MyData.xls]Sheet1!A1") + @param evaluators all evaluators for the full set of workbooks required by the formulas. + + + Should be called to tell the cell value cache that the specified (value or formula) cell + has changed. + Failure to call this method after changing cell values will cause incorrect behaviour + of the evaluate~ methods of this class + + + Should be called to tell the cell value cache that the specified cell has just been + deleted. + Failure to call this method after changing cell values will cause incorrect behaviour + of the evaluate~ methods of this class + + + Should be called to tell the cell value cache that the specified (value or formula) cell + has changed. + Failure to call this method after changing cell values will cause incorrect behaviour + of the evaluate~ methods of this class + + + Returns a CellValue wrapper around the supplied ValueEval instance. + @param cell + + + If cell Contains formula, it Evaluates the formula, and + puts the formula result back into the cell, in place + of the old formula. + Else if cell does not contain formula, this method leaves + the cell UnChanged. + Note that the same instance of Cell is returned to + allow chained calls like: +
    +            int EvaluatedCellType = evaluator.EvaluateInCell(cell).CellType;
    +            
    + Be aware that your cell value will be Changed to hold the + result of the formula. If you simply want the formula + value computed for you, use {@link #EvaluateFormulaCell(HSSFCell)} + @param cell +
    + + Loops over all cells in all sheets of the supplied + workbook. + For cells that contain formulas, their formulas are + Evaluated, and the results are saved. These cells + remain as formula cells. + For cells that do not contain formulas, no Changes + are made. + This is a helpful wrapper around looping over all + cells, and calling EvaluateFormulaCell on each one. + + + Loops over all cells in all sheets of the supplied + workbook. + For cells that contain formulas, their formulas are + evaluated, and the results are saved. These cells + remain as formula cells. + For cells that do not contain formulas, no changes + are made. + This is a helpful wrapper around looping over all + cells, and calling evaluateFormulaCell on each one. + + + + Class to Read and manipulate the header. + The header works by having a left, center, and right side. The total cannot + be more that 255 bytes long. One uses this class by Getting the HSSFHeader + from HSSFSheet and then Getting or Setting the left, center, and right side. + For special things (such as page numbers and date), one can use a the methods + that return the Chars used to represent these. One can also Change the + fonts by using similar methods. + @author Shawn Laubach (slaubach at apache dot org) + + + + + Initializes a new instance of the class. + + Footer record to Create the footer with + + + + Gets the raw footer. + + The raw footer. + + + + Represents an Excel hyperlink. + + @author Yegor Kozlov (yegor at apache dot org) + + + Low-level record object that stores the actual hyperlink data + + + If we Create a new hypelrink remember its type + + + + Initializes a new instance of the class. + + The type of hyperlink to Create. + + + + Initializes a new instance of the class. + + The record. + + + + Gets or sets the row of the first cell that Contains the hyperlink + + the 0-based row of the cell that Contains the hyperlink. + + + + Gets or sets the row of the last cell that Contains the hyperlink + + the 0-based row of the last cell that Contains the hyperlink + + + + Gets or sets the column of the first cell that Contains the hyperlink + + the 0-based column of the first cell that Contains the hyperlink + + + + Gets or sets the column of the last cell that Contains the hyperlink + + the 0-based column of the last cell that Contains the hyperlink + + + + Gets or sets Hypelink Address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc. + + the Address of this hyperlink + + + + Gets or sets the text mark. + + The text mark. + + + + Gets or sets the short filename. + + The short filename. + + + + Gets or sets the text label for this hyperlink + + text to Display + + + + Gets the type of this hyperlink + + the type of this hyperlink + + + @return whether the objects have the same HyperlinkRecord + + + + High Level Represantion of Named Range + + @author Libin Roman (Vista Portal LDT. Developer) + + + + Creates new HSSFName - called by HSSFWorkbook to Create a sheet from + scratch. + + lowlevel Workbook object associated with the sheet. + the Name Record + + + + + Gets or sets the sheets name which this named range is referenced to + + sheet name, which this named range refered to + + + + Gets or sets the name of the named range + + named range name + + + Returns the sheet index this name applies to. + + @return the sheet index this name applies to, -1 if this name applies to the entire workbook + + + + Sets the NameParsedFormula structure that specifies the formula for the defined name. + + the sequence of {@link Ptg}s for the formula. + + + + Tests if this name points to a cell that no longer exists + + + true if the name refers to a deleted cell; otherwise, false. + + + + + Gets a value indicating whether this instance is function name. + + + true if this instance is function name; otherwise, false. + + + + Indicates that the defined name refers to a user-defined function. + This attribute is used when there is an add-in or other code project associated with the file. + + @param value true indicates the name refers to a function. + + + + Returns a that represents the current . + + + A that represents the current . + + + + Represents binary object (i.e. OLE) data stored in the file. Eg. A GIF, JPEG etc... + + @author Daniel Noll + + + Reference to the filesystem root, required for retrieving the object data. + + + Returns the OLE2 Class Name of the object + + + Gets the object data. Only call for ones that have + data though. See {@link #hasDirectoryEntry()} + + @return the object data as an OLE2 directory. + @ if there was an error Reading the data. + + + Returns the data portion, for an ObjectData + that doesn't have an associated POIFS Directory + Entry + + + Does this ObjectData have an associated POIFS + Directory Entry? + (Not all do, those that don't have a data portion) + + + Finds the EmbeddedObjectRefSubRecord, or throws an + Exception if there wasn't one + + + + Excel can Get cranky if you give it files containing too + many (especially duplicate) objects, and this class can + help to avoid those. + In general, it's much better to make sure you don't + duplicate the objects in your code, as this is likely + to be much faster than creating lots and lots of + excel objects+records, only to optimise them down to + many fewer at a later stage. + However, sometimes this is too hard / tricky to do, which + is where the use of this class comes in. + + + + + Goes through the Workbook, optimising the fonts by + removing duplicate ones. + For now, only works on fonts used in HSSFCellStyle + and HSSFRichTextString. Any other font uses + (eg charts, pictures) may well end up broken! + This can be a slow operation, especially if you have + lots of cells, cell styles or rich text strings + + The workbook in which to optimise the fonts + + + + Goes through the Wokrbook, optimising the cell styles + by removing duplicate ones and ones that aren't used. + For best results, optimise the fonts via a call to + OptimiseFonts(HSSFWorkbook) first + + The workbook in which to optimise the cell styles + + + + Represents a workbook color palette. + Internally, the XLS format refers to colors using an offset into the palette + record. Thus, the first color in the palette has the index 0x8, the second + has the index 0x9, etc. through 0x40 + @author Brian Sanders (bsanders at risklabs dot com) + + + + + Retrieves the color at a given index + + the palette index, between 0x8 to 0x40 inclusive. + the color, or null if the index Is not populated + + + + Finds the first occurance of a given color + + the RGB red component, between 0 and 255 inclusive + the RGB green component, between 0 and 255 inclusive + the RGB blue component, between 0 and 255 inclusive + the color, or null if the color does not exist in this palette + + + + Finds the closest matching color in the custom palette. The + method for Finding the distance between the colors Is fairly + primative. + + The red component of the color to match. + The green component of the color to match. + The blue component of the color to match. + The closest color or null if there are no custom + colors currently defined. + + + + Sets the color at the given offset + + the palette index, between 0x8 to 0x40 inclusive + the RGB red component, between 0 and 255 inclusive + the RGB green component, between 0 and 255 inclusive + the RGB blue component, between 0 and 255 inclusive + + + + Adds a new color into an empty color slot. + + The red component + The green component + The blue component + The new custom color. + + + + user custom color + + + + + Initializes a new instance of the class. + + The byte offset. + The colors. + + + + Initializes a new instance of the class. + + The byte offset. + The red. + The green. + The blue. + + + + Gets index to the standard palette + + + + + + Gets triplet representation like that in Excel + + + + + + Gets a hex string exactly like a gnumeric triplet + + + + + + Gets the gnumeric part. + + The color. + + + + + The patriarch is the toplevel container for shapes in a sheet. It does + little other than act as a container for other shapes and Groups. + @author Glen Stampoultzis (glens at apache.org) + + + + The EscherAggregate we have been bound to. + (This will handle writing us out into records, + and building up our shapes from the records) + + + + Creates the patriarch. + + the sheet this patriarch is stored in. + The bound aggregate. + + + check if any shapes contain wrong data + At now(13.08.2010) check if patriarch contains 2 or more comments with same coordinates + + + @param shape to be removed + @return true of shape is removed + + + + Creates a new Group record stored Under this patriarch. + + the client anchor describes how this Group is attached + to the sheet. + the newly created Group. + + + + Creates a simple shape. This includes such shapes as lines, rectangles, + and ovals. + Note: Microsoft Excel seems to sometimes disallow + higher y1 than y2 or higher x1 than x2 in the anchor, you might need to + reverse them and draw shapes vertically or horizontally flipped! + + the client anchor describes how this Group is attached + to the sheet. + the newly created shape. + + + + Creates a picture. + + the client anchor describes how this Group is attached + to the sheet. + Index of the picture. + the newly created shape. + + + + CreatePicture + + the client anchor describes how this picture is attached to the sheet. + the index of the picture in the workbook collection of pictures. + return newly created shape + + + Adds a new OLE Package Shape + + @param anchor the client anchor describes how this picture is + attached to the sheet. + @param storageId the storageId returned by {@Link HSSFWorkbook.AddOlePackage} + @param pictureIndex the index of the picture (used as preview image) in the + workbook collection of pictures. + + @return newly Created shape + + + + Creates a polygon + + the client anchor describes how this Group is attached + to the sheet. + the newly Created shape. + + + + Constructs a textbox Under the patriarch. + + the client anchor describes how this Group is attached + to the sheet. + the newly Created textbox. + + + Constructs a cell comment. + + @param anchor the client anchor describes how this comment is attached + to the sheet. + @return the newly created comment. + + + YK: used to create autofilters + + @see org.apache.poi.hssf.usermodel.HSSFSheet#setAutoFilter(int, int, int, int) + + + + Constructs a cell comment. + + the client anchor describes how this comment is attached + to the sheet. + the newly created comment. + + + + Returns a list of all shapes contained by the patriarch. + + The children. + + + add a shape to this drawing + + + + Total count of all children and their children's children. + + The count of all children. + + + + Sets the coordinate space of this Group. All children are contrained + to these coordinates. + + The x1. + The y1. + The x2. + The y2. + + + + Does this HSSFPatriarch contain a chart? + (Technically a reference to a chart, since they + Get stored in a different block of records) + FIXME - detect chart in all cases (only seems + to work on some charts so far) + + + true if this instance contains chart; otherwise, false. + + + + + The top left x coordinate of this Group. + + The x1. + + + + The top left y coordinate of this Group. + + The y1. + + + + The bottom right x coordinate of this Group. + + The x2. + + + + The bottom right y coordinate of this Group. + + The y2. + + + + Returns the aggregate escher record we're bound to + + + + + Creates a new client anchor and sets the top-left and bottom-right + coordinates of the anchor. + + @param dx1 the x coordinate in EMU within the first cell. + @param dy1 the y coordinate in EMU within the first cell. + @param dx2 the x coordinate in EMU within the second cell. + @param dy2 the y coordinate in EMU within the second cell. + @param col1 the column (0 based) of the first cell. + @param row1 the row (0 based) of the first cell. + @param col2 the column (0 based) of the second cell. + @param row2 the row (0 based) of the second cell. + @return the newly created client anchor + + + create shape tree from existing escher records tree + + + + High level representation for Conditional Formatting Settings + @author Dmitriy Kumshayev + + + + + Initializes a new instance of the class. + + The cf rule record. + + + + Gets the pattern formatting block. + + The pattern formatting block. + + + + Gets or sets the color of the fill background. + + The color of the fill background. + + + + Gets or sets the color of the fill foreground. + + The color of the fill foreground. + + + + Gets or sets the fill pattern. + + The fill pattern. + + + + Represents a escher picture. Eg. A GIF, JPEG etc... + @author Glen Stampoultzis + @author Yegor Kozlov (yegor at apache.org) + + + + + Constructs a picture object. + + The parent. + The anchor. + + + + Reset the image to the dimension of the embedded image + + + Please note, that this method works correctly only for workbooks + with default font size (Arial 10pt for .xls). + If the default font is changed the resized image can be streched vertically or horizontally. + + + + + Resize the image proportionally. + + scale + + + + Resize the image +

    + Please note, that this method works correctly only for workbooks + with default font size (Arial 10pt for .xls). + If the default font is changed the resized image can be streched vertically or horizontally. +

    +

    + resize(1.0,1.0) keeps the original size,
    + resize(0.5,0.5) resize to 50% of the original,
    + resize(2.0,2.0) resizes to 200% of the original.
    + resize({@link Double#MAX_VALUE},{@link Double#MAX_VALUE}) resizes to the dimension of the embedded image. +

    + + @param scaleX the amount by which the image width is multiplied relative to the original width. + @param scaleY the amount by which the image height is multiplied relative to the original height. +
    + + + Gets or sets the index of the picture. + + The index of the picture. + + + Calculate the preferred size for this picture. + + @param scale the amount by which image dimensions are multiplied relative to the original size. + @return HSSFClientAnchor with the preferred size for this image + @since POI 3.0.2 + + + + Calculate the preferred size for this picture. + + the amount by which image width is multiplied relative to the original width. + the amount by which image height is multiplied relative to the original height. + HSSFClientAnchor with the preferred size for this image + + + + Calculate the preferred size for this picture. + + HSSFClientAnchor with the preferred size for this image + + + + The metadata of PNG and JPEG can contain the width of a pixel in millimeters. + Return the the "effective" dpi calculated as + 25.4/HorizontalPixelSize + and + 25.4/VerticalPixelSize + . Where 25.4 is the number of mm in inch. + + The image. + the resolution + + + + Return the dimension of the embedded image in pixel + + image dimension + + + Return picture data for this shape + + @return picture data for this shape + + + The color applied to the lines of this shape. + + + @return the anchor that is used by this picture. + + + @return the sheet which contains the picture shape + + + + Represents binary data stored in the file. Eg. A GIF, JPEG etc... + @author Daniel Noll + + + + Underlying escher blip record containing the bitmap data. + + + + Constructs a picture object. + + the underlying blip record containing the bitmap data. + + + + Gets the picture data. + + the picture data. + + + + gets format of the picture. + + The format. + + + + Suggests a file extension for this image. + + the file extension. + + + Returns the mime type for the image + + + @return the POI internal image type, -1 if not unknown image type + + @see Workbook#PICTURE_TYPE_DIB + @see Workbook#PICTURE_TYPE_EMF + @see Workbook#PICTURE_TYPE_JPEG + @see Workbook#PICTURE_TYPE_PICT + @see Workbook#PICTURE_TYPE_PNG + @see Workbook#PICTURE_TYPE_WMF + + + + @author Glen Stampoultzis (glens at baselinksoftware.com) + + + + Generates the shape records for this shape. + + + Creates the low level OBJ record for this shape. + + + @return array of x coordinates + + + @return array of y coordinates + + + @param xPoints - array of x coordinates + @param yPoints - array of y coordinates + + + Defines the width and height of the points in the polygon + @param width + @param height + + + @return shape width + + + @return shape height + + + + Used to modify the print Setup. + @author Shawn Laubach (slaubach at apache dot org) + + + + + Initializes a new instance of the class. + + Takes the low level print Setup record. + + + + Gets or sets the size of the paper. + + The size of the paper. + + + + Gets or sets the scale. + + The scale. + + + + Gets or sets the page start. + + The page start. + + + + Gets or sets the number of pages wide to fit sheet in. + + the number of pages wide to fit sheet in + + + + Gets or sets number of pages high to fit the sheet in + + number of pages high to fit the sheet in. + + + + Gets or sets the bit flags for the options. + + the bit flags for the options. + + + + Gets or sets the left to right print order. + + the left to right print order. + + + + Gets or sets the landscape mode. + + the landscape mode. + + + + Gets or sets the valid Settings. + + the valid Settings. + + + + Gets or sets the black and white Setting. + + black and white Setting + + + + Gets or sets the draft mode. + + the draft mode. + + + + Gets or sets the print notes. + + the print notes. + + + + Gets or sets a value indicating whether [no orientation]. + + true if [no orientation]; otherwise, false. + + + + Gets or sets the use page numbers. + + use page numbers. + + + + Gets or sets the horizontal resolution. + + the horizontal resolution. + + + + Gets or sets the vertical resolution. + + the vertical resolution. + + + + Gets or sets the header margin. + + The header margin. + + + + Gets or sets the footer margin. + + The footer margin. + + + + Gets or sets the number of copies. + + the number of copies. + + + + Rich text Unicode string. These strings can have fonts applied to + arbitary parts of the string. + @author Glen Stampoultzis (glens at apache.org) + @author Jason Height (jheight at apache.org) + + + + Place holder for indicating that NO_FONT has been applied here + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The string. + + + + Initializes a new instance of the class. + + The workbook. + The record. + + + + This must be called to Setup the internal work book references whenever + a RichTextString Is Added to a cell + + The workbook. + The record. + + + + Called whenever the Unicode string Is modified. When it Is modified + we need to Create a new SST index, so that other LabelSSTRecords will not + be affected by Changes tat we make to this string. + + + + + + Adds to SST if required. + + + + + Applies a font to the specified Chars of a string. + + The start index to apply the font to (inclusive). + The end index to apply the font to (exclusive). + The font to use. + + + + Applies a font to the specified Chars of a string. + + The start index to apply the font to (inclusive). + The end index to apply to font to (exclusive). + The index of the font to use. + + + + Sets the font of the entire string. + + The font to use. + + + + Removes any formatting that may have been applied to the string. + + + + + Returns the plain string representation. + + The string. + + + + Returns the raw, probably shared Unicode String. + Used when tweaking the styles, eg updating font + positions. + Changes to this string may well effect + other RichTextStrings too! + + The raw unicode string. + + + + Gets or sets the unicode string. + + The unicode string. + + + + Gets the number of Chars in the font.. + + The length. + + + + Returns the font in use at a particular index. + + The index. + The font that's currently being applied at that + index or null if no font Is being applied or the + index Is out of range. + + + + Gets the number of formatting runs used. There will always be at + least one of font NO_FONT. + + The num formatting runs. + + + + The index within the string to which the specified formatting run applies. + + the index of the formatting run + the index within the string. + + + + Gets the font used in a particular formatting run. + + the index of the formatting run. + the font number used. + + + + Compares one rich text string to another. + + The other rich text string. + + + + + Equalses the specified o. + + The o. + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Applies the specified font to the entire string. + + Index of the font to apply. + + + + High level representation of a row of a spReadsheet. + Only rows that have cells should be Added to a Sheet. + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + + + + + used for collections + + + + reference to low level representation + + + reference to containing low level Workbook + + + reference to containing Sheet + + + + Creates new HSSFRow from scratch. Only HSSFSheet should do this. + + low-level Workbook object containing the sheet that Contains this row + low-level Sheet object that Contains this Row + the row number of this row (0 based) + + + + + Creates an HSSFRow from a low level RowRecord object. Only HSSFSheet should do + this. HSSFSheet uses this when an existing file is Read in. + + low-level Workbook object containing the sheet that Contains this row + low-level Sheet object that Contains this Row + the low level api object this row should represent + + + + + Use this to create new cells within the row and return it. + The cell that is returned is a CELL_TYPE_BLANK (/). + The type can be changed either through calling SetCellValue or SetCellType. + + the column number this cell represents + a high level representation of the created cell. + + + + Use this to create new cells within the row and return it. + The cell that is returned is a CELL_TYPE_BLANK. The type can be changed + either through calling setCellValue or setCellType. + + the column number this cell represents + a high level representation of the created cell. + + + + + Remove the Cell from this row. + + The cell to Remove. + + + + Removes the cell. + + The cell. + if set to true [also remove records]. + + + used internally to refresh the "last cell plus one" when the last cell is removed. + @return 0 when row contains no cells + + + used internally to refresh the "first cell" when the first cell is removed. + @return 0 when row contains no cells (also when first cell is occupied) + + + + Create a high level Cell object from an existing low level record. Should + only be called from HSSFSheet or HSSFRow itself. + + The low level cell to Create the high level representation from + the low level record passed in + + + + true, when the row is invisible. This is the case when the height is zero. + + + + + Removes all the cells from the row, and their + records too. + + + + + Get row number this row represents + + the row number (0 based) + + + + Returns the rows outline level. Increased as you + put it into more Groups (outlines), reduced as + you take it out of them. + + The outline level. + + + + Moves the supplied cell to a new column, which + must not already have a cell there! + + The cell to move + The new column number (0 based) + + + Returns the HSSFSheet this row belongs to + + @return the HSSFSheet that owns this row + + + + used internally to Add a cell. + + The cell. + + + + Get the hssfcell representing a given column (logical cell) + 0-based. If you ask for a cell that is not defined, then + you Get a null. + This is the basic call, with no policies applied + + 0 based column number + Cell representing that column or null if Undefined. + + + + Get the hssfcell representing a given column (logical cell) + 0-based. If you ask for a cell that is not defined then + you get a null, unless you have set a different + MissingCellPolicy on the base workbook. + + 0 based column number + Cell representing that column or null if undefined. + + + + Get the hssfcell representing a given column (logical cell) + 0-based. If you ask for a cell that is not defined, then + your supplied policy says what to do + + 0 based column number + Policy on blank / missing cells + that column or null if Undefined + policy allows. + + + + Get the number of the first cell contained in this row. + + the first logical cell in the row, or -1 if the row does not contain any cells. + + + + Gets the index of the last cell contained in this row PLUS ONE + . The result also happens to be the 1-based column number of the last cell. This value can be used as a + standard upper bound when iterating over cells: + + + short representing the last logical cell in the row PLUS ONE, or -1 if the + row does not contain any cells. + + + short minColIx = row.GetFirstCellNum(); + short maxColIx = row.GetLastCellNum(); + for(short colIx=minColIx; colIx<maxColIx; colIx++) { + Cell cell = row.GetCell(colIx); + if(cell == null) { + continue; + } + //... do something with cell + } + + + + + Gets the number of defined cells (NOT number of cells in the actual row!). + That is to say if only columns 0,4,5 have values then there would be 3. + + the number of defined cells in the row. + + + + Gets or sets whether or not to Display this row with 0 height + + height is zero or not. + + + + Get or sets the row's height or ff (-1) for undefined/default-height in twips (1/20th of a point) + + rowheight or 0xff for Undefined (use sheet default) + + + + is this row formatted? Most aren't, but some rows + do have whole-row styles. For those that do, you + can get the formatting from {@link #getRowStyle()} + + + true if this instance is formatted; otherwise, false. + + + + + Returns the whole-row cell styles. Most rows won't + have one of these, so will return null. Call IsFormmated to check first + + The row style. + + + + Get the row's height or ff (-1) for Undefined/default-height in points (20*Height) + + row height or 0xff for Undefined (use sheet default). + + + + Get the lowlevel RowRecord represented by this object - should only be called + by other parts of the high level API + + RowRecord this row represents + + + + used internally to refresh the "first cell" when the first cell is Removed. + + The first cell index. + + + + + Get cells in the row (existing cells only, no blanks) + + + + + Gets the cell enumerator of the physically defined cells. + + + Note that the 4th element might well not be cell 4, as the iterator + will not return Un-defined (null) cells. + Call CellNum on the returned cells to know which cell they are. + + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: + Value + Meaning + Less than zero + This instance is less than . + Zero + This instance is equal to . + Greater than zero + This instance is greater than . + + + is not the same type as this instance. + + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + + Returns a hash code. In this case it is the number of the row. + + + + + An abstract shape. + + Note: Microsoft Excel seems to sometimes disallow + higher y1 than y2 or higher x1 than x2 in the anchor, you might need to + reverse them and draw shapes vertically or horizontally flipped! + + + + creates shapes from existing file + @param spContainer + @param objRecord + + + + Create a new shape with the specified parent and anchor. + + The parent. + The anchor. + + + + Gets the parent shape. + + The parent. + + + + Gets or sets the anchor that is used by this shape. + + The anchor. + + + + The color applied to the lines of this shape. + + The color of the line style. + + + + Sets the color applied to the lines of this shape + + The red. + The green. + The blue. + + + + Gets or sets the color used to fill this shape. + + The color of the fill. + + + + Sets the color used to fill this shape. + + The red. + The green. + The blue. + + + + Gets or sets with width of the line in EMUs. 12700 = 1 pt. + + The width of the line. + + + + Gets or sets One of the constants in LINESTYLE_* + + The line style. + + + + Gets or sets a value indicating whether this instance is no fill. + + + true if this shape Is not filled with a color; otherwise, false. + + + + + whether this shape is vertically flipped. + + + + + whether this shape is horizontally flipped. + + + + + get or set the rotation, in degrees, that is applied to a shape. + Negative values specify rotation in the counterclockwise direction. + Rotation occurs around the center of the shape. + The default value for this property is 0x00000000 + + + + + Count of all children and their childrens children. + + The count of all children. + + + + An interface that indicates whether a class can contain children. + @author Glen Stampoultzis (glens at apache.org) + + + + + Gets Any children contained by this shape. + + The children. + + + + dd shape to the list of child records + + shape + + + + set coordinates of this group relative to the parent + + x1 + y1 + x2 + y2 + + + + Get the top left x coordinate of this group. + + + + + Get the top left y coordinate of this group. + + + + + Get the bottom right x coordinate of this group. + + + + + Get the bottom right y coordinate of this group. + + + + remove first level shapes + @param shape to be removed + @return true if shape is removed else return false + + + + A shape Group may contain other shapes. It was no actual form on the + sheet. + @author Glen Stampoultzis (glens at apache.org) + + + + + Create another Group Under this Group. + + the position of the new Group. + the Group + + + + Create a new simple shape Under this Group. + + the position of the shape. + the shape + + + + Create a new textbox Under this Group. + + the position of the shape. + the textbox + + + + Creates a polygon + + the client anchor describes how this Group Is attached + to the sheet. + the newly Created shape. + + + + Creates a picture. + + the client anchor describes how this Group Is attached + to the sheet. + Index of the picture. + the newly Created shape. + + + + Return all children contained by this shape. + + + + + + Sets the coordinate space of this Group. All children are constrained + to these coordinates. + + The x1. + The y1. + The x2. + The y2. + + + + Gets The top left x coordinate of this Group. + + The x1. + + + + Gets The top left y coordinate of this Group. + + The y1. + + + + Gets The bottom right x coordinate of this Group. + + The x2. + + + + Gets the bottom right y coordinate of this Group. + + The y2. + + + + Count of all children and their childrens children. + + + + + + High level representation of a worksheet. + + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Libin Roman (romal at vistaportal.com) + @author Shawn Laubach (slaubach at apache dot org) (Just a little) + @author Jean-Pierre Paris (jean-pierre.paris at m4x dot org) (Just a little, too) + @author Yegor Kozlov (yegor at apache.org) (Autosizing columns) + + + + width of 1px in columns with default width in units of 1/256 of a character width + + + width of 1px in columns with overridden width in units of 1/256 of a character width + + + Used for compile-time optimization. This is the initial size for the collection of + rows. It is currently Set to 20. If you generate larger sheets you may benefit + by Setting this to a higher number and recompiling a custom edition of HSSFSheet. + + + reference to the low level Sheet object + + + + Creates new HSSFSheet - called by HSSFWorkbook to create a _sheet from + scratch. You should not be calling this from application code (its protected anyhow). + + The HSSF Workbook object associated with the _sheet. + + + + + Creates an HSSFSheet representing the given Sheet object. Should only be + called by HSSFWorkbook when reading in an exisiting file. + + The HSSF Workbook object associated with the _sheet. + lowlevel Sheet object this _sheet will represent + + + + + Clones the _sheet. + + The _workbook. + the cloned sheet + + + + Copy one row to the target row + + index of the source row + index of the target row + + + + used internally to Set the properties given a Sheet object + + The _sheet. + + + Gets the flag indicating whether the window should show 0 (zero) in cells containing zero value. + When false, cells with zero value appear blank instead of showing the number zero. + In Excel 2003 this option can be changed in the Options dialog on the View tab. + @return whether all zero values on the worksheet are displayed + + + + Create a new row within the _sheet and return the high level representation + + The row number. + + @see org.apache.poi.hssf.usermodel.HSSFRow + @see #RemoveRow(HSSFRow) + + + + Used internally to Create a high level Row object from a low level row object. + USed when Reading an existing file + + low level record to represent as a high level Row and Add to _sheet. + HSSFRow high level representation + + + + Remove a row from this _sheet. All cells contained in the row are Removed as well + + the row to Remove. + + + + used internally to refresh the "last row" when the last row is Removed. + + The last row. + + + + + used internally to refresh the "first row" when the first row is Removed. + + The first row. + + + + Add a row to the _sheet + + @param AddLow whether to Add the row to the low level model - false if its already there + + + + Returns the HSSFCellStyle that applies to the given + (0 based) column, or null if no style has been + set for that column + + The column. + + + + + Returns the logical row (not physical) 0-based. If you ask for a row that is not + defined you get a null. This is to say row 4 represents the fifth row on a _sheet. + + Index of the row to get. + the row number or null if its not defined on the _sheet + + + + Returns the number of phsyically defined rows (NOT the number of rows in the _sheet) + + The physical number of rows. + + + + Gets the first row on the _sheet + + the number of the first logical row on the _sheet + + + + Gets the last row on the _sheet + + last row contained n this _sheet. + + + + Creates a data validation object + + The data validation object settings + + + + Get the visibility state for a given column.F:\Gloria\�о�\�ļ���ʽ\NPOI\src\NPOI\HSSF\Util\HSSFDataValidation.cs + + the column to Get (0-based). + the visiblity state of the column. + + + + Get the hidden state for a given column. + + the column to Set (0-based) + the visiblity state of the column; + + + + + Set the width (in Units of 1/256th of a Char width) + + the column to Set (0-based) + the width in Units of 1/256th of a Char width + + + + Get the width (in Units of 1/256th of a Char width ) + + the column to Set (0-based) + the width in Units of 1/256th of a Char width + + + + Gets or sets the default width of the column. + + The default width of the column. + + + + Get the default row height for the _sheet (if the rows do not define their own height) in + twips (1/20 of a point) + + The default height of the row. + + + + Get the default row height for the _sheet (if the rows do not define their own height) in + points. + + The default row height in points. + + + + Get whether gridlines are printed. + + + true if printed; otherwise, false. + + + + + Adds a merged region of cells on a sheet. + + region to merge + index of this region + if region contains fewer than 2 cells + if region intersects with an existing merged region + or multi-cell array formula on this sheet + + + + Adds a merged region of cells (hence those cells form one). + Skips validation. It is possible to create overlapping merged regions + or create a merged region that intersects a multi-cell array formula + with this formula, which may result in a corrupt workbook. + + To check for merged regions overlapping array formulas or other merged regions + after addMergedRegionUnsafe has been called, call {@link #validateMergedRegions()}, which runs in O(n^2) time. + + region to merge + index of this region + if region contains fewer than 2 cells + + + + Verify that merged regions do not intersect multi-cell array formulas and + no merged regions intersect another merged region in this sheet. + + if region intersects with an existing merged region + or multi-cell array formula on this sheet + + + + adds a merged region of cells (hence those cells form one) + + region (rowfrom/colfrom-rowto/colto) to merge + whether to validate merged region + index of this region + if region contains fewer than 2 cells + if region intersects with an existing merged region + or multi-cell array formula on this sheet + + + + Verify that none of the merged regions intersect a multi-cell array formula in this sheet + + if candidate region intersects an existing array formula in this sheet + + + + Verify that no merged regions intersect another merged region in this sheet. + + if at least one region intersects with another merged region in this sheet + + + + Whether a record must be Inserted or not at generation to indicate that + formula must be recalculated when _workbook is opened. + + + true if [force formula recalculation]; otherwise, false. + + @return true if an Uncalced record must be Inserted or not at generation + + + + Determine whether printed output for this _sheet will be vertically centered. + + true if [vertically center]; otherwise, false. + + + + Determine whether printed output for this _sheet will be horizontally centered. + + true if [horizontally center]; otherwise, false. + + + + Removes a merged region of cells (hence letting them free) + + index of the region to Unmerge + + + + Removes a number of merged regions of cells (hence letting them free) + + A set of the regions to unmerge + + + + returns the number of merged regions + + The number of merged regions + + + + Gets the row enumerator. + + + an iterator of the PHYSICAL rows. Meaning the 3rd element may not + be the third row if say for instance the second row is undefined. + Call on each row + if you care which one it is. + + + + + Alias for GetRowEnumerator() to allow foreach loops. + + + an iterator of the PHYSICAL rows. Meaning the 3rd element may not + be the third row if say for instance the second row is undefined. + Call on each row + if you care which one it is. + + + + + used internally in the API to Get the low level Sheet record represented by this + Object. + + low level representation of this HSSFSheet. + + + + Sets the active cell. + + The row. + The column. + + + + Sets the active cell range. + + The first row. + The last row. + The first column. + The last column. + + + + Sets the active cell range. + + The cellranges. + The index of the active range. + The active row in the active range + The active column in the active range + + + + Gets or sets whether alternate expression evaluation is on + + + true if [alternative expression]; otherwise, false. + + + + + whether alternative formula entry is on + + true alternative formulas or not; otherwise, false. + + + + show automatic page breaks or not + + whether to show auto page breaks + + + + Gets or sets a value indicating whether _sheet is a dialog _sheet + + true if is dialog; otherwise, false. + + + + Gets or sets a value indicating whether to Display the guts or not. + + true if guts or no guts (or glory); otherwise, false. + + + + Gets or sets a value indicating whether fit to page option is on + + true if [fit to page]; otherwise, false. + + + + Get if row summaries appear below detail in the outline + + true if below or not; otherwise, false. + + + + Get if col summaries appear right of the detail in the outline + + true right or not; otherwise, false. + + + + Gets or sets whether gridlines are printed. + + + true Gridlines are printed; otherwise, false. + + + + + get or set whether row and column headings are printed. + + row and column headings are printed + + + + Gets the print setup object. + + The user model for the print setup object. + + + + Gets the user model for the document header. + + The Document header. + + + + Gets the user model for the document footer. + + The Document footer. + + + + Gets or sets whether the worksheet is displayed from right to left instead of from left to right. + + true for right to left, false otherwise + poi bug 47970 + + + + Note - this is not the same as whether the _sheet is focused (isActive) + + + true if this _sheet is currently selected; otherwise, false. + + + + + Gets or sets a value indicating if this _sheet is currently focused. + + true if this _sheet is currently focused; otherwise, false. + + + + Sets whether sheet is selected. + + Whether to select the sheet or deselect the sheet. + + + + Answer whether protection is enabled or disabled + + true if protection enabled; otherwise, false. + + + + Gets the hashed password + + The password. + + + + Answer whether object protection is enabled or disabled + + true if protection enabled; otherwise, false. + + + + Answer whether scenario protection is enabled or disabled + + true if protection enabled; otherwise, false. + + + + Sets the protection enabled as well as the password + + password to set for protection, pass null to remove protection + + + + Sets the zoom magnication for the _sheet. The zoom is expressed as a + fraction. For example to express a zoom of 75% use 3 for the numerator + and 4 for the denominator. + + The numerator for the zoom magnification. + The denominator for the zoom magnification. + + + Window zoom magnification for current view representing percent values. + Valid values range from 10 to 400. Horizontal & Vertical scale together. + + For example: +
    +             10 - 10%
    +             20 - 20%
    +             ...
    +             100 - 100%
    +             ...
    +             400 - 400%
    +             
    + + @param scale window zoom magnification + @throws IllegalArgumentException if scale is invalid +
    + + + Sets the enclosed border of region. + + The region. + Type of the border. + The color. + + + + Sets the right border of region. + + The region. + Type of the border. + The color. + + + + Sets the left border of region. + + The region. + Type of the border. + The color. + + + + Sets the top border of region. + + The region. + Type of the border. + The color. + + + + Sets the bottom border of region. + + The region. + Type of the border. + The color. + + + + The top row in the visible view when the _sheet is + first viewed after opening it in a viewer + + the rownum (0 based) of the top row + + + + The left col in the visible view when the _sheet Is + first viewed after opening it in a viewer + + the rownum (0 based) of the top row + + + Sets desktop window pane display area, when the + file is first opened in a viewer. + + @param toprow the top row to show in desktop window pane + @param leftcol the left column to show in desktop window pane + + + + Sets desktop window pane display area, when the + file is first opened in a viewer. + + the top row to show in desktop window pane + the left column to show in desktop window pane + + + + Shifts the merged regions left or right depending on mode + TODO: MODE , this is only row specific + + The start row. + The end row. + The n. + if set to true [is row]. + + + + Shifts rows between startRow and endRow n number of rows. + If you use a negative number, it will Shift rows up. + Code Ensures that rows don't wrap around. + Calls ShiftRows(startRow, endRow, n, false, false); + Additionally Shifts merged regions that are completely defined in these + rows (ie. merged 2 cells on a row to be Shifted). + + the row to start Shifting + the row to end Shifting + the number of rows to Shift + + + + Shifts rows between startRow and endRow n number of rows. + If you use a negative number, it will shift rows up. + Code ensures that rows don't wrap around + Additionally shifts merged regions that are completely defined in these + rows (ie. merged 2 cells on a row to be shifted). + TODO Might want to add bounds checking here + + the row to start shifting + the row to end shifting + the number of rows to shift + whether to copy the row height during the shift + whether to set the original row's height to the default + + + + Shifts rows between startRow and endRow n number of rows. + If you use a negative number, it will Shift rows up. + Code Ensures that rows don't wrap around + Additionally Shifts merged regions that are completely defined in these + rows (ie. merged 2 cells on a row to be Shifted). + TODO Might want to Add bounds Checking here + + the row to start Shifting + the row to end Shifting + the number of rows to Shift + whether to copy the row height during the Shift + whether to Set the original row's height to the default + if set to true [move comments]. + + + + Inserts the chart records. + + The records. + + + + Creates a split (freezepane). Any existing freezepane or split pane is overwritten. + + Horizonatal position of split. + Vertical position of split. + Top row visible in bottom pane + Left column visible in right pane. + + + + Creates a split (freezepane). Any existing freezepane or split pane is overwritten. + + Horizonatal position of split. + Vertical position of split. + + + + Creates a split pane. Any existing freezepane or split pane is overwritten. + + Horizonatal position of split (in 1/20th of a point). + Vertical position of split (in 1/20th of a point). + Left column visible in right pane. + Top row visible in bottom pane. + Active pane. One of: PANE_LOWER_RIGHT,PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT + + + + Returns the information regarding the currently configured pane (split or freeze). + + null if no pane configured, or the pane information. + + + + Gets or sets if gridlines are Displayed. + + whether gridlines are Displayed + + + + Gets or sets a value indicating whether formulas are displayed. + + whether formulas are Displayed + + + + Gets or sets a value indicating whether RowColHeadings are displayed. + + + whether RowColHeadings are displayed + + + + + Gets the size of the margin in inches. + + which margin to get. + the size of the margin + + + + Sets the size of the margin in inches. + + which margin to get. + the size of the margin + + + + Sets a page break at the indicated row + + The row. + + + + Determines if there is a page break at the indicated row + + The row. + + true if [is row broken] [the specified row]; otherwise, false. + + + + + Removes the page break at the indicated row + + The row. + + + + Retrieves all the horizontal page breaks + + all the horizontal page breaks, or null if there are no row page breaks + + + + Retrieves all the vertical page breaks + + all the vertical page breaks, or null if there are no column page breaks + + + + Sets a page break at the indicated column + + The column. + + + + Determines if there is a page break at the indicated column + + The column. + + true if [is column broken] [the specified column]; otherwise, false. + + + + + Removes a page break at the indicated column + + The column. + + + + Runs a bounds Check for row numbers + + The row. + + + + Runs a bounds Check for column numbers + + The column. + + + + Aggregates the drawing records and dumps the escher record hierarchy + to the standard output. + + if set to true [fat]. + + + + Returns the agregate escher records for this _sheet, + it there is one. + WARNING - calling this will trigger a parsing of the + associated escher records. Any that aren't supported + (such as charts and complex drawing types) will almost + certainly be lost or corrupted when written out. + + The drawing escher aggregate. + + + This will hold any graphics or charts for the sheet. + + @return the top-level drawing patriarch, if there is one, else returns null + + + Creates the top-level drawing patriarch. This will have + the effect of removing any existing drawings on this + sheet. + This may then be used to add graphics or charts + + @return The new patriarch. + + + + Gets or sets the tab color of the _sheet + + + + + Gets or sets whether the tab color of _sheet is automatic + + + + + Expands or collapses a column Group. + + One of the columns in the Group. + true = collapse Group, false = expand Group. + + + + Create an outline for the provided column range. + + beginning of the column range. + end of the column range. + + + + Ungroups the column. + + From column. + To column. + + + + Groups the row. + + From row. + To row. + + + + Remove a Array Formula from this sheet. All cells contained in the Array Formula range are removed as well + + any cell within Array Formula range + the of cells affected by this change + + + + Also creates cells if they don't exist. + + + + + Sets array formula to specified region for result. + + text representation of the formula + Region of array formula for result + the of cells affected by this change + + + + Ungroups the row. + + From row. + To row. + + + + Sets the row group collapsed. + + The row. + if set to true [collapse]. + + + + Sets the default column style for a given column. POI will only apply this style to new cells Added to the _sheet. + + the column index + the style to set + + + + Adjusts the column width to fit the contents. + This Process can be relatively slow on large sheets, so this should + normally only be called once per column, at the end of your + Processing. + + the column index. + + + + Adjusts the column width to fit the contents. + This Process can be relatively slow on large sheets, so this should + normally only be called once per column, at the end of your + Processing. + You can specify whether the content of merged cells should be considered or ignored. + Default is to ignore merged cells. + + the column index + whether to use the contents of merged cells when calculating the width of the column + + + + Checks if the provided region is part of the merged regions. + + Region searched in the merged regions + true, when the region is contained in at least one of the merged regions + + + + Gets the merged region at the specified index + + The index. + + + + + get the list of merged regions + + return the list of merged regions + + + + Convert HSSFFont to Font. + + The font. + + + + + Returns cell comment for the specified row and column + + The row. + The column. + cell comment or null if not found + + + + Returns cell comment for the specified row and column + + cell location + return cell comment or null if not found + + + + Get a Hyperlink in this sheet anchored at row, column + + The index of the row of the hyperlink, zero-based + the index of the column of the hyperlink, zero-based + return hyperlink if there is a hyperlink anchored at row, column; otherwise returns null + + + + Get a Hyperlink in this sheet located in a cell specified by {code addr} + + The address of the cell containing the hyperlink + return hyperlink if there is a hyperlink anchored at {@code addr}; otherwise returns {@code null} + + + Get a list of Hyperlinks in this sheet + + @return Hyperlinks for the sheet + + + Remove the underlying HyperlinkRecord from this sheet. + If multiple HSSFHyperlinks refer to the same HyperlinkRecord, all HSSFHyperlinks will be removed. + + @param link the HSSFHyperlink wrapper around the HyperlinkRecord to remove + + + Remove the underlying HyperlinkRecord from this sheet + + @param link the underlying HyperlinkRecord to remove from this sheet + + + + Gets the sheet conditional formatting. + + The sheet conditional formatting. + + + + Get the DVRecords objects that are associated to this _sheet + + a list of DVRecord instances + + + + Provide a reference to the parent workbook. + + + + + Returns the name of this _sheet + + + + + Create an instance of a DataValidationHelper. + + Instance of a DataValidationHelper + + + + Enable filtering for a range of cells + + the range of cells to filter + + + + Returns all cell comments on this sheet. + + return A Dictionary of each Comment in the sheet, keyed on the cell address where the comment is located. + + + Finds all cell comments in this sheet and adds them to the specified locations map + + @param container a container that may contain HSSFComments + @param locations the map to store the HSSFComments in + + + + Returns the column outline level. Increased as you + put it into more groups (outlines), reduced as + you take it out of them. + + + + + + + The Conditional Formatting facet of HSSFSheet + @author Dmitriy Kumshayev + + + + + A factory method allowing to Create a conditional formatting rule + with a cell comparison operator + TODO - formulas containing cell references are currently not Parsed properly + + a constant value from HSSFConditionalFormattingRule.ComparisonOperator + formula for the valued, Compared with the cell + second formula (only used with HSSFConditionalFormattingRule#COMPARISON_OPERATOR_BETWEEN + and HSSFConditionalFormattingRule#COMPARISON_OPERATOR_NOT_BETWEEN operations) + + + + + A factory method allowing to Create a conditional formatting rule with a formula. + The formatting rules are applied by Excel when the value of the formula not equal to 0. + TODO - formulas containing cell references are currently not Parsed properly + + formula for the valued, Compared with the cell + + + + A factory method allowing the creation of conditional formatting + rules using an Icon Set / Multi-State formatting. + The thresholds for it will be created, but will be empty + and require configuring with + {@link HSSFConditionalFormattingRule#getMultiStateFormatting()} + then + {@link HSSFIconMultiStateFormatting#getThresholds()} + + + + + + Adds a copy of HSSFConditionalFormatting object to the sheet + This method could be used to copy HSSFConditionalFormatting object + from one sheet to another. + + HSSFConditionalFormatting object + index of the new Conditional Formatting object + + HSSFConditionalFormatting cf = sheet.GetConditionalFormattingAt(index); + newSheet.AddConditionalFormatting(cf); + + + + + Allows to Add a new Conditional Formatting Set to the sheet. + + list of rectangular regions to apply conditional formatting rules + Set of up to three conditional formatting rules + index of the newly Created Conditional Formatting object + + + + Adds the conditional formatting. + + The regions. + The rule1. + + + + + Adds the conditional formatting. + + The regions. + The rule1. + The rule2. + + + + + Gets Conditional Formatting object at a particular index + @param index + of the Conditional Formatting object to fetch + + Conditional Formatting object + + + + + the number of Conditional Formatting objects of the sheet + + The num conditional formattings. + + + + Removes a Conditional Formatting object by index + + index of a Conditional Formatting object to Remove + + + + Represents a simple shape such as a line, rectangle or oval. + @author Glen Stampoultzis (glens at apache.org) + + + + + Initializes a new instance of the class. + + The parent. + The anchor. + + + + Gets the shape type. + + One of the OBJECT_TYPE_* constants. + @see #OBJECT_TYPE_LINE + @see #OBJECT_TYPE_OVAL + @see #OBJECT_TYPE_RECTANGLE + @see #OBJECT_TYPE_PICTURE + @see #OBJECT_TYPE_COMMENT + + + + Get or set the rich text string used by this object. + + + + + A textbox Is a shape that may hold a rich text string. + @author Glen Stampoultzis (glens at apache.org) + + + + + Construct a new textbox with the given parent and anchor. + + The parent. + One of HSSFClientAnchor or HSSFChildAnchor + + + + Gets or sets the left margin within the textbox. + + The margin left. + + + + Gets or sets the right margin within the textbox. + + The margin right. + + + + Gets or sets the top margin within the textbox + + The top margin. + + + + Gets or sets the bottom margin within the textbox. + + The margin bottom. + + + + Gets or sets the horizontal alignment. + + The horizontal alignment. + + + + Gets or sets the vertical alignment. + + The vertical alignment. + + + + High level representation of a workbook. This is the first object most users + will construct whether they are reading or writing a workbook. It is also the + top level object for creating new sheets/etc. + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Shawn Laubach (slaubach at apache dot org) + + + The maximum number of cell styles in a .xls workbook. + The 'official' limit is 4,000, but POI allows a slightly larger number. + This extra delta takes into account built-in styles that are automatically + created for new workbooks + + See http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP005199291.aspx + + + used for compile-time performance/memory optimization. This determines the + initial capacity for the sheet collection. Its currently Set to 3. + Changing it in this release will decrease performance + since you're never allowed to have more or less than three sheets! + + + this Is the reference to the low level Workbook object + + + this holds the HSSFSheet objects attached to this workbook + + + this holds the HSSFName objects attached to this workbook + + + holds whether or not to preserve other nodes in the POIFS. Used + for macros and embedded objects. + + + Used to keep track of the data formatter so that all + CreateDataFormatter calls return the same one for a given + book. This Ensures that updates from one places Is visible + someplace else. + + + this holds the HSSFFont objects attached to this workbook. + We only create these from the low level records as required. + + + + Totals the sizes of all sheet records and eventually serializes them + + + + + Creates new HSSFWorkbook from scratch (start here!) + + + + Companion to HSSFWorkbook(POIFSFileSystem), this constructs the + POI filesystem around your inputstream, including all nodes. + This calls {@link #HSSFWorkbook(InputStream, boolean)} with + preserve nodes set to true. + + @see #HSSFWorkbook(InputStream, boolean) + @see #HSSFWorkbook(POIFSFileSystem) + @see org.apache.poi.poifs.filesystem.POIFSFileSystem + @exception IOException if the stream cannot be read + + + Given a POI POIFSFileSystem object, read in its Workbook along + with all related nodes, and populate the high and low level models. + This calls {@link #HSSFWorkbook(POIFSFileSystem, boolean)} with + preserve nodes set to true. + + @see #HSSFWorkbook(POIFSFileSystem, boolean) + @see org.apache.poi.poifs.filesystem.POIFSFileSystem + @exception IOException if the stream cannot be read + + + + given a POI POIFSFileSystem object, Read in its Workbook and populate the high and + low level models. If you're Reading in a workbook...start here. + + the POI filesystem that Contains the Workbook stream. + whether to preseve other nodes, such as + macros. This takes more memory, so only say yes if you + need to. If Set, will store all of the POIFSFileSystem + in memory + + + + given a POI POIFSFileSystem object, and a specific directory + within it, Read in its Workbook and populate the high and + low level models. If you're Reading in a workbook...start here. + + the POI filesystem directory to Process from + the POI filesystem that Contains the Workbook stream. + whether to preseve other nodes, such as + macros. This takes more memory, so only say yes if you + need to. If Set, will store all of the POIFSFileSystem + in memory + + + given a POI POIFSFileSystem object, and a specific directory + within it, read in its Workbook and populate the high and + low level models. If you're reading in a workbook...start here. + + @param directory the POI filesystem directory to process from + @param preserveNodes whether to preseve other nodes, such as + macros. This takes more memory, so only say yes if you + need to. If set, will store all of the POIFSFileSystem + in memory + @see org.apache.poi.poifs.filesystem.POIFSFileSystem + @exception IOException if the stream cannot be read + + + Companion to HSSFWorkbook(POIFSFileSystem), this constructs the POI filesystem around your + inputstream. + + @param s the POI filesystem that Contains the Workbook stream. + @param preserveNodes whether to preseve other nodes, such as + macros. This takes more memory, so only say yes if you + need to. + @see org.apache.poi.poifs.filesystem.POIFSFileSystem + @see #HSSFWorkbook(POIFSFileSystem) + @exception IOException if the stream cannot be Read + + + used internally to Set the workbook properties. + + + + This is basically a kludge to deal with the now obsolete Label records. If + you have to read in a sheet that contains Label records, be aware that the rest + of the API doesn't deal with them, the low level structure only provides Read-only + semi-immutable structures (the Sets are there for interface conformance with NO + impelmentation). In short, you need to call this function passing it a reference + to the Workbook object. All labels will be converted to LabelSST records and their + contained strings will be written to the Shared String tabel (SSTRecord) within + the Workbook. + + The records. + The offset. + + + + Retrieves the current policy on what to do when + getting missing or blank cells from a row. + The default is to return blank and null cells. + + The missing cell policy. + + + + Sets the order of appearance for a given sheet. + + the name of the sheet to reorder + the position that we want to Insert the sheet into (0 based) + + + + Validates the index of the sheet. + + The index. + + + Test only. Do not use + + + + Selects a single sheet. This may be different to + the 'active' sheet (which Is the sheet with focus). + + The index. + + + + Sets the selected tabs. + + The indexes. + + + Selects multiple sheets as a group. This is distinct from + the 'active' sheet (which is the sheet with focus). + Unselects sheets that are not in indexes. + + @param indexes + + + Gets the selected sheets (if more than one, Excel calls these a [Group]). + + @return indices of selected sheets + + + + Gets the tab whose data is actually seen when the sheet is opened. + This may be different from the "selected sheet" since excel seems to + allow you to show the data of one sheet when another Is seen "selected" + in the tabs (at the bottom). + + + + + Sets the tab whose data is actually seen when the sheet is opened. + This may be different from the "selected sheet" since excel seems to + allow you to show the data of one sheet when another Is seen "selected" + in the tabs (at the bottom). + The sheet number(0 based). + + + + + Gets or sets the first tab that is displayed in the list of tabs + in excel. This method does not hide, select or focus sheets. + It just sets the scroll position in the tab-bar. + + @param index the sheet index of the tab that will become the first in the tab-bar + + + + @deprecated POI will now properly handle Unicode strings without + forceing an encoding + + + @deprecated POI will now properly handle Unicode strings without + forceing an encoding + + + + Set the sheet name. + + The sheet number(0 based). + The name. + + + + Get the sheet name + + The sheet index. + Sheet name + + + + Check whether a sheet is hidden + + The sheet index. + + true if sheet is hidden; otherwise, false. + + + + + Check whether a sheet is very hidden. + This is different from the normal + hidden status + + The sheet index. + + true if sheet is very hidden; otherwise, false. + + + + + Hide or Unhide a sheet + + The sheet index + True to mark the sheet as hidden, false otherwise + + + + Hide or unhide a sheet. + + The sheet number + 0 for not hidden, 1 for hidden, 2 for very hidden + + + + Returns the index of the sheet by his name + + the sheet name + index of the sheet (0 based) + + + + Returns the index of the given sheet + + the sheet to look up + index of the sheet (0 based).-1 + if not found + + + + Create an HSSFSheet for this HSSFWorkbook, Adds it to the sheets and returns + the high level representation. Use this to Create new sheets. + + HSSFSheet representing the new sheet. + + + + Create an HSSFSheet from an existing sheet in the HSSFWorkbook. + + the sheet index + HSSFSheet representing the Cloned sheet. + + + + Gets the name of the unique sheet. + + Name of the SRC. + + + + + Create an HSSFSheet for this HSSFWorkbook, Adds it to the sheets and + returns the high level representation. Use this to Create new sheets. + + sheetname to set for the sheet. + HSSFSheet representing the new sheet. + + + + Get the number of spreadsheets in the workbook (this will be three after serialization) + + The number of sheets. + + + + Gets the sheets. + + + + + + Get the HSSFSheet object at the given index. + + index of the sheet number (0-based) + HSSFSheet at the provided index + + + + Get sheet with the given name (case insensitive match) + + name of the sheet + HSSFSheet with the name provided or null if it does not exist + + + + Removes sheet at the given index. + + index of the sheet (0-based) + + Care must be taken if the Removed sheet Is the currently active or only selected sheet in + the workbook. There are a few situations when Excel must have a selection and/or active + sheet. (For example when printing - see Bug 40414). + This method makes sure that if the Removed sheet was active, another sheet will become + active in its place. Furthermore, if the Removed sheet was the only selected sheet, another + sheet will become selected. The newly active/selected sheet will have the same index, or + one less if the Removed sheet was the last in the workbook. + + + + + determine whether the Excel GUI will backup the workbook when saving. + + the current Setting for backups. + + + + Create a new Font and Add it to the workbook's font table + + new font object + + + + Finds a font that matches the one with the supplied attributes + + The bold weight. + The color. + Height of the font. + The name. + if set to true [italic]. + if set to true [strikeout]. + The type offset. + The underline. + + + + + Finds a font that matches the one with the supplied attributes + + The bold weight. + The color. + Height of the font. + The name. + if set to true [italic]. + if set to true [strikeout]. + The type offset. + The underline. + + + + + Get the number of fonts in the font table + + The number of fonts. + + + + Get the font at the given index number + + The index number + HSSFFont at the index + + + + Reset the fonts cache, causing all new calls + to getFontAt() to create new objects. + Should only be called after deleting fonts, + and that's not something you should normally do + + + + + Create a new Cell style and Add it to the workbook's style table + + the new Cell Style object + + + + Get the number of styles the workbook Contains + + count of cell styles + + + + Get the cell style object at the given index + + index within the Set of styles + HSSFCellStyle object at the index + + + Closes the underlying {@link NPOIFSFileSystem} from which + the Workbook was read, if any. Has no effect on Workbooks + opened from an InputStream, or newly created ones. + Once {@link #close()} has been called, no further + operations, updates or reads should be performed on the + Workbook. + + + Write out this workbook to the currently open {@link File} via the + writeable {@link POIFSFileSystem} it was opened as. + + This will fail (with an {@link InvalidOperationException} if the + Workbook was opened read-only, opened from an {@link InputStream} + instead of a File, or if this is not the root document. For those cases, + you must use {@link #write(OutputStream)} or {@link #write(File)} to + write to a brand new document. + + + Method write - write out this workbook to a new {@link File}. Constructs + a new POI POIFSFileSystem, passes in the workbook binary representation and + writes it out. If the file exists, it will be replaced, otherwise a new one + will be created. + + Note that you cannot write to the currently open File using this method. + If you opened your Workbook from a File, you must use the {@link #write()} + method instead! + + @param newFile - the new File you wish to write the XLS to + + @exception IOException if anything can't be written. + @see org.apache.poi.poifs.filesystem.POIFSFileSystem + + + + Write out this workbook to an Outputstream. Constructs + a new POI POIFSFileSystem, passes in the workbook binary representation and + Writes it out. + + If {@code stream} is a {@link java.io.FileOutputStream} on a networked drive + or has a high cost/latency associated with each written byte, + consider wrapping the OutputStream in a {@link java.io.BufferedOutputStream} + to improve write performance. + + + the java OutputStream you wish to Write the XLS to + + + Writes the workbook out to a brand new, empty POIFS + + + + Get the bytes of just the HSSF portions of the XLS file. + Use this to construct a POI POIFSFileSystem yourself. + + byte[] array containing the binary representation of this workbook and all contained + sheets, rows, cells, etc. + + + The locator of user-defined functions. + By default includes functions from the Excel Analysis Toolpack + + + Register a new toolpack in this workbook. + + @param toopack the toolpack to register + + + + Gets the workbook. + + The workbook. + + + + Gets the total number of named ranges in the workboko + + The number of named ranges + + + + Gets the Named range + + position of the named range + named range high level + + + + Gets the named range name + + the named range index (0 based) + named range name + + + + Sets the printarea for the sheet provided + i.e. Reference = $A$1:$B$2 + + Zero-based sheet index (0 Represents the first sheet to keep consistent with java) + Valid name Reference for the Print Area + + + + Sets the print area. + + Zero-based sheet index (0 = First Sheet) + Column to begin printarea + Column to end the printarea + Row to begin the printarea + Row to end the printarea + + + + Retrieves the reference for the printarea of the specified sheet, the sheet name Is Appended to the reference even if it was not specified. + + Zero-based sheet index (0 Represents the first sheet to keep consistent with java) + String Null if no print area has been defined + + + + Delete the printarea for the sheet specified + + Zero-based sheet index (0 = First Sheet) + + + + Creates a new named range and Add it to the model + + named range high level + + + + Gets the named range index by his name + Note: + Excel named ranges are case-insensitive and + this method performs a case-insensitive search. + + named range name + named range index + + + + As GetNameIndex(String) is not necessarily unique + (name + sheet index is unique), this method is more accurate. + + the name whose index in the list of names of this workbook should be looked up. + an index value >= 0 if the name was found; -1, if the name was not found + + + + Remove the named range by his index + + The named range index (0 based) + + + + Creates the instance of HSSFDataFormat for this workbook. + + the HSSFDataFormat object + + + + Remove the named range by his name + + named range name + + + + As #removeName(String) is not necessarily unique (name + sheet index is unique), + this method is more accurate. + + the name to remove. + + + + Spits out a list of all the drawing records in the workbook. + + if set to true [fat]. + + + + Adds a picture to the workbook. + + The bytes of the picture + The format of the picture. One of + PictureType. + the index to this picture (1 based). + + + + Gets all pictures from the Workbook. + + the list of pictures (a list of HSSFPictureData objects.) + + + + Performs a recursive search for pictures in the given list of escher records. + + the escher records. + the list to populate with the pictures. + + + + Adds the LinkTable records required to allow formulas referencing + the specified external workbook to be added to this one. Allows + formulas such as "[MyOtherWorkbook]Sheet3!$A$5" to be added to the + file, for workbooks not already referenced. + + The name the workbook will be referenced as in formulas + The open workbook to fetch the link required information from + + + + + Is the workbook protected with a password (not encrypted)? + + + true if this instance is write protected; otherwise, false. + + + + + protect a workbook with a password (not encypted, just Sets Writeprotect + flags and the password. + + password to set + The username. + + + + Removes the Write protect flag + + + + + Gets all embedded OLE2 objects from the Workbook. + + the list of embedded objects (a list of HSSFObjectData objects.) + + + + Gets all embedded OLE2 objects from the Workbook. + + the list of records to search. + the list of embedded objects to populate. + + + + Recursively iterates a shape container to get all embedded objects. + + the parent. + the list of embedded objects to populate. + + + + Gets the new UID. + + The new UID. + + + + Support foreach ISheet, e.g. + HSSFWorkbook workbook = new HSSFWorkbook(); + foreach(ISheet sheet in workbook) ... + + Enumeration of all the sheets of this workbook + + + + Whether the application shall perform a full recalculation when the workbook is opened. + + Typically you want to force formula recalculation when you modify cell formulas or values + of a workbook previously created by Excel. When set to true, this flag will tell Excel + that it needs to recalculate all formulas in the workbook the next time the file is opened. + + Note, that recalculation updates cached formula results and, thus, modifies the workbook. + Depending on the version, Excel may prompt you with "Do you want to save the changes in filename?" + on close. + + Value is true if the application will perform a full recalculation of + workbook values when the workbook is opened. + + since 3.8 + + + + + Returns the spreadsheet version (EXCLE97) of this workbook + + + + Changes an external referenced file to another file. + A formular in Excel which refers a cell in another file is saved in two parts: + The referenced file is stored in an reference table. the row/cell information is saved separate. + This method invokation will only change the reference in the lookup-table itself. + @param oldUrl The old URL to search for and which is to be replaced + @param newUrl The URL replacement + @return true if the oldUrl was found and replaced with newUrl. Otherwise false + + + + Gets a bool value that indicates whether the date systems used in the workbook starts in 1904. + The default value is false, meaning that the workbook uses the 1900 date system, + where 1/1/1900 is the first day in the system. + + True if the date systems used in the workbook starts in 1904 + + + This class Creates OperationEval instances to help evaluate OperationPtg + formula tokens. + + @author Josh Micich + + + returns the OperationEval concrete impl instance corresponding + to the supplied operationPtg + + + Allows the user to lookup the font metrics for a particular font without + actually having the font on the system. The font details are Loaded + as a resource from the POI jar file (or classpath) and should be contained + in path "/font_metrics.properties". The font widths are for a 10 point + version of the font. Use a multiplier for other sizes. + + @author Glen Stampoultzis (glens at apache.org) + + + The font metrics property file we're using + + + Our cache of font details we've alReady looked up + + + Retrieves the fake font details for a given font. + @param font the font to lookup. + @return the fake font. + + + + + A dummy record to indicate that we've now had the last + cell record for this row. + + + Returns the (0 based) number of the row we are + currently working on. + + + Returns the (0 based) number of the last column + seen for this row. You should have alReady been + called with that record. + This Is -1 in the case of there being no columns + for the row. + + + A dummy record for when we're missing a cell in a row, + but still want to trigger something + + + A dummy record for when we're missing a row, but still + want to trigger something + + + Interface for use with the HSSFRequest and HSSFEventFactory. Users should Create + a listener supporting this interface and register it with the HSSFRequest (associating + it with Record SID's). + + @see org.apache.poi.hssf.eventusermodel.HSSFEventFactory + @see org.apache.poi.hssf.eventusermodel.HSSFRequest + @see org.apache.poi.hssf.eventusermodel.HSSFUserException + + @author Carey Sublette (careysub@earthling.net) + + + + This method, inherited from HSSFListener Is implemented as a stub. + It Is never called by HSSFEventFActory or HSSFRequest. + + + + Process an HSSF Record. Called when a record occurs in an HSSF file. + Provides two options for halting the Processing of the HSSF file. + + The return value provides a means of non-error termination with a + user-defined result code. A value of zero must be returned to + continue Processing, any other value will halt Processing by + HSSFEventFactory with the code being passed back by + its abortable Process events methods. + + Error termination can be done by throwing the HSSFUserException. + + Note that HSSFEventFactory will not call the inherited Process + + @return result code of zero for continued Processing. + + @throws HSSFUserException User code can throw this to abort + file Processing by HSSFEventFactory and return diagnostic information. + + + + When working with the EventUserModel, if you want to + Process formulas, you need an instance of + Workbook to pass to a HSSFWorkbook, + to finally give to HSSFFormulaParser, + and this will build you stub ones. + Since you're working with the EventUserModel, you + wouldn't want to Get a full Workbook and + HSSFWorkbook, as they would eat too much memory. + Instead, you should collect a few key records as they + go past, then call this once you have them to build a + stub Workbook, and from that a stub + HSSFWorkbook, to use with the HSSFFormulaParser. + The records you should collect are: + ExternSheetRecord + BoundSheetRecord + You should probably also collect SSTRecord, + but it's not required to pass this in. + To help, this class includes a HSSFListener wrapper + that will do the collecting for you. + + + + + Creates a stub Workbook from the supplied records, + suitable for use with the {@link HSSFFormulaParser} + + The ExternSheetRecords in your file + The BoundSheetRecords in your file + TThe SSTRecord in your file. + A stub Workbook suitable for use with HSSFFormulaParser + + + + Creates a stub workbook from the supplied records, + suitable for use with the HSSFFormulaParser + + The ExternSheetRecords in your file + A stub Workbook suitable for use with HSSFFormulaParser + A stub Workbook suitable for use with {@link HSSFFormulaParser} + + + + A wrapping HSSFListener which will collect + BoundSheetRecords and {@link ExternSheetRecord}s as + they go past, so you can Create a Stub {@link Workbook} from + them once required. + + + + + Initializes a new instance of the class. + + The child listener. + + + + Gets the bound sheet records. + + + + + + Gets the extern sheet records. + + + + + + Gets the SST record. + + + + + + Gets the stub HSSF workbook. + + + + + + Gets the stub workbook. + + + + + + Process this record ourselves, and then + pass it on to our child listener + + The record. + + + + Process the record ourselves, but do not + pass it on to the child Listener. + + The record. + + + A proxy HSSFListener that keeps track of the document + formatting records, and provides an easy way to look + up the format strings used by cells from their ids. + + + Process this record ourselves, and then + pass it on to our child listener + + + Process the record ourselves, but do not + pass it on to the child Listener. + @param record + + + Formats the given numeric of date Cell's contents + as a String, in as close as we can to the way + that Excel would do so. + Uses the various format records to manage this. + + TODO - move this to a central class in such a + way that hssf.usermodel can make use of it too + + + Returns the format string, eg $##.##, for the + given number format index. + + + Returns the format string, eg $##.##, used + by your cell + + + Returns the index of the format string, used by your cell, + or -1 if none found + + + + Low level event based HSSF Reader. Pass either a DocumentInputStream to + Process events along with a request object or pass a POIFS POIFSFileSystem to + ProcessWorkbookEvents along with a request. + This will cause your file to be Processed a record at a time. Each record with + a static id matching one that you have registed in your HSSFRequest will be passed + to your associated HSSFListener. + @author Andrew C. Oliver (acoliver at apache dot org) + @author Carey Sublette (careysub@earthling.net) + + + + + Creates a new instance of HSSFEventFactory + + + + + Processes a file into essentially record events. + + an Instance of HSSFRequest which has your registered listeners + a POIFS filesystem containing your workbook + + + + Processes a file into essentially record events. + + an Instance of HSSFRequest which has your registered listeners + a POIFS filesystem containing your workbook + numeric user-specified result code. + + + + Processes a DocumentInputStream into essentially Record events. + If an + AbortableHSSFListener + causes a halt to Processing during this call + the method will return just as with + abortableProcessEvents + , but no + user code or + HSSFUserException + will be passed back. + + an Instance of HSSFRequest which has your registered listeners + a DocumentInputStream obtained from POIFS's POIFSFileSystem object + + + + Processes a DocumentInputStream into essentially Record events. + + an Instance of HSSFRequest which has your registered listeners + a DocumentInputStream obtained from POIFS's POIFSFileSystem object + numeric user-specified result code. + + + + Processes a DocumentInputStream into essentially Record events. + + an Instance of HSSFRequest which has your registered listeners + a DocumentInputStream obtained from POIFS's POIFSFileSystem object + numeric user-specified result code. + + + + Interface for use with the HSSFRequest and HSSFEventFactory. Users should Create + a listener supporting this interface and register it with the HSSFRequest (associating + it with Record SID's). + @author acoliver@apache.org + + + + + Process an HSSF Record. Called when a record occurs in an HSSF file. + + The record. + + + + A stream based way to Get at complete records, with + as low a memory footprint as possible. + This handles Reading from a RecordInputStream, turning + the data into full records, Processing continue records + etc. + Most users should use HSSFEventFactory + HSSFListener and have new records pushed to + them, but this does allow for a "pull" style of coding. + + + + Have we run out of records on the stream? + + + Have we returned all the records there are? + + + Sometimes we end up with a bunch of + records. When we do, these should + be returned before the next normal + record Processing occurs (i.e. before + we Check for continue records and + return rec) + + + The next record to return, which may need to have its + continue records passed to it before we do + + + The most recent record that we gave to the user + + + The most recent DrawingRecord seen + + + + Returns the next (complete) record from the + stream, or null if there are no more. + + + + + + If there are any "bonus" records, that should + be returned before Processing new ones, + grabs the next and returns it. + If not, returns null; + + + + + + Returns the next available record, or null if + this pass didn't return a record that's + suitable for returning (eg was a continue record). + + + + + + An HSSFRequest object should be constructed registering an instance or multiple + instances of HSSFListener with each Record.sid you wish to listen for. + @author Andrew C. Oliver (acoliver at apache dot org) + @author Carey Sublette (careysub@earthling.net) + + + + + Creates a new instance of HSSFRequest + + + + + Add an event listener for a particular record type. The trick Is you have to know + what the records are for or just start with our examples and build on them. Alternatively, + you CAN call AddListenerForAllRecords and you'll recieve ALL record events in one listener, + but if you like to squeeze every last byte of efficiency out of life you my not like this. + (its sure as heck what I plan to do) + + for the event + identifier for the record type this Is the .sid static member on the individual records + + + + This Is the equivilent of calling AddListener(myListener, sid) for EVERY + record in the org.apache.poi.hssf.record package. This Is for lazy + people like me. You can call this more than once with more than one listener, but + that seems like a bad thing to do from a practice-perspective Unless you have a + compelling reason to do so (like maybe you send the event two places or log it or + something?). + + a single listener to associate with ALL records + + + + Called by HSSFEventFactory, passes the Record to each listener associated with + a record.sid. + Exception and return value Added 2002-04-19 by Carey Sublette + + The record. + numeric user-specified result code. If zero continue Processing. + + + + This exception Is provided as a way for API users to throw + exceptions from their event handling code. By doing so they + abort file Processing by the HSSFEventFactory and by + catching it from outside the HSSFEventFactory.ProcessEvents + method they can diagnose the cause for the abort. + The HSSFUserException supports a nested "reason" + throwable, i.e. an exception that caused this one to be thrown. + The HSSF package does not itself throw any of these + exceptions. + + + @author Rainer Klute (klute@rainer-klute.de) + @author Carey Sublette (careysub@earthling.net) + + + + + Creates a new HSSFUserException + + + + + Creates a new HSSFUserException with a message + string. + + The MSG. + + + + Creates a new HSSFUserException with a reason. + + The reason. + + + + Creates a new HSSFUserException with a message string + and a reason. + + The MSG. + The reason. + + + + A HSSFListener which tracks rows and columns, and will + trigger your HSSFListener for all rows and cells, + even the ones that aren't actually stored in the file. + This allows your code to have a more "Excel" like + view of the data in the file, and not have to worry + (as much) about if a particular row/cell Is in the + file, or was skipped from being written as it was + blank. + + + + + Constructs a new MissingRecordAwareHSSFListener, which + will fire ProcessRecord on the supplied child + HSSFListener for all Records, and missing records. + + The HSSFListener to pass records on to + + + + Process an HSSF Record. Called when a record occurs in an HSSF file. + + + + + + The xtHeader.drType field MUST be equal to 0x07. + + + + + The xtHeader.drType field MUST be equal to 0x02. + + + + + The xtHeader.drType field MUST be equal to 0x03. + + + + + The xtHeader.drType field MUST be equal to 0x04. + + + + + The xtHeader.drType field MUST be equal to 0x01. + + + + + The xtHeader.drType field MUST be equal to 0x05. + + + + + An array of Unicode characters. The size of the array, in characters, is specified + by the cchValue field. The size of the field, in bytes, MUST equal the result of + the following formula:cchValue * 2. + + + + + The chartStyle.xtHeader.xmlTkTag MUST be equal to 0x0003. + + + + + The nInterval.xtHeader.xmlTkTag field MUST be equal to 0x0052. + + + + Utility for delaying the concatenation of multiple byte arrays. Doing this up-front + causes significantly more copying, which for a large number of byte arrays can cost + a large amount of time. + + + Clears the array (sets the concatenated length back to zero. + + + Concatenates an array onto the end of our array. + This is a relatively fast operation. + + @param array the array to concatenate. + @throws ArgumentException if {@code array} is {@code null}. + + + Gets the concatenated contents as a single byte array. + + This is a slower operation, but the concatenated array is stored off as a single + array again so that subsequent calls will not perform Additional copying. + + @return the byte array. Returns {@code null} if no data has been placed into it. + + + + Various utility functions that make working with a cells and rows easier. The various + methods that deal with style's allow you to Create your HSSFCellStyles as you need them. + When you apply a style change to a cell, the code will attempt to see if a style already + exists that meets your needs. If not, then it will Create a new style. This is to prevent + creating too many styles. there is an upper limit in Excel on the number of styles that + can be supported. + @author Eric Pugh epugh@upstate.com + + + + + Get a row from the spreadsheet, and Create it if it doesn't exist. + + The 0 based row number + The sheet that the row is part of. + The row indicated by the rowCounter + + + + Get a specific cell from a row. If the cell doesn't exist, + + The row that the cell is part of + The column index that the cell is in. + The cell indicated by the column. + + + + Creates a cell, gives it a value, and applies a style if provided + + the row to Create the cell in + the column index to Create the cell in + The value of the cell + If the style is not null, then Set + A new HSSFCell + + + + Create a cell, and give it a value. + + the row to Create the cell in + the column index to Create the cell in + The value of the cell + A new HSSFCell. + + + + Take a cell, and align it. + + the cell to Set the alignment for + The workbook that is being worked with. + the column alignment to use. + + + + Take a cell, and apply a font to it + + the cell to Set the alignment for + The workbook that is being worked with. + The HSSFFont that you want to Set... + + + This method attempt to find an already existing HSSFCellStyle that matches + what you want the style to be. If it does not find the style, then it + Creates a new one. If it does Create a new one, then it applies the + propertyName and propertyValue to the style. This is necessary because + Excel has an upper limit on the number of Styles that it supports. + + @param workbook The workbook that is being worked with. + @param propertyName The name of the property that is to be + changed. + @param propertyValue The value of the property that is to be + changed. + @param cell The cell that needs it's style changes + @exception NestableException Thrown if an error happens. + + + + Looks for text in the cell that should be unicode, like alpha; and provides the + unicode version of it. + + The cell to check for unicode values + transalted to unicode + + + + Translate color palette entries from the source to the destination sheet + + + + + Various utility functions that make working with a region of cells easier. + @author Eric Pugh epugh@upstate.com + + + + + For setting the same property on many cells to the same value + + + + + Sets the left border for a region of cells by manipulating the cell style + of the individual cells on the left + + The new border + The region that should have the border + The sheet that the region is on. + The workbook that the region is on. + + + + Sets the leftBorderColor attribute of the HSSFRegionUtil object + + The color of the border + The region that should have the border + The sheet that the region is on. + The workbook that the region is on. + + + + Sets the borderRight attribute of the HSSFRegionUtil object + + The new border + The region that should have the border + The sheet that the region is on. + The workbook that the region is on. + + + + Sets the rightBorderColor attribute of the HSSFRegionUtil object + + The color of the border + The region that should have the border + The workbook that the region is on. + The sheet that the region is on. + + + + Sets the borderBottom attribute of the HSSFRegionUtil object + + The new border + The region that should have the border + The sheet that the region is on. + The workbook that the region is on. + + + + Sets the bottomBorderColor attribute of the HSSFRegionUtil object + + The color of the border + The region that should have the border + The sheet that the region is on. + The workbook that the region is on. + + + + Sets the borderBottom attribute of the HSSFRegionUtil object + + The new border + The region that should have the border + The sheet that the region is on. + The workbook that the region is on. + + + + Sets the topBorderColor attribute of the HSSFRegionUtil object + + The color of the border + The region that should have the border + The sheet that the region is on. + The workbook that the region is on. + + + 4 bytes - little endian + + + 2 bytes - little endian + + + 2 bytes - little endian + + + 8 bytes - serialized as big endian, stored with inverted endianness here + + + Read a GUID in standard text form e.g.
    + 13579BDF-0246-8ACE-0123-456789ABCDEF +
    ->
    + 0x13579BDF, 0x0246, 0x8ACE 0x0123456789ABCDEF +
    + +

    Title: HSSFCellRangeAddress

    +

    Description: + Implementation of the cell range Address lists,like Is described in + OpenOffice.org's Excel Documentation . + In BIFF8 there Is a common way to store absolute cell range Address + lists in several records (not formulas). A cell range Address list + consists of a field with the number of ranges and the list of the range + Addresses. Each cell range Address (called an AddR structure) Contains + 4 16-bit-values.

    +

    Copyright: Copyright (c) 2004

    +

    Company:

    + @author Dragos Buleandra (dragos.buleandra@trade2b.ro) + @version 2.0-pre +
    + + Number of following AddR structures + + + List of AddR structures. Each structure represents a cell range + + + Construct a new HSSFCellRangeAddress object and Sets its fields appropriately . + Even this Isn't an Excel record , I kept the same behavior for reading/writing + the object's data as for a regular record . + + @param in the RecordInputstream to read the record from + + + Get the number of following AddR structures. + The number of this structures Is automatically Set when reading an Excel file + and/or increased when you manually Add a new AddR structure . + This Is the reason there Isn't a Set method for this field . + @return number of AddR structures + + + Add an AddR structure . + @param first_row - the upper left hand corner's row + @param first_col - the upper left hand corner's col + @param last_row - the lower right hand corner's row + @param last_col - the lower right hand corner's col + @return the index of this AddR structure + + + Remove the AddR structure stored at the passed in index + @param index The AddR structure's index + + + return the AddR structure at the given index. + @return AddrStructure representing + + + Get the upper left hand corner column number + @return column number for the upper left hand corner + + + Get the upper left hand corner row number + @return row number for the upper left hand corner + + + Get the lower right hand corner column number + @return column number for the lower right hand corner + + + Get the lower right hand corner row number + @return row number for the lower right hand corner + + + Intends to provide support for the very evil index to triplet Issue and + will likely replace the color constants interface for HSSF 2.0. + This class Contains static inner class members for representing colors. + Each color has an index (for the standard palette in Excel (tm) ), + native (RGB) triplet and string triplet. The string triplet Is as the + color would be represented by Gnumeric. Having (string) this here Is a bit of a + collusion of function between HSSF and the HSSFSerializer but I think its + a reasonable one in this case. + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Brian Sanders (bsanders at risklabs dot com) - full default color palette + + + Creates a new instance of HSSFColor + + + this function returns all colors in a hastable. Its not implemented as a + static member/staticly initialized because that would be dirty in a + server environment as it Is intended. This means you'll eat the time + it takes to Create it once per request but you will not hold onto it + if you have none of those requests. + + @return a hashtable containing all colors keyed by int excel-style palette indexes + + + This function returns all the Colours, stored in a Hashtable that + can be edited. No caching is performed. If you don't need to edit + the table, then call {@link #getIndexHash()} which returns a + statically cached imuatable map of colours. + + + + this function returns all colors in a hastable. Its not implemented as a + static member/staticly initialized because that would be dirty in a + server environment as it Is intended. This means you'll eat the time + it takes to Create it once per request but you will not hold onto it + if you have none of those requests. + + a hashtable containing all colors keyed by String gnumeric-like triplets + + + @return index to the standard palette + + + @return triplet representation like that in Excel + + + @return a hex string exactly like a gnumeric triplet + + + Class BLACK + + + + Class BROWN + + + + Class OLIVE_GREEN + + + + Class DARK_GREEN + + + + Class DARK_TEAL + + + + Class DARK_BLUE + + + + Class INDIGO + + + + Class GREY_80_PERCENT + + + + Class DARK_RED + + + + Class ORANGE + + + + Class DARK_YELLOW + + + + Class GREEN + + + + Class TEAL + + + + Class BLUE + + + + Class BLUE_GREY + + + + Class GREY_50_PERCENT + + + + Class RED + + + + Class LIGHT_ORANGE + + + + Class LIME + + + + Class SEA_GREEN + + + + Class AQUA + + + + Class GREY_40_PERCENT + + + + Class TURQUOISE + + + + Class SKY_BLUE + + + + Class PLUM + + + + Class GREY_25_PERCENT + + + + Class ROSE + + + + Class TAN + + + + Class LIGHT_YELLOW + + + + Class LIGHT_GREEN + + + + Class LIGHT_TURQUOISE + + + + Class PALE_BLUE + + + + Class LAVENDER + + + + Class WHITE + + + + Class CORNFLOWER_BLUE + + + Class LEMON_CHIFFON + + + Class MAROON + + + Class ORCHID + + + Class CORAL + + + Class ROYAL_BLUE + + + Class LIGHT_CORNFLOWER_BLUE + + + Special Default/Normal/Automatic color. + Note: This class Is NOT in the default HashTables returned by HSSFColor. + The index Is a special case which Is interpreted in the various SetXXXColor calls. + + @author Jason + + + + * Title: Range Address + * Description: provides connectivity utilities for ranges + * + * + * REFERENCE: + * @author IgOr KaTz & EuGeNe BuMaGiN (Tal Moshaiov) (VistaPortal LDT.) + @version 1.0 + + + Accepts an external reference from excel. + + i.e. Sheet1!$A$4:$B$9 + @param _url + + + + @return String note: All absolute references are Removed + + + Utility class for helping convert RK numbers. + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Rolf-J黵gen Moll + + @see org.apache.poi.hssf.record.MulRKRecord + @see org.apache.poi.hssf.record.RKRecord + + + Do the dirty work of decoding; made a private static method to + facilitate testing the algorithm + + + An ERFListener Is registered with the EventRecordFactory. + An ERFListener listens for Records coming from the stream + via the EventRecordFactory + + @see EventRecordFactory + @author Andrew C. Oliver acoliver@apache.org + + + Process a Record. This method Is called by the + EventRecordFactory when a record Is returned. + @return bool specifying whether the effort was a success. + + + Event-based record factory. As opposed to RecordFactory + this refactored version throws record events as it comes + accross the records. I throws the "lazily" one record behind + to ensure that ContinueRecords are Processed first. + + @author Andrew C. Oliver (acoliver@apache.org) - probably to blame for the bugs (so yank his chain on the list) + @author Marc Johnson (mjohnson at apache dot org) - methods taken from RecordFactory + @author Glen Stampoultzis (glens at apache.org) - methods taken from RecordFactory + @author Csaba Nagy (ncsaba at yahoo dot com) + + + Create an EventRecordFactory + @param abortable specifies whether the return from the listener + handler functions are obeyed. False means they are ignored. True + means the event loop exits on error. + + + sends the record event to all registered listeners. + @param record the record to be thrown. + @return false to abort. This aborts + out of the event loop should the listener return false + + + Create an array of records from an input stream + + @param in the InputStream from which the records will be + obtained + + @exception RecordFormatException on error Processing the + InputStream + + + + Creates the anchor. + + The user anchor. + + + + Allocates new shape id for the new drawing Group id. + + @return a new shape id. + + + + Provides utilities to manage drawing Groups. + + + Glen Stampoultzis (glens at apache.org) + + + + + Clears the cached list of drawing Groups + + + + + Allocates new shape id for the new drawing Group id. + + + a new shape id. + + + + Allocates new shape id for the new drawing group id. + + + + a new shape id. + + + + Finds the next available (1 based) drawing Group id + + + + + HSSF wrapper for the {@link FormulaParser} and {@link FormulaRenderer} + + @author Josh Micich + + + Convenience method for parsing cell formulas. see {@link #parse(String, HSSFWorkbook, int)} + + + @param formulaType a constant from {@link FormulaType} + @return the parsed formula tokens + + + @param formula the formula to parse + @param workbook the parent workbook + @param formulaType a constant from {@link FormulaType} + @param sheetIndex the 0-based index of the sheet this formula belongs to. + The sheet index is required to resolve sheet-level names. -1 means that + the scope of the name will be ignored and the parser will match named ranges only by name + + @return the parsed formula tokens + + + Static method to convert an array of {@link Ptg}s in RPN order + to a human readable string format in infix mode. + @param book used for defined names and 3D references + @param ptgs must not be null + @return a human readable String + + + Link Table (OOO pdf reference: 4.10.3 )

    + + The main data of all types of references is stored in the Link Table inside the Workbook Globals + Substream (4.2.5). The Link Table itself is optional and occurs only, if there are any + references in the document. +

    + + In BIFF8 the Link Table consists of +

      +
    • zero or more EXTERNALBOOK Blocks

      + each consisting of +

        +
      • exactly one EXTERNALBOOK (0x01AE) record
      • +
      • zero or more EXTERNALNAME (0x0023) records
      • +
      • zero or more CRN Blocks

        + each consisting of +

          +
        • exactly one XCT (0x0059)record
        • +
        • zero or more CRN (0x005A) records (documentation says one or more)
        • +
        +
      • +
      +
    • +
    • zero or one EXTERNSHEET (0x0017) record
    • +
    • zero or more DEFINEDNAME (0x0018) records
    • +
    + + + @author Josh Micich +
    + + Create a new block for registering add-in functions + + @see org.apache.poi.hssf.model.LinkTable#addNameXPtg(String) + + + Create a new block for external references. + + + Create a new block for internal references. It is called when constructing a new LinkTable. + + @see org.apache.poi.hssf.model.LinkTable#LinkTable(int, WorkbookRecordList) + + + Performs case-insensitive search + @return -1 if not found + + + TODO - would not be required if calling code used RecordStream or similar + + + @param extRefIndex as from a {@link Ref3DPtg} or {@link Area3DPtg} + @return -1 if the reference is to an external book + + + @param extRefIndex as from a {@link Ref3DPtg} or {@link Area3DPtg} + @return -1 if the reference is to an external book + + + Finds the external name definition for the given name, + optionally restricted by externsheet index, and returns + (if found) as a NameXPtg. + @param sheetRefIndex The Extern Sheet Index to look for, or -1 if any + + + Register an external name in this workbook + + @param name the name to register + @return a NameXPtg describing this name + + + copied from Workbook + + + Changes an external referenced file to another file. + A formular in Excel which refers a cell in another file is saved in two parts: + The referenced file is stored in an reference table. the row/cell information is saved separate. + This method invokation will only change the reference in the lookup-table itself. + @param oldUrl The old URL to search for and which is to be replaced + @param newUrl The URL replacement + @return true if the oldUrl was found and replaced with newUrl. Otherwise false + + + Represents a syntactic element from a formula by encapsulating the corresponding Ptg + token. Each ParseNode may have child ParseNodes in the case when the wrapped + Ptg is non-atomic. + + @author Josh Micich + + + + Collects the array of Ptg + tokens for the specified tree. + + The root node. + + + + + The IF() function Gets marked up with two or three tAttr tokens. + Similar logic will be required for CHOOSE() when it is supported + See excelfileformat.pdf sec 3.10.5 "tAttr (19H) + + The temp. + + + Finds correct insert positions for records in workbook streams

    + + See OOO excelfileformat.pdf sec. 4.2.5 'Record Order in a BIFF8 Workbook Stream' + + @author Josh Micich + + + Adds the specified new record in the correct place in sheet records list + + + +

    + Finds the index where the protection block should be inserted + + the records for this sheet + + + + BOF + o INDEX + o Calculation Settings Block + o PRINTHEADERS + o PRINTGRIDLINES + o GRIDSET + o GUTS + o DEFAULTROWHEIGHT + o SHEETPR + o Page Settings Block + o Worksheet Protection Block + o DEFCOLWIDTH + oo COLINFO + o SORT + + DIMENSION + +
    + + + These records may occur between the 'Worksheet Protection Block' and DIMENSION: + + + + + o DEFCOLWIDTH + oo COLINFO + o SORT + + + + + Find correct position to add new CFHeader record + + + + + + Finds the index where the sheet validations header record should be inserted + @param records the records for this sheet + + + WINDOW2 + o SCL + o PANE + oo SELECTION + o STANDARDWIDTH + oo MERGEDCELLS + o LABELRANGES + o PHONETICPR + o Conditional Formatting Table + o Hyperlink Table + o Data Validity Table + o SHEETLAYOUT + o SHEETPROTECTION + o RANGEPROTECTION + + EOF + + + DIMENSIONS record is always present + + + + if the specified record ID terminates a sequence of Row block records + It is assumed that at least one row or cell value record has been found prior to the current + record + + + + + + + Whether the specified record id normally appears in the row blocks section of the sheet records + + + + + + + Simplifies iteration over a sequence of Record objects. + @author Josh Micich + + + + + Determines whether this instance has next. + + + true if this instance has next; otherwise, false. + + + + + Gets the next record + + + + + + Peeks the next sid. + + -1 if at end of records + + + + Peeks the next class. + + the class of the next Record.return null if this stream Is exhausted. + + + Segregates the 'Row Blocks' section of a single sheet into plain row/cell records and + shared formula records. + + @author Josh Micich + + + Also collects any loose MergeCellRecords and puts them in the supplied + mergedCellsTable + + + Some unconventional apps place {@link MergeCellsRecord}s within the row block. They + actually should be in the {@link MergedCellsTable} which is much later (see bug 45699). + @return any loose MergeCellsRecords found + + + @return a {@link RecordStream} containing all the non-{@link SharedFormulaRecord} + non-{@link ArrayRecord} and non-{@link TableRecord} Records. + + + + Low level model implementation of a Sheet (one workbook Contains many sheets) + This file Contains the low level binary records starting at the sheets BOF and + ending with the sheets EOF. Use HSSFSheet for a high level representation. + + The structures of the highlevel API use references to this to perform most of their + operations. Its probably Unwise to use these low level structures directly Unless you + really know what you're doing. I recommend you Read the Microsoft Excel 97 Developer's + Kit (Microsoft Press) and the documentation at http://sc.openoffice.org/excelfileformat.pdf + before even attempting to use this. + + + @author Andrew C. Oliver (acoliver at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Shawn Laubach (slaubach at apache dot org) Gridlines, Headers, Footers, PrintSetup, and Setting Default Column Styles + @author Jason Height (jheight at chariot dot net dot au) Clone support. DBCell and Index Record writing support + @author Brian Sanders (kestrel at burdell dot org) Active Cell support + @author Jean-Pierre Paris (jean-pierre.paris at m4x dot org) (Just a little) + + + + java object always present, but if empty no BIFF records are written + + + the DimensionsRecord is always present + + + Add an UncalcedRecord if not true indicating formulas have not been calculated + + + + Clones the low level records of this sheet and returns the new sheet instance. + This method is implemented by Adding methods for deep cloning to all records that + can be Added to a sheet. The Record object does not implement Cloneable. + When Adding a new record, implement a public Clone method if and only if the record + belongs to a sheet. + + + + + + Creates the sheet. + + The stream. + + + + + Initializes a new instance of the class. + + The stream. + + + + Creates a sheet with all the usual records minus values and the "index" + record (not required). Sets the location pointer to where the first value + records should go. Use this to Create a sheet from "scratch". + + Sheet object with all values Set to defaults + + + + Adds the merged region. + + the row index From + The column index From. + The row index To + The column To. + + + + + Removes the merged region. + + The index. + + + + Gets the column infos. + + The column infos. + + + + Gets the merged region at. + + The index. + + + + + Gets the number of merged regions. + + The number merged regions. + + + + Gets the number of conditional formattings. + + The number of conditional formattings. + + + + Per an earlier reported bug in working with Andy Khan's excel Read library. This + Sets the values in the sheet's DimensionsRecord object to be correct. Excel doesn't + really care, but we want to play nice with other libraries. + + The first row. + The first column. + The last row. + The last column. + + + + Gets or Sets the preoffset when using DBCELL records (currently Unused) - this Is + the position of this sheet within the whole file. + + the offset of the sheet's BOF within the file. + + + + Create a row record. (does not Add it to the records contained in this sheet) + + row number + RowRecord Created for the passed in row number + + + + Create a LABELSST Record (does not Add it to the records contained in this sheet) + + the row the LabelSST Is a member of + the column the LabelSST defines + the index of the string within the SST (use workbook AddSSTString method) + LabelSSTRecord newly Created containing your SST Index, row,col. + + + + Create a NUMBER Record (does not Add it to the records contained in this sheet) + + the row the NumberRecord is a member of + the column the NumberRecord defines + value for the number record + NumberRecord for that row, col containing that value as Added to the sheet + + + + Create a BLANK record (does not Add it to the records contained in this sheet) + + the row the BlankRecord is a member of + the column the BlankRecord is a member of + + + + + Adds a value record to the sheet's contained binary records + (i.e. LabelSSTRecord or NumberRecord). + This method is "loc" sensitive. Meaning you need to Set LOC to where you + want it to start searching. If you don't know do this: SetLoc(GetDimsLoc). + When Adding several rows you can just start at the last one by leaving loc + at what this Sets it to. + + the row to Add the cell value to + the cell value record itself. + + + + Remove a value record from the records array. + This method is not loc sensitive, it Resets loc to = dimsloc so no worries. + + the row of the value record you wish to Remove + a record supporting the CellValueRecordInterface. + + + + Replace a value record from the records array. + This method is not loc sensitive, it Resets loc to = dimsloc so no worries. + + a record supporting the CellValueRecordInterface. this will Replace + the cell value with the same row and column. If there Isn't one, one will + be Added. + + + + Adds a row record to the sheet + This method is "loc" sensitive. Meaning you need to Set LOC to where you + want it to start searching. If you don't know do this: SetLoc(GetDimsLoc). + When Adding several rows you can just start at the last one by leaving loc + at what this Sets it to. + + the row record to be Added + + + + Removes a row record + This method is not loc sensitive, it Resets loc to = dimsloc so no worries. + + the row record to Remove + + + Get all the value records (from LOC). Records will be returned from the first + record (starting at LOC) which is a value record. + + This method is "loc" sensitive. Meaning you need to set LOC to where you + want it to start searching. If you don't know do this: setLoc(getDimsLoc). + When adding several rows you can just start at the last one by leaving loc + at what this sets it to. For this method, set loc to dimsloc to start with, + subsequent calls will return values in (physical) sequence or NULL when you get to the end. + + @return Iterator of CellValueRecordInterface representing the value records + + + + Get the NEXT RowRecord (from LOC). The first record that is a Row record + (starting at LOC) will be returned. + This method is "loc" sensitive. Meaning you need to Set LOC to where you + want it to start searching. If you don't know do this: SetLoc(GetDimsLoc). + When Adding several rows you can just start at the last one by leaving loc + at what this Sets it to. For this method, Set loc to dimsloc to start with. + subsequent calls will return rows in (physical) sequence or NULL when you Get to the end. + + RowRecord representing the next row record or NULL if there are no more + + + + Get the NEXT (from LOC) RowRecord where rownumber matches the given rownum. + The first record that is a Row record (starting at LOC) that has the + same rownum as the given rownum will be returned. + This method is "loc" sensitive. Meaning you need to Set LOC to where you + want it to start searching. If you don't know do this: SetLoc(GetDimsLoc). + When Adding several rows you can just start at the last one by leaving loc + at what this Sets it to. For this method, Set loc to dimsloc to start with. + subsequent calls will return rows in (physical) sequence or NULL when you Get to the end. + + which row to return (careful with LOC) + RowRecord representing the next row record or NULL if there are no more + + + + Gets the page settings. + + + + + + Creates the BOF record + + record containing a BOFRecord + + + + Creates the Index record - not currently used + + record containing a IndexRecord + + + + Creates the CalcMode record and Sets it to 1 (automatic formula caculation) + + record containing a CalcModeRecord + + + + Creates the CalcCount record and Sets it to 0x64 (default number of iterations) + + record containing a CalcCountRecord + + + + Creates the RefMode record and Sets it to A1 Mode (default reference mode) + + record containing a RefModeRecord + + + + Creates the Iteration record and Sets it to false (don't iteratively calculate formulas) + + record containing a IterationRecord + + + + Creates the Delta record and Sets it to 0.0010 (default accuracy) + + record containing a DeltaRecord + + + + Creates the SaveRecalc record and Sets it to true (recalculate before saving) + + record containing a SaveRecalcRecord + + + + Creates the PrintHeaders record and Sets it to false (we don't Create headers yet so why print them) + + record containing a PrintHeadersRecord + + + + Creates the PrintGridlines record and Sets it to false (that makes for ugly sheets). As far as I can + tell this does the same thing as the GridsetRecord + + record containing a PrintGridlinesRecord + + + + Creates the GridSet record and Sets it to true (user has mucked with the gridlines) + + record containing a GridsetRecord + + + + Creates the Guts record and Sets leftrow/topcol guttter and rowlevelmax/collevelmax to 0 + + record containing a GutsRecordRecord + + + + Creates the DefaultRowHeight Record and Sets its options to 0 and rowheight to 0xff + + + + record containing a DefaultRowHeightRecord + + + Creates the WSBoolRecord and Sets its values to defaults + @see org.apache.poi.hssf.record.WSBoolRecord + @see org.apache.poi.hssf.record.Record + @return record containing a WSBoolRecord + + + Creates the HCenter Record and Sets it to false (don't horizontally center) + @see org.apache.poi.hssf.record.HCenterRecord + @see org.apache.poi.hssf.record.Record + @return record containing a HCenterRecord + + + Creates the VCenter Record and Sets it to false (don't horizontally center) + @see org.apache.poi.hssf.record.VCenterRecord + @see org.apache.poi.hssf.record.Record + @return record containing a VCenterRecord + + + Creates the PrintSetup Record and Sets it to defaults and marks it invalid + @see org.apache.poi.hssf.record.PrintSetupRecord + @see org.apache.poi.hssf.record.Record + @return record containing a PrintSetupRecord + + + Creates the DefaultColWidth Record and Sets it to 8 + @see org.apache.poi.hssf.record.DefaultColWidthRecord + @see org.apache.poi.hssf.record.Record + @return record containing a DefaultColWidthRecord + + + Get the default column width for the sheet (if the columns do not define their own width) + @return default column width + + + Get the default row height for the sheet (if the rows do not define their own height) + @return default row height + + + Get the width of a given column in Units of 1/256th of a Char width + @param column index + @see org.apache.poi.hssf.record.DefaultColWidthRecord + @see org.apache.poi.hssf.record.ColumnInfoRecord + @see #SetColumnWidth(short,short) + @return column width in Units of 1/256th of a Char width + + + Get the index to the ExtendedFormatRecord "associated" with + the column at specified 0-based index. (In this case, an + ExtendedFormatRecord index is actually associated with a + ColumnInfoRecord which spans 1 or more columns) +
    + Returns the index to the default ExtendedFormatRecord (0xF) + if no ColumnInfoRecord exists that includes the column + index specified. + @param column + @return index of ExtendedFormatRecord associated with + ColumnInfoRecord that includes the column index or the + index of the default ExtendedFormatRecord (0xF) +
    + + Set the width for a given column in 1/256th of a Char width Units + @param column - the column number + @param width (in Units of 1/256th of a Char width) + + + Get the hidden property for a given column. + @param column index + @see org.apache.poi.hssf.record.DefaultColWidthRecord + @see org.apache.poi.hssf.record.ColumnInfoRecord + @see #SetColumnHidden(short,bool) + @return whether the column is hidden or not. + + + Get the hidden property for a given column. + @param column - the column number + @param hidden - whether the column is hidden or not + + + Creates an outline Group for the specified columns. + @param fromColumn Group from this column (inclusive) + @param toColumn Group to this column (inclusive) + @param indent if true the Group will be indented by one level, + if false indenting will be Removed by one level. + + + Creates the Dimensions Record and Sets it to bogus values (you should Set this yourself + or let the high level API do it for you) + @see org.apache.poi.hssf.record.DimensionsRecord + @see org.apache.poi.hssf.record.Record + @return record containing a DimensionsRecord + + + Creates the WindowTwo Record and Sets it to: + options = 0x6b6 + toprow = 0 + leftcol = 0 + headercolor = 0x40 + pagebreakzoom = 0x0 + normalzoom = 0x0 + @see org.apache.poi.hssf.record.WindowTwoRecord + @see org.apache.poi.hssf.record.Record + @return record containing a WindowTwoRecord + + + + Creates the Selection record and Sets it to nothing selected + + record containing a SelectionRecord + + + + Gets or sets the top row. + + The top row. + + + + Gets or sets the left col. + + The left col. + + + + Sets the active cell. + + The row. + The column. + + + + Sets the active cell range. + + The firstrow. + The lastrow. + The firstcolumn. + The lastcolumn. + + + + Sets the active cell range. + + The cellranges. + The index of the active range. + The active row in the active range + The active column in the active range + + + + Returns the active row + + the active row index + @see org.apache.poi.hssf.record.SelectionRecord + + + + Gets the active cell col. + + the active column index + @see org.apache.poi.hssf.record.SelectionRecord + + + + Creates the EOF record + + record containing a EOFRecord + + + + Gets the gridset record for this sheet. + + The gridset record. + + + + Returns the first occurance of a record matching a particular sid. + + The sid. + + + + + Sets the SCL record or Creates it in the correct place if it does not + already exist. + + The record to set. + + + Finds the first occurance of a record matching a particular sid and + returns it's position. + @param sid the sid to search for + @return the record position of the matching record or -1 if no match + is made. + + + + Gets or sets the header. + + the HeaderRecord. + + + + Gets or sets a value indicating whether this instance is auto tab color. + + + true if this instance is auto tab color; otherwise, false. + + + + + Gets or sets the footer. + + FooterRecord for the sheet. + + + Returns the PrintSetupRecord. + @return PrintSetupRecord for the sheet. + + + @return true if gridlines are printed + + + Returns the PrintGridlinesRecord. + @return PrintGridlinesRecord for the sheet. + + + Returns the PrintHeadersRecord. + @return PrintHeadersRecord for the sheet. + + + Sets whether the sheet is selected + @param sel True to select the sheet, false otherwise. + + + Creates a split (freezepane). Any existing freezepane or split pane Is overwritten. + @param colSplit Horizonatal position of split. + @param rowSplit Vertical position of split. + @param topRow Top row visible in bottom pane + @param leftmostColumn Left column visible in right pane. + + + Creates a split pane. Any existing freezepane or split pane is overwritten. + @param xSplitPos Horizonatal position of split (in 1/20th of a point). + @param ySplitPos Vertical position of split (in 1/20th of a point). + @param topRow Top row visible in bottom pane + @param leftmostColumn Left column visible in right pane. + @param activePane Active pane. One of: PANE_LOWER_RIGHT, + PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT + @see #PANE_LOWER_LEFT + @see #PANE_LOWER_RIGHT + @see #PANE_UPPER_LEFT + @see #PANE_UPPER_RIGHT + + + Returns the information regarding the currently configured pane (split or freeze). + @return null if no pane configured, or the pane information. + + + creates a Password record with password set to 00. + + + creates a Protect record with protect set to false. + + + Creates an ObjectProtect record with protect Set to false. + @see org.apache.poi.hssf.record.ObjectProtectRecord + @see org.apache.poi.hssf.record.Record + @return an ObjectProtectRecord + + + Creates a ScenarioProtect record with protect Set to false. + @see org.apache.poi.hssf.record.ScenarioProtectRecord + @see org.apache.poi.hssf.record.Record + @return a ScenarioProtectRecord + + + Returns if gridlines are Displayed. + @return whether gridlines are Displayed + + + Returns if formulas are Displayed. + @return whether formulas are Displayed + + + Returns if RowColHeadings are Displayed. + @return whether RowColHeadings are Displayed + + + Returns if RowColHeadings are displayed. + @return whether RowColHeadings are displayed + + + @return whether an Uncalced record must be Inserted or not at generation + + + + Finds the DrawingRecord for our sheet, and attaches it to the DrawingManager (which knows about + the overall DrawingGroup for our workbook). + If requested, will Create a new DrawRecord if none currently exist + + The DrawingManager2 for our workbook + Should one be Created if missing? + location of EscherAggregate record. if no EscherAggregate record is found return -1 + + + Perform any work necessary before the sheet is about to be Serialized. + For instance the escher aggregates size needs to be calculated before + serialization so that the dgg record (which occurs first) can be written. + + + Shifts all the page breaks in the range "count" number of rows/columns + @param breaks The page record to be Shifted + @param start Starting "main" value to Shift breaks + @param stop Ending "main" value to Shift breaks + @param count number of Units (rows/columns) to Shift by + + + Shifts the horizontal page breaks for the indicated count + @param startingRow + @param endingRow + @param count + + + Shifts the vertical page breaks for the indicated count + @param startingCol + @param endingCol + @param count + + + Updates formulas in cells and conditional formats due to moving of cells + @param externSheetIndex the externSheet index of this sheet + + + 'initial sheet records' are between INDEX and the 'Row Blocks' + @param bofRecordIndex index of record after which INDEX record is to be placed + @return count of bytes from end of INDEX record to first ROW record. + + + Get the {@link NoteRecord}s (related to cell comments) for this sheet + @return never null, typically empty array + + + Low level model implementation of a Workbook. Provides creational methods + for Settings and objects contained in the workbook object. + + This file Contains the low level binary records starting at the workbook's BOF and + ending with the workbook's EOF. Use HSSFWorkbook for a high level representation. + + The structures of the highlevel API use references to this to perform most of their + operations. Its probably Unwise to use these low level structures directly Unless you + really know what you're doing. I recommend you Read the Microsoft Excel 97 Developer's + Kit (Microsoft Press) and the documentation at http://sc.openoffice.org/excelfileformat.pdf + before even attempting to use this. + + + @author Luc Girardin (luc dot girardin at macrofocus dot com) + @author Sergei Kozello (sergeikozello at mail.ru) + @author Shawn Laubach (slaubach at apache dot org) (Data Formats) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Brian Sanders (bsanders at risklabs dot com) - custom palette + @author Dan Sherman (dsherman at Isisph.com) + @author Glen Stampoultzis (glens at apache.org) + @see org.apache.poi.hssf.usermodel.HSSFWorkbook + @version 1.0-pre + + + Excel silently truncates long sheet names to 31 chars. + This constant is used to ensure uniqueness in the first 31 chars + + + Normally, the Workbook will be in a POIFS Stream + called "Workbook". However, some weird XLS generators use "WORKBOOK" + + + Name of older (pre-Excel 97) Workbook streams, which + aren't supported by HSSFWorkbook, only by + {@link OldExcelExtractor} + + + constant used to Set the "codepage" wherever "codepage" is Set in records + (which is duplciated in more than one record) + + + this Contains the Worksheet record objects + + + this Contains a reference to the SSTRecord so that new stings can be Added + to it. + + + holds the "boundsheet" records (aka bundlesheet) so that they can have their + reference to their "BOF" marker + + + Creates new Workbook with no intitialization --useless right now + @see #CreateWorkbook(List) + + + Read support for low level + API. Pass in an array of Record objects, A Workbook + object is constructed and passed back with all of its initialization Set + to the passed in records and references to those records held. Unlike Sheet + workbook does not use an offset (its assumed to be 0) since its first in a file. + If you need an offset then construct a new array with a 0 offset or Write your + own ;-p. + + @param recs an array of Record objects + @return Workbook object + + + gets the name comment record + @param nameRecord name record who's comment is required. + @return name comment record or null if there isn't one for the given name. + + + Creates an empty workbook object with three blank sheets and all the empty + fields. Use this to Create a workbook from scratch. + + + Retrieves the Builtin NameRecord that matches the name and index + There shouldn't be too many names to make the sequential search too slow + @param name byte representation of the builtin name to match + @param sheetIndex Index to match + @return null if no builtin NameRecord matches + + + Removes the specified Builtin NameRecord that matches the name and index + @param name byte representation of the builtin to match + @param sheetIndex zero-based sheet reference + + + Gets the font record at the given index in the font table. Remember + "There is No Four" (someone at M$ must have gone to Rocky Horror one too + many times) + + @param idx the index to look at (0 or greater but NOT 4) + @return FontRecord located at the given index + + + Creates a new font record and Adds it to the "font table". This causes the + boundsheets to move down one, extended formats to move down (so this function moves + those pointers as well) + + @return FontRecord that was just Created + + + Check if the cloned sheet has drawings. If yes, then allocate a new drawing group ID and + re-generate shape IDs + + @param sheet the cloned sheet + + + Gets the number of font records + + @return number of font records in the "font table" + + + Sets the BOF for a given sheet + + @param sheetnum the number of the sheet to Set the positing of the bof for + @param pos the actual bof position + + + Returns the position of the backup record. + + + Sets the name for a given sheet. If the boundsheet record doesn't exist and + its only one more than we have, go ahead and Create it. If its > 1 more than + we have, except + + @param sheetnum the sheet number (0 based) + @param sheetname the name for the sheet + + + Determines whether a workbook Contains the provided sheet name. + + @param name the name to test (case insensitive match) + @param excludeSheetIdx the sheet to exclude from the Check or -1 to include all sheets in the Check. + @return true if the sheet Contains the name, false otherwise. + + + Sets the name for a given sheet forcing the encoding. This is STILL A BAD IDEA. + Poi now automatically detects Unicode + + @deprecated 3-Jan-06 Simply use SetSheetNam e(int sheetnum, String sheetname) + @param sheetnum the sheet number (0 based) + @param sheetname the name for the sheet + + + Sets the order of appearance for a given sheet. + + @param sheetname the name of the sheet to reorder + @param pos the position that we want to Insert the sheet into (0 based) + + + Gets the name for a given sheet. + + @param sheetnum the sheet number (0 based) + @return sheetname the name for the sheet + + + Gets the hidden flag for a given sheet. + + @param sheetnum the sheet number (0 based) + @return True if sheet is hidden + + + Gets the hidden flag for a given sheet. + Note that a sheet could instead be + set to be very hidden, which is different + ({@link #isSheetVeryHidden(int)}) + + @param sheetnum the sheet number (0 based) + @return True if sheet is hidden + + + Hide or Unhide a sheet + + @param sheetnum The sheet number + @param hidden True to mark the sheet as hidden, false otherwise + + + Hide or unhide a sheet. + 0 = not hidden + 1 = hidden + 2 = very hidden. + + @param sheetnum The sheet number + @param hidden 0 for not hidden, 1 for hidden, 2 for very hidden + + + Get the sheet's index + @param name sheet name + @return sheet index or -1 if it was not found. + + + if we're trying to Address one more sheet than we have, go ahead and Add it! if we're + trying to Address >1 more than we have throw an exception! + + + + make the tabid record look like the current situation. + + number of bytes written in the TabIdRecord + + + returns the number of boundsheet objects contained in this workbook. + + @return number of BoundSheet records + + + Get the number of ExtendedFormat records contained in this workbook. + + @return int count of ExtendedFormat records + + + Retrieves the index of the given font + + + Returns the StyleRecord for the given + xfIndex, or null if that ExtendedFormat doesn't + have a Style set. + + + Gets the ExtendedFormatRecord at the given 0-based index + + @param index of the Extended format record (0-based) + @return ExtendedFormatRecord at the given index + + + Creates a new Cell-type Extneded Format Record and Adds it to the end of + ExtendedFormatRecords collection + + @return ExtendedFormatRecord that was Created + + + Adds a string to the SST table and returns its index (if its a duplicate + just returns its index and update the counts) ASSUMES compressed Unicode + (meaning 8bit) + + @param string the string to be Added to the SSTRecord + + @return index of the string within the SSTRecord + + + given an index into the SST table, this function returns the corresponding String value + @return String containing the SST String + + + use this function to Add a Shared String Table to an existing sheet (say + generated by a different java api) without an sst.... + @see #CreateSST() + @see org.apache.poi.hssf.record.SSTRecord + + + Serializes all records int the worksheet section into a big byte array. Use + this to Write the Workbook out. + @param offset of the data to be written + @param data array of bytes to Write this to + + + Perform any work necessary before the workbook is about to be serialized. + + Include in it ant code that modifies the workbook record stream and affects its size. + + + Creates the BOF record + @see org.apache.poi.hssf.record.BOFRecord + @see org.apache.poi.hssf.record.Record + @return record containing a BOFRecord + + + Creates the InterfaceHdr record + @see org.apache.poi.hssf.record.InterfaceHdrRecord + @see org.apache.poi.hssf.record.Record + @return record containing a InterfaceHdrRecord + + + Creates an MMS record + @see org.apache.poi.hssf.record.MMSRecord + @see org.apache.poi.hssf.record.Record + @return record containing a MMSRecord + + + Creates the InterfaceEnd record + @see org.apache.poi.hssf.record.InterfaceEndRecord + @see org.apache.poi.hssf.record.Record + @return record containing a InterfaceEndRecord + + + Creates the WriteAccess record containing the logged in user's name + @see org.apache.poi.hssf.record.WriteAccessRecord + @see org.apache.poi.hssf.record.Record + @return record containing a WriteAccessRecord + + + Creates the Codepage record containing the constant stored in CODEPAGE + @see org.apache.poi.hssf.record.CodepageRecord + @see org.apache.poi.hssf.record.Record + @return record containing a CodepageRecord + + + Creates the DSF record containing a 0 since HSSF can't even Create Dual Stream Files + @see org.apache.poi.hssf.record.DSFRecord + @see org.apache.poi.hssf.record.Record + @return record containing a DSFRecord + + + Creates the TabId record containing an array of 0,1,2. This release of HSSF + always has the default three sheets, no less, no more. + @see org.apache.poi.hssf.record.TabIdRecord + @see org.apache.poi.hssf.record.Record + @return record containing a TabIdRecord + + + Creates the FnGroupCount record containing the Magic number constant of 14. + @see org.apache.poi.hssf.record.FnGroupCountRecord + @see org.apache.poi.hssf.record.Record + @return record containing a FnGroupCountRecord + + + Creates the WindowProtect record with protect Set to false. + @see org.apache.poi.hssf.record.WindowProtectRecord + @see org.apache.poi.hssf.record.Record + @return record containing a WindowProtectRecord + + + Creates the Protect record with protect Set to false. + @see org.apache.poi.hssf.record.ProtectRecord + @see org.apache.poi.hssf.record.Record + @return record containing a ProtectRecord + + + Creates the Password record with password Set to 0. + @see org.apache.poi.hssf.record.PasswordRecord + @see org.apache.poi.hssf.record.Record + @return record containing a PasswordRecord + + + Creates the ProtectionRev4 record with protect Set to false. + @see org.apache.poi.hssf.record.ProtectionRev4Record + @see org.apache.poi.hssf.record.Record + @return record containing a ProtectionRev4Record + + + Creates the PasswordRev4 record with password Set to 0. + @see org.apache.poi.hssf.record.PasswordRev4Record + @see org.apache.poi.hssf.record.Record + @return record containing a PasswordRev4Record + + + Creates the WindowOne record with the following magic values: + horizontal hold - 0x168 + vertical hold - 0x10e + width - 0x3a5c + height - 0x23be + options - 0x38 + selected tab - 0 + Displayed tab - 0 + num selected tab- 0 + tab width ratio - 0x258 + @see org.apache.poi.hssf.record.WindowOneRecord + @see org.apache.poi.hssf.record.Record + @return record containing a WindowOneRecord + + + Creates the Backup record with backup Set to 0. (loose the data, who cares) + @see org.apache.poi.hssf.record.BackupRecord + @see org.apache.poi.hssf.record.Record + @return record containing a BackupRecord + + + Creates the HideObj record with hide object Set to 0. (don't hide) + @see org.apache.poi.hssf.record.HideObjRecord + @see org.apache.poi.hssf.record.Record + @return record containing a HideObjRecord + + + Creates the DateWindow1904 record with windowing Set to 0. (don't window) + @see org.apache.poi.hssf.record.DateWindow1904Record + @see org.apache.poi.hssf.record.Record + @return record containing a DateWindow1904Record + + + Creates the Precision record with precision Set to true. (full precision) + @see org.apache.poi.hssf.record.PrecisionRecord + @see org.apache.poi.hssf.record.Record + @return record containing a PrecisionRecord + + + Creates the RefreshAll record with refreshAll Set to true. (refresh all calcs) + @see org.apache.poi.hssf.record.RefreshAllRecord + @see org.apache.poi.hssf.record.Record + @return record containing a RefreshAllRecord + + + Creates the BookBool record with saveLinkValues Set to 0. (don't save link values) + @see org.apache.poi.hssf.record.BookBoolRecord + @see org.apache.poi.hssf.record.Record + @return record containing a BookBoolRecord + + + Creates a Font record with the following magic values: + fontheight = 0xc8 + attributes = 0x0 + color palette index = 0x7fff + bold weight = 0x190 + Font Name Length = 5 + Font Name = Arial + + @see org.apache.poi.hssf.record.FontRecord + @see org.apache.poi.hssf.record.Record + @return record containing a FontRecord + + + Creates an ExtendedFormatRecord object + @param id the number of the extended format record to Create (meaning its position in + a file as MS Excel would Create it.) + + @return record containing an ExtendedFormatRecord + @see org.apache.poi.hssf.record.ExtendedFormatRecord + @see org.apache.poi.hssf.record.Record + + + Creates an default cell type ExtendedFormatRecord object. + @return ExtendedFormatRecord with intial defaults (cell-type) + + + Creates a new StyleRecord, for the given Extended + Format index, and adds it onto the end of the + records collection + + + Creates a StyleRecord object + @param id the number of the style record to Create (meaning its position in + a file as MS Excel would Create it. + @return record containing a StyleRecord + @see org.apache.poi.hssf.record.StyleRecord + @see org.apache.poi.hssf.record.Record + + + Creates a palette record initialized to the default palette + @return a PaletteRecord instance populated with the default colors + @see org.apache.poi.hssf.record.PaletteRecord + + + Creates the UseSelFS object with the use natural language flag Set to 0 (false) + @return record containing a UseSelFSRecord + @see org.apache.poi.hssf.record.UseSelFSRecord + @see org.apache.poi.hssf.record.Record + + + Create a "bound sheet" or "bundlesheet" (depending who you ask) record + Always Sets the sheet's bof to 0. You'll need to Set that yourself. + @param id either sheet 0,1 or 2. + @return record containing a BoundSheetRecord + @see org.apache.poi.hssf.record.BoundSheetRecord + @see org.apache.poi.hssf.record.Record + + + Creates the Country record with the default country Set to 1 + and current country Set to 7 in case of russian locale ("ru_RU") and 1 otherwise + @return record containing a CountryRecord + @see org.apache.poi.hssf.record.CountryRecord + @see org.apache.poi.hssf.record.Record + + + Creates the ExtendedSST record with numstrings per bucket Set to 0x8. HSSF + doesn't yet know what to do with this thing, but we Create it with nothing in + it hardly just to make Excel happy and our sheets look like Excel's + + @return record containing an ExtSSTRecord + @see org.apache.poi.hssf.record.ExtSSTRecord + @see org.apache.poi.hssf.record.Record + + + lazy initialization + Note - creating the link table causes creation of 1 EXTERNALBOOK and 1 EXTERNALSHEET record + + + Finds the first sheet name by his extern sheet index + @param externSheetIndex extern sheet index + @return first sheet name. + + + Finds the (first) sheet index for a particular external sheet number. + @param externSheetNumber The external sheet number to convert + @return The index to the sheet found. + + + Finds the last sheet index for a particular external sheet number, + which may be the same as the first (except for multi-sheet references) + @param externSheetNumber The external sheet number to convert + @return The index to the sheet found. + + + Returns the extern sheet number for specific sheet number. + If this sheet doesn't exist in extern sheet, add it + @param sheetNumber local sheet number + @return index to extern sheet + + + Returns the extern sheet number for specific range of sheets. + If this sheet range doesn't exist in extern sheet, add it + @param firstSheetNumber first local sheet number + @param lastSheetNumber last local sheet number + @return index to extern sheet + + + Gets the total number of names + @return number of names + + + + @param name the name of an external function, typically a name of a UDF + @param sheetRefIndex the sheet ref index, or -1 if not known + @param udf locator of user-defiend functions to resolve names of VBA and Add-In functions + @return the external name or null + + + Gets the name record + @param index name index + @return name record + + + Creates new name + @return new name record + + + Creates new name + @return new name record + + + Generates a NameRecord to represent a built-in region + @return a new NameRecord Unless the index is invalid + + + Removes the name + @param namenum name index + + + If a {@link NameCommentRecord} is added or the name it references + is renamed, then this will update the lookup cache for it. + + + Returns a format index that matches the passed in format. It does not tie into HSSFDataFormat. + @param format the format string + @param CreateIfNotFound Creates a new format if format not found + @return the format id of a format that matches or -1 if none found and CreateIfNotFound + + + Returns the list of FormatRecords in the workbook. + @return ArrayList of FormatRecords in the notebook + + + Creates a FormatRecord, Inserts it, and returns the index code. + @param format the format string + @return the index code of the format record. + @see org.apache.poi.hssf.record.FormatRecord + @see org.apache.poi.hssf.record.Record + + + Creates a FormatRecord object + @param id the number of the format record to create (meaning its position in + a file as M$ Excel would create it.) + + + Returns the first occurance of a record matching a particular sid. + + + Returns the index of a record matching a particular sid. + @param sid The sid of the record to match + @return The index of -1 if no match made. + + + Returns the next occurance of a record matching a particular sid. + + + Whether date windowing is based on 1/2/1904 or 1/1/1900. + Some versions of Excel (Mac) can save workbooks using 1904 date windowing. + + @return true if using 1904 date windowing + + + Returns the custom palette in use for this workbook; if a custom palette record + does not exist, then it is Created. + + + Finds the primary drawing Group, if one already exists + + + Creates a primary drawing Group record. If it already + exists then it's modified. + + + Removes the given font record from the + file's list. This will make all + subsequent font indicies drop by one, + so you'll need to update those yourself! + + + Removes the given ExtendedFormatRecord record from the + file's list. This will make all + subsequent font indicies drop by one, + so you'll need to update those yourself! + + + + Removes ExtendedFormatRecord record with given index from the file's list. This will make all + subsequent font indicies drop by one,so you'll need to update those yourself! + + index of the Extended format record (0-based) + + + is the workbook protected with a password (not encrypted)? + + + protect a workbook with a password (not encypted, just Sets Writeprotect + flags and the password. + @param password to Set + + + Removes the Write protect flag + + + @param reFindex Index to REF entry in EXTERNSHEET record in the Link Table + @param definedNameIndex zero-based to DEFINEDNAME or EXTERNALNAME record + @return the string representation of the defined or external name + + + Updates named ranges due to moving of cells + + + Get or create RecalcIdRecord + + @see org.apache.poi.hssf.usermodel.HSSFWorkbook#setForceFormulaRecalculation(boolean) + + + Changes an external referenced file to another file. + A formular in Excel which refers a cell in another file is saved in two parts: + The referenced file is stored in an reference table. the row/cell information is saved separate. + This method invokation will only change the reference in the lookup-table itself. + @param oldUrl The old URL to search for and which is to be replaced + @param newUrl The URL replacement + @return true if the oldUrl was found and replaced with newUrl. Otherwise false + + + + List for records in Workbook + + + + + Gets or sets the records. + + The records. + + + + Gets the count. + + The count. + + + + Gets the at the specified index. + + + + + + Adds the specified pos. + + The pos. + The r. + + + + Removes the specified record. + + The record. + + + + Removes the specified position. + + The position. + + + + Gets or sets the protpos. + + The protpos. + + + + Gets or sets the bspos. + + The bspos. + + + + Gets or sets the tabpos. + + The tabpos. + + + + Gets or sets the fontpos. + + The fontpos. + + + + Gets or sets the xfpos. + + The xfpos. + + + + Gets or sets the backuppos. + + The backuppos. + + + + Gets or sets the palettepos. + + The palettepos. + + + + Gets or sets the namepos. + + The namepos. + + + + Gets or sets the supbookpos. + + The supbookpos. + + + + Gets or sets the externsheet pos. + + The externsheet pos. + + + Initializes a cipher object for a given block index for decryption + + @param cipher may be null, otherwise the given instance is reset to the new block index + @param block the block index, e.g. the persist/slide id (hslf) + @return a new cipher object, if cipher was null, otherwise the reInitialized cipher + @throws GeneralSecurityException + + + Decrypt the Document-/SummaryInformation and other optionally streams. + Opposed to other crypto modes, cryptoapi is record based and can't be used + to stream-decrypt a whole file + + @see 2.3.5.4 RC4 CryptoAPI Encrypted Summary Stream + + + @return the length of the stream returned by {@link #getDataStream(DirectoryNode)} + + + Initialize the builder from a stream + + + Initialize the builder from scratch + + + Initializes a cipher object for a given block index for encryption + + @param cipher may be null, otherwise the given instance is reset to the new block index + @param block the block index, e.g. the persist/slide id (hslf) + @return a new cipher object, if cipher was null, otherwise the reInitialized cipher + @throws GeneralSecurityException + + + Encrypt the Document-/SummaryInformation and other optionally streams. + Opposed to other crypto modes, cryptoapi is record based and can't be used + to stream-encrypt a whole file + + @see 2.3.5.4 RC4 CryptoAPI Encrypted Summary Stream + + + Helper functions used for standard and agile encryption + + +

    2.3.4.7 ECMA-376 Document Encryption Key Generation (Standard Encryption)
    + 2.3.4.11 Encryption Key Generation (Agile Encryption)

    + +

    The encryption key for ECMA-376 document encryption [ECMA-376] using agile + encryption MUST be generated by using the following method, which is derived from PKCS #5: + Password-Based Cryptography Version 2.0 [RFC2898].

    + +

    Let H() be a hashing algorithm as determined by the PasswordKeyEncryptor.hashAlgorithm + element, H_n be the hash data of the n-th iteration, and a plus sign (+) represent concatenation. + The password MUST be provided as an array of Unicode characters. Limitations on the length of the + password and the characters used by the password are implementation-dependent. + The initial password hash is generated as follows:

    + + +
    H_0 = H(salt + password)
    + +

    The salt used MUST be generated randomly. The salt MUST be stored in the + PasswordKeyEncryptor.saltValue element contained within the \EncryptionInfo stream as + specified in section 2.3.4.10. The hash is then iterated by using the following approach:

    + +
    H_n = H(iterator + H_n-1)
    + +

    where iterator is an unsigned 32-bit value that is initially set to 0x00000000 and then incremented + monotonically on each iteration until PasswordKey.spinCount iterations have been performed. + The value of iterator on the last iteration MUST be one less than PasswordKey.spinCount.

    + +

    For POI, H_final will be calculated by {@link #generateKey(byte[],HashAlgorithm,byte[],int)}

    + + @param password + @param hashAlgorithm + @param salt + @param spinCount + @return the hashed password +
    + + Generalized method for read and write protection hash generation. + The difference is, read protection uses the order iterator then hash in the hash loop, whereas write protection + uses first the last hash value and then the current iterator value + + @param password + @param hashAlgorithm + @param salt + @param spinCount + @param iteratorFirst if true, the iterator is hashed before the n-1 hash value, + if false the n-1 hash value is applied first + @return the hashed password + + +

    2.3.4.12 Initialization Vector Generation (Agile Encryption)

    + +

    Initialization vectors are used in all cases for agile encryption. An initialization vector MUST be + generated by using the following method, where H() is a hash function that MUST be the same as + specified in section 2.3.4.11 and a plus sign (+) represents concatenation:

    +
      +
    • If a blockKey is provided, let IV be a hash of the KeySalt and the following value:
      + {@code blockKey: IV = H(KeySalt + blockKey)}
    • +
    • If a blockKey is not provided, let IV be equal to the following value:
      + {@code KeySalt:IV = KeySalt}
    • +
    • If the number of bytes in the value of IV is less than the the value of the blockSize attribute + corresponding to the cipherAlgorithm attribute, pad the array of bytes by appending 0x36 until + the array is blockSize bytes. If the array of bytes is larger than blockSize bytes, truncate the + array to blockSize bytes.
    • +
    + +
    + +

    2.3.4.11 Encryption Key Generation (Agile Encryption)

    + +

    The final hash data that is used for an encryption key is then generated by using the following + method:

    + +
    H_final = H(H_n + blockKey)
    + +

    where blockKey represents an array of bytes used to prevent two different blocks from encrypting + to the same cipher text.

    + +

    If the size of the resulting H_final is smaller than that of PasswordKeyEncryptor.keyBits, the key + MUST be padded by appending bytes with a value of 0x36. If the hash value is larger in size than + PasswordKeyEncryptor.keyBits, the key is obtained by truncating the hash value.

    + + @param passwordHash + @param hashAlgorithm + @param blockKey + @param keySize + @return intermediate key +
    + + Initialize a new cipher object with the given cipher properties and no padding + If the given algorithm is not implemented in the JCE, it will try to load it from the bouncy castle + provider. + + @param key the secrect key + @param cipherAlgorithm the cipher algorithm + @param chain the chaining mode + @param vec the initialization vector (IV), can be null + @param cipherMode Cipher.DECRYPT_MODE or Cipher.ENCRYPT_MODE + @return the requested cipher + @throws GeneralSecurityException + @throws EncryptedDocumentException if the initialization failed or if an algorithm was specified, + which depends on a missing bouncy castle provider + + + Initialize a new cipher object with the given cipher properties + If the given algorithm is not implemented in the JCE, it will try to load it from the bouncy castle + provider. + + @param key the secrect key + @param cipherAlgorithm the cipher algorithm + @param chain the chaining mode + @param vec the Initialization vector (IV), can be null + @param cipherMode Cipher.DECRYPT_MODE or Cipher.ENCRYPT_MODE + @param padding the padding (null = NOPADDING, ANSIX923Padding, PKCS5Padding, PKCS7Padding, ISO10126Padding, ...) + @return the requested cipher + @throws GeneralSecurityException + @throws EncryptedDocumentException if the Initialization failed or if an algorithm was specified, + which depends on a missing bouncy castle provider + + + Returns a new byte array with a tRuncated to the given size. + If the hash has less then size bytes, it will be Filled with 0x36-bytes + + @param hash the to be tRuncated/filled hash byte array + @param size the size of the returned byte array + @return the pAdded hash + + + Returns a new byte array with a tRuncated to the given size. + If the hash has less then size bytes, it will be Filled with 0-bytes + + @param hash the to be tRuncated/filled hash byte array + @param size the size of the returned byte array + @return the pAdded hash + + + Create the verifier for xor obfuscation (method 1) + + @see 2.3.7.1 Binary Document Password Verifier Derivation Method 1 + @see 2.3.7.4 Binary Document Password Verifier Derivation Method 2 + @see Part 4 - Markup Language Reference - Ecma International - 3.2.12 fileSharing + + @param password the password + @return the verifier (actually a short value) + + + This method generates the xor verifier for word documents < 2007 (method 2). + Its output will be used as password input for the newer word generations which + utilize a real hashing algorithm like sha1. + + @param password the password + @return the hashed password + + @see 2.3.7.4 Binary Document Password Verifier Derivation Method 2 + @see How to Set the editing restrictions in Word using Open XML SDK 2.0 + @see Funny: How the new powerful cryptography implemented in Word 2007 turns it into a perfect tool for document password removal. + + + This method generates the xored-hashed password for word documents < 2007. + + + Convenience function which returns the reversed xored-hashed password for further + Processing in word documents 2007 and newer, which utilize a real hashing algorithm like sha1. + + + Create the xor key for xor obfuscation, which is used to create the xor array (method 1) + + @see 2.3.7.2 Binary Document XOR Array Initialization Method 1 + @see 2.3.7.4 Binary Document Password Verifier Derivation Method 2 + + @param password the password + @return the xor key + + + Creates an byte array for xor obfuscation (method 1) + + @see 2.3.7.2 Binary Document XOR Array Initialization Method 1 + @see Libre Office implementation + + @param password the password + @return the byte array for xor obfuscation + + + The provided Unicode password string is converted to a ANSI string + + @param password the password + @return the ansi bytes + + @see Part 4 - Markup Language Reference - Ecma International (3.2.29 workbookProtection) + + + Return a stream with decrypted data. +

    + Use {@link #getLength()} to Get the size of that data that can be safely read from the stream. + Just Reading to the end of the input stream is not sufficient because there are + normally pAdding bytes that must be discarded +

    + + @param dir the node to read from + @return decrypted stream +
    + + Returns the length of the encrypted data that can be safely read with + {@link #getDataStream(NPOI.POIFS.FileSystem.DirectoryNode)}. + Just Reading to the end of the input stream is not sufficient because there are + normally pAdding bytes that must be discarded + +

    + The length variable is Initialized in {@link #getDataStream(NPOI.POIFS.FileSystem.DirectoryNode)}, + an attempt to call GetLength() prior to GetDataStream() will result in InvalidOperationException. +

    + + @return length of the encrypted data + @throws InvalidOperationException if {@link #getDataStream(NPOI.POIFS.FileSystem.DirectoryNode)} + was not called +
    + + Reads and Processes OOXML Encryption Headers + The constants are largely based on ZIP constants. + + + @deprecated use GetChainingMode().ecmaId + + + A flag that specifies whether CryptoAPI RC4 or ECMA-376 encryption + ECMA-376 is used. It MUST be 1 unless flagExternal is 1. If flagExternal is 1, it MUST be 0. + + + A value that MUST be 0 if document properties are encrypted. + The encryption of document properties is specified in section 2.3.5.4. + + + A value that MUST be 1 if extensible encryption is used. If this value is 1, + the value of every other field in this structure MUST be 0. + + + A value that MUST be 1 if the protected content is an ECMA-376 document + ECMA-376. If the fAES bit is 1, the fCryptoAPI bit MUST also be 1. + + + Opens for decryption + + + Opens for decryption + + + Opens for decryption + + + Opens for decryption + + + @deprecated Use {@link #EncryptionInfo(EncryptionMode)} (fs parameter no longer required) + + + @deprecated Use {@link #EncryptionInfo(EncryptionMode)} (fs parameter no longer required) + + + @deprecated Use {@link #EncryptionInfo(EncryptionMode)} (dir parameter no longer required) + + + @deprecated use {@link #EncryptionInfo(EncryptionMode, CipherAlgorithm, HashAlgorithm, int, int, ChainingMode)} + + + @deprecated use {@link #EncryptionInfo(EncryptionMode, CipherAlgorithm, HashAlgorithm, int, int, ChainingMode)} + + + @deprecated use {@link #EncryptionInfo(EncryptionMode, CipherAlgorithm, HashAlgorithm, int, int, ChainingMode)} + + + Prepares for encryption, using the given Encryption Mode, and + all other parameters as default. + @see #EncryptionInfo(EncryptionMode, CipherAlgorithm, HashAlgorithm, int, int, ChainingMode) + + + Constructs an EncryptionInfo from scratch + + @param encryptionMode see {@link EncryptionMode} for values, {@link EncryptionMode#cryptoAPI} is for + internal use only, as it's record based + @param cipherAlgorithm + @param hashAlgorithm + @param keyBits + @param blockSize + @param chainingMode + + @throws EncryptedDocumentException if the given parameters mismatch, e.g. only certain combinations + of keyBits, blockSize are allowed for a given {@link CipherAlgorithm} + + + Initialize the builder from a stream + + + Initialize the builder from scratch + + + @return the header data + + + @return the verifier data + + + @return the decryptor + + + @return the encryptor + + + Office supports various encryption modes. + The encryption is either based on the whole Container ({@link #agile}, {@link #standard} or {@link #binaryRC4}) + or record based ({@link #cryptoAPI}). The record based encryption can't be accessed directly, but will be + invoked by using the {@link Biff8EncryptionKey#setCurrentUserPassword(String)} before saving the document. + + + Used when Checking if a key is valid for a document + + + The method name is misleading - you'll Get the encrypted verifier, not the plain verifier + @deprecated use GetEncryptedVerifier() + + + The method name is misleading - you'll Get the encrypted verifier hash, not the plain verifier hash + @deprecated use GetEnryptedVerifierHash + + + @deprecated use GetCipherAlgorithm().jceId + + + Return a output stream for encrypted data. + + @param dir the node to write to + @return encrypted stream + + + + + @return the length of the stream returned by {@link #getDataStream(DirectoryNode)} + + + Serializes the header + + + Initialize the builder from a stream + + + Initialize the builder from scratch + + + Used when Checking if a key is valid for a document + + + Fills the fields of verifier and header with the calculated hashes based + on the password and a random salt + + see [MS-OFFCRYPTO] - 2.3.4.7 ECMA-376 Document Encryption Key Generation + + + + A small base class for the various factories, e.g. WorkbookFactory, SlideShowFactory to combine common code here. + + + + + Wrap the OLE2 data in the NPOIFSFileSystem into a decrypted stream by using the given password. + + The OLE2 stream for the document + The password, null if the default password should be used + A stream for reading the decrypted data + If an error occurs while decrypting or if the password does not match + + + + Checks that the supplied InputStream (which MUST support mark and reset, or be a PushbackInputStream) has a OOXML (zip) header at the start of it. + If your InputStream does not support mark / reset, then wrap it in a PushBackInputStream, then be sure to always use that, and not the original! + + An InputStream which supports either mark/reset, or is a PushbackInputStream + + + + Copies an Entry into a target POIFS directory, recursively + + + Copies all the nodes from one POIFS Directory to another + + @param sourceRoot + is the source Directory to copy from + @param targetRoot + is the target Directory to copy to + + + Copies nodes from one Directory to the other minus the excepts + + @param filteredSource The filtering source Directory to copy from + @param filteredTarget The filtering target Directory to copy to + + + Copies nodes from one Directory to the other minus the excepts + + @param sourceRoot + is the source Directory to copy from + @param targetRoot + is the target Directory to copy to + @param excepts + is a list of Strings specifying what nodes NOT to copy + @deprecated use {@link FilteringDirectoryNode} instead + + + Copies all nodes from one POIFS to the other + + @param source + is the source POIFS to copy from + @param target + is the target POIFS to copy to + + + Copies all nodes from one POIFS to the other + + @param source + is the source POIFS to copy from + @param target + is the target POIFS to copy to + + + Copies nodes from one POIFS to the other, minus the excepts. + This delegates the filtering work to {@link FilteringDirectoryNode}, + so excepts can be of the form "NodeToExclude" or + "FilteringDirectory/ExcludedChildNode" + + @param source is the source POIFS to copy from + @param target is the target POIFS to copy to + @param excepts is a list of Entry Names to be excluded from the copy + + + Copies nodes from one POIFS to the other, minus the excepts. + This delegates the filtering work to {@link FilteringDirectoryNode}, + so excepts can be of the form "NodeToExclude" or + "FilteringDirectory/ExcludedChildNode" + + @param source is the source POIFS to copy from + @param target is the target POIFS to copy to + @param excepts is a list of Entry Names to be excluded from the copy + + + Checks to see if the two Directories hold the same contents. + For this to be true, they must have entries with the same names, + no entries in one but not the other, and the size+contents + of each entry must match, and they must share names. + To exclude certain parts of the Directory from being checked, + use a {@link FilteringDirectoryNode} + + + Checks to see if two Documents have the same name + and the same contents. (Their parent directories are + not checked) + + + + A DirectoryEntry filter, which exposes another DirectoryEntry less certain parts. + This is typically used when copying or comparing Filesystems. + + + + + Creates a filter round the specified directory, which will exclude entries such as + "MyNode" and "MyDir/IgnoreNode". The excludes can stretch into children, if they contain a /. + + The Directory to filter + The Entries to exclude + + + This class provides methods to write a DocumentEntry managed by a + {@link NPOIFSFileSystem} instance. + + + the Document's size + + + have we been closed? + + + the actual Document + + + and its Property + + + our buffer, when null we're into normal blocks + + + our main block stream, when we're into normal blocks + + + Create an OutputStream from the specified DocumentEntry. + The specified entry will be emptied. + + @param document the DocumentEntry to be written + + + Create an OutputStream to create the specified new Entry + + @param parent Where to create the Entry + @param name Name of the new entry + + + This exception is thrown when we try to open a file that doesn't + seem to actually be an OLE2 file After all + + + + This is the main class of the POIFS system; it manages the entire + life cycle of the filesystem. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Convenience method for clients that want to avoid the auto-Close behaviour of the constructor. + + The stream. + + A convenience method ( + CreateNonClosingInputStream()) has been provided for this purpose: + StreamwrappedStream = OPOIFSFileSystem.CreateNonClosingInputStream(is); + HSSFWorkbook wb = new HSSFWorkbook(wrappedStream); + is.reset(); + doSomethingElse(is); + + + + + What big block size the file uses. Most files + use 512 bytes, but a few use 4096 + + + + Initializes a new instance of the class. intended for writing + + + + + Create a OPOIFSFileSystem from an Stream. Normally the stream is Read until + EOF. The stream is always Closed. In the unlikely case that the caller has such a stream and + needs to use it after this constructor completes, a work around is to wrap the + stream in order to trap the Close() call. + + the Streamfrom which to Read the data + + + @param stream the stream to be Closed + @param success false if an exception is currently being thrown in the calling method + + + + Checks that the supplied Stream(which MUST + support mark and reset, or be a PushbackInputStream) + has a POIFS (OLE2) header at the start of it. + If your Streamdoes not support mark / reset, + then wrap it in a PushBackInputStream, then be + sure to always use that, and not the original! + + An Streamwhich supports either mark/reset, or is a PushbackStream + + true if [has POIFS header] [the specified inp]; otherwise, false. + + + + Checks if the supplied first 8 bytes of a stream / file + has a POIFS (OLE2) header. + + + + Create a new document to be Added to the root directory + + the Streamfrom which the document's data will be obtained + the name of the new POIFSDocument + the new DocumentEntry + + + + Create a new DocumentEntry in the root entry; the data will be + provided later + + the name of the new DocumentEntry + the size of the new DocumentEntry + the Writer of the new DocumentEntry + the new DocumentEntry + + + + Create a new DirectoryEntry in the root directory + + the name of the new DirectoryEntry + the new DirectoryEntry + + + open a document in the root entry's list of entries + + @param documentName the name of the document to be opened + + @return a newly opened DocumentInputStream + + @exception IOException if the document does not exist or the + name is that of a DirectoryEntry + + + + Writes the file system. + + the OutputStream to which the filesystem will be + written + + + + Get the root entry + + The root. + + + + Add a new POIFSDocument + + the POIFSDocument being Added + + + + Add a new DirectoryProperty + + The directory. + + + + Removes the specified entry. + + The entry. + + + + Get an array of objects, some of which may implement + POIFSViewable + + an array of Object; may not be null, but may be empty + + + + Get an Iterator of objects, some of which may implement + POIFSViewable + + an Iterator; may not be null, but may have an empty + back end store + + + + Give viewers a hint as to whether to call GetViewableArray or + GetViewableIterator + + true if a viewer should call GetViewableArray, false if + a viewer should call GetViewableIterator + + + + Provides a short description of the object, to be used when a + POIFSViewable object has not provided its contents. + + The short description. + + + + Gets The Big Block size, normally 512 bytes, sometimes 4096 bytes + + The size of the big block. + + + + This abstract class describes a way to read, store, chain + and free a series of blocks (be they Big or Small ones) + + + + + Returns the size of the blocks managed through the block store. + + + + + + Load the block at the given offset. + + + + + + + Tries to load the block at the given offset. + + An offset in the buffer, 0 or greater. + The resulting buffer, if possible. + True if it was possible to load the block from the specified offset, false if the offset is beyond the size of the buffer. + + + + Extends the file if required to hold blocks up to + the specified offset, and return the block from there. + + + + + + + Returns the BATBlock that handles the specified offset, + and the relative index within it + + + + + + + Works out what block follows the specified one. + + + + + + + Changes the record of what block follows the specified one. + + + + + + + Finds a free block, and returns its offset. + This method will extend the file/stream if needed, and if doing + so, allocate new FAT blocks to address the extra space. + + + + + + Creates a Detector for loops in the chain + + + + + + Used to detect if a chain has a loop in it, so + we can bail out with an error rather than + spinning away for ever... + + + + This class provides methods to read a DocumentEntry managed by a + {@link POIFSFileSystem} or {@link NPOIFSFileSystem} instance. + It Creates the appropriate one, and delegates, allowing us to + work transparently with the two. + + + returned by read operations if we're at end of document + + + For use by downstream implementations + + + Create an InputStream from the specified DocumentEntry + + @param document the DocumentEntry to be read + + @exception IOException if the DocumentEntry cannot be opened (like, maybe it has + been deleted?) + + + Create an InputStream from the specified Document + + @param document the Document to be read + + + Create an InputStream from the specified Document + + @param document the Document to be read + + + Tests if this input stream supports the mark and reset methods. + + @return true always + + + Repositions this stream to the position at the time the mark() method was + last called on this input stream. If mark() has not been called this + method repositions the stream to its beginning. + + + This class provides a wrapper over an OutputStream so that Document + Writers can't accidently go over their size limits + + @author Marc Johnson (mjohnson at apache dot org) + + + Create a DocumentOutputStream + + @param stream the OutputStream to which the data is actually + read + @param limit the maximum number of bytes that can be written + + + Writes the specified byte to this output stream. The general + contract for write is that one byte is written to the output + stream. The byte to be written is the eight low-order bits of + the argument b. The 24 high-order bits of b are ignored. + + @param b the byte. + @exception IOException if an I/O error occurs. In particular, + an IOException may be thrown if the + output stream has been closed, or if the + Writer tries to write too much data. + + + Writes b.Length bytes from the specified byte array + to this output stream. + + @param b the data. + @exception IOException if an I/O error occurs. + + + + Writes len bytes from the specified byte array starting at + offset off to this output stream. The general contract for + Write(b, off, len) is that some of the bytes in the array b are + written to the output stream in order; element b[off] is the + first byte written and b[off+len-1] is the last byte written by + this operation. + + the data. + the start offset in the data. + the number of bytes to Write. + + + + Flushes this output stream and forces any buffered output bytes to be written out + + + + Closes this output stream and releases any system resources + associated with this stream. The general contract of close is + that it closes the output stream. A closed stream cannot + perform output operations and cannot be reopened. + + @exception IOException if an I/O error occurs. + + + write the rest of the document's data (fill in at the end) + + @param totalLimit the actual number of bytes the corresponding + document must fill + @param fill the byte to fill remaining space with + + @exception IOException on I/O error + + + This class provides methods to read a DocumentEntry managed by a + {@link NPOIFSFileSystem} instance. + + + current offset into the Document + + + current block count + + + current marked offset into the Document (used by mark and Reset) + + + and the block count for it + + + the Document's size + + + have we been closed? + + + the actual Document + + + Create an InputStream from the specified DocumentEntry + + @param document the DocumentEntry to be read + + @exception IOException if the DocumentEntry cannot be opened (like, maybe it has + been deleted?) + + + Create an InputStream from the specified Document + + @param document the Document to be read + + + Repositions this stream to the position at the time the mark() method was + last called on this input stream. If mark() has not been called this + method repositions the stream to its beginning. + + + This class manages a document in the NIO POIFS filesystem. + This is the {@link NPOIFSFileSystem} version. + + + Constructor for an existing Document + + + Constructor for an existing Document + + + Constructor for a new Document + + @param name the name of the POIFSDocument + @param stream the InputStream we read data from + + + Frees the underlying stream and property + + + @return size of the document + + + @return the instance's DocumentProperty + + + Get an array of objects, some of which may implement POIFSViewable + + @return an array of Object; may not be null, but may be empty + + + Get an Iterator of objects, some of which may implement POIFSViewable + + @return an Iterator; may not be null, but may have an empty back end + store + + + Provides a short description of the object, to be used when a + POIFSViewable object has not provided its contents. + + @return short description + + + This is the main class of the POIFS system; it manages the entire + life cycle of the filesystem. + This is the new NIO version + + + Convenience method for clients that want to avoid the auto-close behaviour of the constructor. + + + What big block size the file uses. Most files + use 512 bytes, but a few use 4096 + + + Constructor, intended for writing + + +

    Creates a POIFSFileSystem from a File. This uses less memory than + creating from an InputStream. The File will be opened read-only

    + +

    Note that with this constructor, you will need to call {@link #close()} + when you're done to have the underlying file closed, as the file is + kept open during normal operation to read the data out.

    + + @param file the File from which to read the data + + @exception IOException on errors reading, or on invalid data +
    + +

    Creates a POIFSFileSystem from a File. This uses less memory than + creating from an InputStream.

    + +

    Note that with this constructor, you will need to call {@link #close()} + when you're done to have the underlying file closed, as the file is + kept open during normal operation to read the data out.

    + + @param file the File from which to read or read/write the data + @param readOnly whether the POIFileSystem will only be used in read-only mode + + @exception IOException on errors reading, or on invalid data +
    + + *

    Creates a POIFSFileSystem from an open FileChannel. This uses + * less memory than creating from an InputStream. The stream will + * be used in read-only mode.

    + * + *

    Note that with this constructor, you will need to call {@link #close()} + * when you're done to have the underlying Channel closed, as the channel is + * kept open during normal operation to read the data out.

    + * + * @param channel the FileChannel from which to read the data + * + * @exception IOException on errors reading, or on invalid data +
    + +

    Creates a POIFSFileSystem from an open FileChannel. This uses + less memory than creating from an InputStream.

    + +

    Note that with this constructor, you will need to call {@link #close()} + when you're done to have the underlying Channel closed, as the channel is + kept open during normal operation to read the data out.

    + + @param channel the FileChannel from which to read or read/write the data + @param readOnly whether the POIFileSystem will only be used in read-only mode + + @exception IOException on errors reading, or on invalid data +
    + + Create a POIFSFileSystem from an InputStream. Normally the stream is read until + EOF. The stream is always closed.

    + + Some streams are usable After reaching EOF (typically those that return true + for markSupported()). In the unlikely case that the caller has such a stream + and needs to use it After this constructor completes, a work around is to wrap the + stream in order to trap the close() call. A convenience method ( + CreateNonClosingInputStream()) has been provided for this purpose: +

    +             InputStream wrappedStream = POIFSFileSystem.CreateNonClosingInputStream(is);
    +             HSSFWorkbook wb = new HSSFWorkbook(wrappedStream);
    +             is.Reset();
    +             doSomethingElse(is);
    +             
    + Note also the special case of MemoryStream for which the close() + method does nothing. +
    +             MemoryStream bais = ...
    +             HSSFWorkbook wb = new HSSFWorkbook(bais); // calls bais.Close() !
    +             bais.Reset(); // no problem
    +             doSomethingElse(bais);
    +             
    + + @param stream the InputStream from which to read the data + + @exception IOException on errors Reading, or on invalid data +
    + + @param stream the stream to be closed + @param success false if an exception is currently being thrown in the calling method + + + Checks that the supplied InputStream (which MUST + support mark and reset, or be a PushbackInputStream) + has a POIFS (OLE2) header at the start of it. + If your InputStream does not support mark / reset, + then wrap it in a PushBackInputStream, then be + sure to always use that, and not the original! + @param inp An InputStream which supports either mark/reset, or is a PushbackInputStream + + + Checks if the supplied first 8 bytes of a stream / file + has a POIFS (OLE2) header. + + + Read and process the PropertiesTable and the + FAT / XFAT blocks, so that we're Ready to + work with the file + + + Load the block at the given offset. + + + Try to load the block at the given offset, and if the offset is beyond the end of the buffer, return false. + + + Load the block at the given offset, + extending the file if needed + + + Returns the BATBlock that handles the specified offset, + and the relative index within it + + + Works out what block follows the specified one. + + + Changes the record of what block follows the specified one. + + + Finds a free block, and returns its offset. + This method will extend the file if needed, and if doing + so, allocate new FAT blocks to Address the extra space. + + + For unit Testing only! Returns the underlying + properties table + + + Returns the MiniStore, which performs a similar low + level function to this, except for the small blocks. + + + add a new POIFSDocument to the FileSytem + + @param document the POIFSDocument being Added + + + add a new DirectoryProperty to the FileSystem + + @param directory the DirectoryProperty being Added + + + Create a new document to be Added to the root directory + + @param stream the InputStream from which the document's data + will be obtained + @param name the name of the new POIFSDocument + + @return the new DocumentEntry + + @exception IOException on error creating the new POIFSDocument + + + create a new DocumentEntry in the root entry; the data will be + provided later + + @param name the name of the new DocumentEntry + @param size the size of the new DocumentEntry + @param Writer the Writer of the new DocumentEntry + + @return the new DocumentEntry + + @exception IOException + + + create a new DirectoryEntry in the root directory + + @param name the name of the new DirectoryEntry + + @return the new DirectoryEntry + + @exception IOException on name duplication + + + Set the contents of a document in1 the root directory, + creating if needed, otherwise updating + + @param stream the InputStream from which the document's data + will be obtained + @param name the name of the new or existing POIFSDocument + + @return the new or updated DocumentEntry + + @exception IOException on error populating the POIFSDocument + + + Does the filesystem support an in-place write via + {@link #writeFilesystem()} ? If false, only writing out to + a brand new file via {@link #writeFilesystem(OutputStream)} + is supported. + + + Write the filesystem out to the open file. Will thrown an + {@link ArgumentException} if opened from an + {@link InputStream}. + + @exception IOException thrown on errors writing to the stream + + + Write the filesystem out + + @param stream the OutputStream to which the filesystem will be + written + + @exception IOException thrown on errors writing to the stream + + + Has our in-memory objects write their state + to their backing blocks + + + Closes the FileSystem, freeing any underlying files, streams + and buffers. After this, you will be unable to read or + write from the FileSystem. + + + Get the root entry + + @return the root entry + + + open a document in the root entry's list of entries + + @param documentName the name of the document to be opened + + @return a newly opened DocumentInputStream + + @exception IOException if the document does not exist or the + name is that of a DirectoryEntry + + + remove an entry + + @param entry to be Removed + + + Get an array of objects, some of which may implement + POIFSViewable + + @return an array of Object; may not be null, but may be empty + + + Get an Iterator of objects, some of which may implement + POIFSViewable + + @return an Iterator; may not be null, but may have an empty + back end store + + + Provides a short description of the object, to be used when a + POIFSViewable object has not provided its contents. + + @return short description + + + @return The Big Block size, normally 512 bytes, sometimes 4096 bytes + + + @return The Big Block size, normally 512 bytes, sometimes 4096 bytes + + + This class handles the MiniStream (small block store) + in the NIO case for {@link NPOIFSFileSystem} + + + Load the block at the given offset, optionally throwing an exception if the offset is beyond the limit of the buffer. + + + Load the block at the given offset. + + + Try to load the block at the given offset, and if the offset is beyond the end of the buffer, return false. + + + Load the block, extending the underlying stream if needed + + + Returns the BATBlock that handles the specified offset, + and the relative index within it + + + Works out what block follows the specified one. + + + Changes the record of what block follows the specified one. + + + Finds a free block, and returns its offset. + This method will extend the file if needed, and if doing + so, allocate new FAT blocks to Address the extra space. + + + + Writes the SBATs to their backing blocks, and updates + the mini-stream size in the properties. Stream size is + based on full blocks used, not the data within the streams + + + + This handles Reading and writing a stream within a + {@link NPOIFSFileSystem}. It can supply an iterator + to read blocks, and way to write out to existing and + new blocks. + Most users will want a higher level version of this, + which deals with properties to track which stream + this is. + This only works on big block streams, it doesn't + handle small block ones. + This uses the new NIO code + + TODO Implement a streaming write method, and append + + + Constructor for an existing stream. It's up to you + to know how to Get the start block (eg from a + {@link HeaderBlock} or a {@link Property}) + + + Constructor for a new stream. A start block won't + be allocated until you begin writing to it. + + + What block does this stream start at? + Will be {@link POIFSConstants#END_OF_CHAIN} for a + new stream that hasn't been written to yet. + + + Returns an iterator that'll supply one {@link ByteBuffer} + per block in the stream. + + + Updates the contents of the stream to the new + Set of bytes. + Note - if this is property based, you'll still + need to update the size in the property yourself + + + Frees all blocks in the stream + + + This class provides methods to read a DocumentEntry managed by a + {@link POIFSFileSystem} instance. + + @author Marc Johnson (mjohnson at apache dot org) + + + current offset into the Document + + + current marked offset into the Document (used by mark and Reset) + + + the Document's size + + + have we been closed? + + + the actual Document + + + the data block Containing the current stream pointer + + + Create an InputStream from the specified DocumentEntry + + @param document the DocumentEntry to be read + + @exception IOException if the DocumentEntry cannot be opened (like, maybe it has + been deleted?) + + + Create an InputStream from the specified Document + + @param document the Document to be read + + + Repositions this stream to the position at the time the mark() method was + last called on this input stream. If mark() has not been called this + method repositions the stream to its beginning. + + + + This class manages a document in the POIFS filesystem. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + the name of the POIFSDocument + the InputStream we read data from + + + + Constructor from small blocks + + the name of the POIFSDocument + the small blocks making up the POIFSDocument + the actual length of the POIFSDocument + + + + read data from the internal stores + + the buffer to write to + the offset into our storage to read from + + + + Writes the blocks. + + The stream. + + + + Gets the number of BigBlock's this instance uses + + count of BigBlock instances + + + + Gets the document property. + + The document property. + + + + Provides a short description of the object to be used when a + POIFSViewable object has not provided its contents. + + true if [prefer array]; otherwise, false. + + + + Gets the short description. + + The short description. + + + + Gets the size. + + The size. + + + + Gets the small blocks. + + The small blocks. + + + + Sets the start block for this instance + + + index into the array of BigBlock instances making up the the filesystem + + + + + Get an array of objects, some of which may implement POIFSViewable + + The viewable array. + + + + Give viewers a hint as to whether to call ViewableArray or ViewableIterator + + The viewable iterator. + + + + This interface defines behaviors for objects managed by the Block + Allocation Table (BAT). + @author Marc Johnson (mjohnson at apache dot org) + + + + + Gets the number of BigBlock's this instance uses + + count of BigBlock instances + + + + Sets the start block for this instance + + index into the array of BigBlock instances making up the the filesystem + + + + This interface defines methods specific to Directory objects + managed by a Filesystem instance. + @author Marc Johnson (mjohnson at apache dot org) + + + + + get an iterator of the Entry instances contained directly in + this instance (in other words, children only; no grandchildren + etc.) + + The entries.never null, but hasNext() may return false + immediately (i.e., this DirectoryEntry is empty). All + objects retrieved by next() are guaranteed to be + implementations of Entry. + + + + get the names of all the Entries contained directly in this + instance (in other words, names of children only; no grandchildren etc). + + the names of all the entries that may be retrieved with + getEntry(String), which may be empty (if this DirectoryEntry is empty + + + + + is this DirectoryEntry empty? + + true if this instance contains no Entry instances; otherwise, false. + + + + find out how many Entry instances are contained directly within + this DirectoryEntry + + number of immediately (no grandchildren etc.) contained + Entry instances + + + + get a specified Entry by name + + the name of the Entry to obtain. + the specified Entry, if it is directly contained in + this DirectoryEntry + + + + Create a new DocumentEntry + + the name of the new DocumentEntry + the Stream from which to Create the new DocumentEntry + the new DocumentEntry + + + + Create a new DocumentEntry; the data will be provided later + + the name of the new DocumentEntry + the size of the new DocumentEntry + BeforeWriting event handler + the new DocumentEntry + + + + Create a new DirectoryEntry + + the name of the new DirectoryEntry + the name of the new DirectoryEntry + + + + Gets or sets the storage ClassID. + + The storage ClassID. + + + + Checks if entry with specified name present + + entry name + true if have + + + + Simple implementation of DirectoryEntry + @author Marc Johnson (mjohnson at apache dot org) + + + + + Create a DirectoryNode. This method Is not public by design; it + Is intended strictly for the internal use of this package + + the DirectoryProperty for this DirectoryEntry + the OPOIFSFileSystem we belong to + the parent of this entry + + + + Create a DirectoryNode. This method Is not public by design; it + Is intended strictly for the internal use of this package + + the DirectoryProperty for this DirectoryEntry + the POIFSFileSystem we belong to + the parent of this entry + + + + open a document in the directory's entry's list of entries + + the name of the document to be opened + a newly opened DocumentStream + + + + Create a new DocumentEntry; the data will be provided later + + the name of the new documentEntry + the new DocumentEntry + + + + Change a contained Entry's name + + the original name + the new name + true if the operation succeeded, else false + + + + Deletes the entry. + + the EntryNode to be Deleted + true if the entry was Deleted, else false + + + + Gets the path. + + this directory's path representation + + + + return the filesystem that this belongs to + TODO: Temporary workaround during #56791 + + + + + If this is OPOIFS based, return the NPOIFSFileSystem + that this belong to, otherwise Null if NPOIFS based + return the filesystem that this belongs to + + + + + If this is NPOIFS based, return the NPOIFSFileSystem + that this belong to, otherwise Null if OPOIFS based. + return the filesystem that this belongs to + + + + + get an iterator of the Entry instances contained directly in + this instance (in other words, children only; no grandchildren + etc.) + + + The entries.never null, but hasNext() may return false + immediately (i.e., this DirectoryEntry is empty). All + objects retrieved by next() are guaranteed to be + implementations of Entry. + + + + get the names of all the Entries contained directly in this + instance (in other words, names of children only; no grandchildren + etc). + + @return the names of all the entries that may be retrieved with + getEntry(String), which may be empty (if this + DirectoryEntry is empty) + + + + is this DirectoryEntry empty? + + + true if this instance contains no Entry instances; otherwise, false. + + + + + find out how many Entry instances are contained directly within + this DirectoryEntry + + + number of immediately (no grandchildren etc.) contained + Entry instances + + + + + get a specified Entry by name + + the name of the Entry to obtain. + + the specified Entry, if it is directly contained in + this DirectoryEntry + + + + + Create a new DirectoryEntry + + the name of the new DirectoryEntry + the name of the new DirectoryEntry + + + Set the contents of a document, creating if needed, + otherwise updating. Returns the created / updated DocumentEntry + + @param name the name of the new or existing DocumentEntry + @param stream the InputStream from which to populate the DocumentEntry + + @return the new or updated DocumentEntry + + @exception IOException + + + + Gets or Sets the storage clsid for the directory entry + + The storage ClassID. + + + + Is this a DirectoryEntry? + + true if the Entry Is a DirectoryEntry, else false + + + + extensions use this method to verify internal rules regarding + deletion of the underlying store. + + true if it's ok to Delete the underlying store, else + false + + + + Get an array of objects, some of which may implement POIFSViewable + + an array of Object; may not be null, but may be empty + + + + Get an Iterator of objects, some of which may implement + POIFSViewable + + an Iterator; may not be null, but may have an empty + back end store + + + + Give viewers a hint as to whether to call GetViewableArray or + GetViewableIterator + + true if a viewer should call GetViewableArray; otherwise, falseif + a viewer should call GetViewableIterator + + + + Provides a short description of the object, to be used when a + POIFSViewable object has not provided its contents. + + The short description. + + + + Class DocumentDescriptor + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + the Document path + the Document name + + + + Gets the path. + + The path. + + + + Gets the name. + + The name. + + + + equality. Two DocumentDescriptor instances are equal if they + have equal paths and names + + the object we're checking equality for + true if the object is equal to this object + + + + Serves as a hash function for a particular type. + + + hashcode + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + This interface defines methods specific to Document objects + managed by a Filesystem instance. + @author Marc Johnson (mjohnson at apache dot org) + + + + + get the size of the document, in bytes + + size in bytes + + + + Simple implementation of DocumentEntry + @author Marc Johnson (mjohnson at apache dot org) + + + + create a DocumentNode. This method Is not public by design; it + Is intended strictly for the internal use of this package + + @param property the DocumentProperty for this DocumentEntry + @param parent the parent of this entry + + + get the POIFSDocument + + @return the internal POIFSDocument + + + get the zize of the document, in bytes + + @return size in bytes + + + Is this a DocumentEntry? + + @return true if the Entry Is a DocumentEntry, else false + + + extensions use this method to verify internal rules regarding + deletion of the underlying store. + + @return true if it's ok to delete the underlying store, else + false + + + Get an array of objects, some of which may implement + POIFSViewable + + @return an array of Object; may not be null, but may be empty + + + Get an Iterator of objects, some of which may implement + POIFSViewable + + @return an Iterator; may not be null, but may have an empty + back end store + + + Give viewers a hint as to whether to call getViewableArray or + getViewableIterator + + @return true if a viewer should call getViewableArray, false if + a viewer should call getViewableIterator + + + Provides a short description of the object, to be used when a + POIFSViewable object has not provided its contents. + + @return short description + + + + This interface provides access to an object managed by a Filesystem + instance. Entry objects are further divided into DocumentEntry and + DirectoryEntry instances. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Get the name of the Entry + + The name. + + + + Is this a DirectoryEntry? + + + true if the Entry Is a DirectoryEntry; otherwise, false. + + + + + Is this a DocumentEntry? + + + true if the Entry Is a DocumentEntry; otherwise, false. + + + + + Get this Entry's parent (the DirectoryEntry that owns this + Entry). All Entry objects, except the root Entry, has a parent. + + this Entry's parent; null iff this Is the root Entry + This property is moved to EntryNode + + + + Delete this Entry. ThIs operation should succeed, but there are + special circumstances when it will not: + If this Entry Is the root of the Entry tree, it cannot be + deleted, as there Is no way to Create another one. + If this Entry Is a directory, it cannot be deleted unless it Is + empty. + + true if the Entry was successfully deleted, else false + + + + Rename this Entry. ThIs operation will fail if: + There Is a sibling Entry (i.e., an Entry whose parent Is the + same as this Entry's parent) with the same name. + ThIs Entry Is the root of the Entry tree. Its name Is dictated + by the Filesystem and many not be Changed. + + the new name for this Entry + true if the operation succeeded, else false + + + + Abstract implementation of Entry + Extending classes should override isDocument() or isDirectory(), as + appropriate + Extending classes must override isDeleteOK() + @author Marc Johnson (mjohnson at apache dot org) + + + + + Create a DocumentNode. ThIs method Is not public by design; it + Is intended strictly for the internal use of extending classes + + the Property for this Entry + the parent of this entry + + + + grant access to the property + + the property backing this entry + + + + Is this the root of the tree? + + true if this instance is root; otherwise, false. + + + + extensions use this method to verify internal rules regarding + deletion of the underlying store. + + + true if it's ok to Delete the underlying store; otherwise, false. + + + + + Get the name of the Entry + + The name. + Get the name of the Entry + @return name + + + + Is this a DirectoryEntry? + + + true if the Entry Is a DirectoryEntry; otherwise, false. + + + + + Is this a DocumentEntry? + + + true if the Entry Is a DocumentEntry; otherwise, false. + + + + + Get this Entry's parent (the DocumentEntry that owns this + Entry). All Entry objects, except the root Entry, has a parent. + + this Entry's parent; null iff this Is the root Entry + + + + Delete this Entry. ThIs operation should succeed, but there are + special circumstances when it will not: + If this Entry Is the root of the Entry tree, it cannot be + deleted, as there Is no way to Create another one. + If this Entry Is a directory, it cannot be deleted unless it Is + empty. + + + true if the Entry was successfully deleted, else false + + + + + Rename this Entry. ThIs operation will fail if: + There Is a sibling Entry (i.e., an Entry whose parent Is the + same as this Entry's parent) with the same name. + ThIs Entry Is the root of the Entry tree. Its name Is dictated + by the Filesystem and many not be Changed. + + the new name for this Entry + + true if the operation succeeded, else false + + + + + This exception is thrown when we try to open a file that's actually + an Office 2007+ XML file, rather than an OLE2 file (which is what + POIFS works with) + + + + Represents an Ole10Native record which is wrapped around certain binary + files being embedded in OLE2 documents. + + @author Rainer Schwarze + + + the field encoding mode - merely a try-and-error guess ... + + + + the data is stored in parsed format - including label, command, etc. + + + the data is stored raw after the length field + + + the data is stored raw after the length field and the flags1 field + + + + Creates an instance of this class from an embedded OLE Object. The OLE Object is expected + to include a stream "{01}Ole10Native" which Contains the actual + data relevant for this class. + + poifs POI Filesystem object + Returns an instance of this class + + + + Creates an instance of this class from an embedded OLE Object. The OLE Object is expected + to include a stream "{01}Ole10Native" which contains the actual + data relevant for this class. + + directory POI Filesystem object + Returns an instance of this class + + + Creates an instance and fills the fields based on ... the fields + + + Creates an instance and Fills the fields based on the data in the given buffer. + + @param data The buffer Containing the Ole10Native record + @param offset The start offset of the record in the buffer + @throws Ole10NativeException on invalid or unexcepted data format + + + Returns the value of the totalSize field - the total length of the structure + is totalSize + 4 (value of this field + size of this field). + + @return the totalSize + + + Returns flags1 - currently unknown - usually 0x0002. + + @return the flags1 + + + Returns the label field - usually the name of the file (without directory) but + probably may be any name specified during packaging/embedding the data. + + @return the label + + + Returns the fileName field - usually the name of the file being embedded + including the full path. + + @return the fileName + + + Returns flags2 - currently unknown - mostly 0x0000. + + @return the flags2 + + + Returns unknown1 field - currently unknown. + + @return the unknown1 + + + Returns the command field - usually the name of the file being embedded + including the full path, may be a command specified during embedding the file. + + @return the command + + + Returns the size of the embedded file. If the size is 0 (zero), no data has been + embedded. To be sure, that no data has been embedded, check whether + {@link #getDataBuffer()} returns null. + + @return the dataSize + + + Returns the buffer Containing the embedded file's data, or null + if no data was embedded. Note that an embedding may provide information about + the data, but the actual data is not included. (So label, filename etc. are + available, but this method returns null.) + + @return the dataBuffer + + + Returns the flags3 - currently unknown. + + @return the flags3 + + + Have the contents printer out into an OutputStream, used when writing a + file back out to disk (Normally, atom classes will keep their bytes + around, but non atom classes will just request the bytes from their + children, then chuck on their header and return) + + + + Class POIFSDocumentPath + @author Marc Johnson (mjohnson at apache dot org) + + + + + simple constructor for the path of a document that is in the + root of the POIFSFileSystem. The constructor that takes an + array of Strings can also be used to create such a + POIFSDocumentPath by passing it a null or empty String array + + + + + constructor for the path of a document that is not in the root + of the POIFSFileSystem + + the Strings making up the path to a document. + The Strings must be ordered as they appear in + the directory hierarchy of the the document + -- the first string must be the name of a + directory in the root of the POIFSFileSystem, + and every Nth (for N > 1) string thereafter + must be the name of a directory in the + directory identified by the (N-1)th string. + If the components parameter is null or has + zero length, the POIFSDocumentPath is + appropriate for a document that is in the + root of a POIFSFileSystem + + + + constructor that adds additional subdirectories to an existing + path + + the existing path + the additional subdirectory names to be added + + + + equality. Two POIFSDocumentPath instances are equal if they + have the same number of component Strings, and if each + component String is equal to its coresponding component String + + the object we're checking equality for + true if the object is equal to this object + + + + get the specified component + + which component (0 ... length() - 1) + the nth component; + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets the length. + + the number of components + + + + Returns the path's parent or null if this path + is the root path. + + path of parent, or null if this path is the root path + + +

    Returns the last name in the document path's name sequence. + If the document path's name sequence is empty, then the empty string is returned.

    + + @since 2016-04-09 + @return The last name in the document path's name sequence, or empty string if this is the root path +
    + + + This class provides methods to read a DocumentEntry managed by a + Filesystem instance. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Create an InputStream from the specified DocumentEntry + + the DocumentEntry to be read + + + + Create an InputStream from the specified Document + + the Document to be read + + + + at the end Of document. + + + + + + Returns the number of bytes that can be read (or skipped over) + from this input stream without blocking by the next caller of a + method for this input stream. The next caller might be the same + thread or or another thread. + + the number of bytes that can be read from this input + stream without blocking. + + + + Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. + + + + + Reads some number of bytes from the input stream and stores + them into the buffer array b. The number of bytes actually read + is returned as an integer. The definition of this method in + java.io.InputStream allows this method to block, but it won't. + If b is null, a NullPointerException is thrown. If the length + of b is zero, then no bytes are read and 0 is returned; + otherwise, there is an attempt to read at least one byte. If no + byte is available because the stream is at end of file, the + value -1 is returned; otherwise, at least one byte is read and + stored into b. + The first byte read is stored into element b[0], the next one + into b[1], and so on. The number of bytes read is, at most, + equal to the length of b. Let k be the number of bytes actually + read; these bytes will be stored in elements b[0] through + b[k-1], leaving elements b[k] through b[b.length-1] unaffected. + If the first byte cannot be read for any reason other than end + of file, then an IOException is thrown. In particular, an + IOException is thrown if the input stream has been closed. + The read(b) method for class InputStream has the same effect as: + + the buffer into which the data is read. + the total number of bytes read into the buffer, or -1 + if there is no more data because the end of the stream + has been reached. + + + + Reads up to len bytes of data from the input stream into an + array of bytes. An attempt is made to read as many as len + bytes, but a smaller number may be read, possibly zero. The + number of bytes actually read is returned as an integer. + The definition of this method in java.io.InputStream allows it + to block, but it won't. + If b is null, a NullPointerException is thrown. + If off is negative, or len is negative, or off+len is greater + than the length of the array b, then an + IndexOutOfBoundsException is thrown. + If len is zero, then no bytes are read and 0 is returned; + otherwise, there is an attempt to read at least one byte. If no + byte is available because the stream is at end of file, the + value -1 is returned; otherwise, at least one byte is read and + stored into b. + The first byte read is stored into element b[off], the next one + into b[off+1], and so on. The number of bytes read is, at most, + equal to len. Let k be the number of bytes actually read; these + bytes will be stored in elements b[off] through b[off+k-1], + leaving elements b[off+k] through b[off+len-1] unaffected. + In every case, elements b[0] through b[off] and elements + b[off+len] through b[b.length-1] are unaffected. + If the first byte cannot be read for any reason other than end + of file, then an IOException is thrown. In particular, an + IOException is thrown if the input stream has been closed. + + the buffer into which the data is read. + the start offset in array b at which the data is + written. + the maximum number of bytes to read. + the total number of bytes read into the buffer, or -1 + if there is no more data because the end of the stream + has been reached. + + + + Reads the next byte of data from the input stream. The value + byte is returned as an int in the range 0 to 255. If no byte is + available because the end of the stream has been reached, the + value -1 is returned. The definition of this method in + java.io.InputStream allows this method to block, but it won't. + + the next byte of data, or -1 if the end of the stream + is reached. + + + + + When overridden in a derived class, sets the position within the current stream. + + A byte offset relative to the parameter. + A value of type indicating the reference point used to obtain the new position. + + The new position within the current stream. + + + An I/O error occurs. + + + The stream does not support seeking, such as if the stream is constructed from a pipe or console output. + + + Methods were called after the stream was closed. + + + + + Skips the specified n. + + The n. + + + + + When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + An array of bytes. This method copies bytes from to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The number of bytes to be written to the current stream. + + The sum of and is greater than the buffer length. + + + is null. + + + or is negative. + + + An I/O error occurs. + + + The stream does not support writing. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports reading. + + + true if the stream supports reading; otherwise, false. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports seeking. + + + true if the stream supports seeking; otherwise, false. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports writing. + + + true if the stream supports writing; otherwise, false. + + + + + When overridden in a derived class, gets the length in bytes of the stream. + + + + A long value representing the length of the stream in bytes. + + + A class derived from Stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, gets or sets the position within the current stream. + + + + The current position within the stream. + + + An I/O error occurs. + + + The stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + This class provides a wrapper over an OutputStream so that Document + writers can't accidently go over their size limits + @author Marc Johnson (mjohnson at apache dot org) + + + + + Create a POIFSDocumentWriter + + the OutputStream to which the data is actually + the maximum number of bytes that can be written + + + + Closes this output stream and releases any system resources + associated with this stream. The general contract of close is + that it closes the output stream. A closed stream cannot + perform output operations and cannot be reopened. + + + + + Flushes this output stream and forces any buffered output bytes + to be written out. + + + + + Writes b.length bytes from the specified byte array + to this output stream. + + the data. + + + + Writes len bytes from the specified byte array starting at + offset off to this output stream. The general contract for + write(b, off, len) is that some of the bytes in the array b are + written to the output stream in order; element b[off] is the + first byte written and b[off+len-1] is the last byte written by + this operation. + If b is null, a NullPointerException is thrown. + If off is negative, or len is negative, or off+len is greater + than the length of the array b, then an + IndexOutOfBoundsException is thrown. + + the data. + the start offset in the data. + the number of bytes to write. + + + + Writes the specified byte to this output stream. The general + contract for write is that one byte is written to the output + stream. The byte to be written is the eight low-order bits of + the argument b. The 24 high-order bits of b are ignored. + + the byte. + + + + write the rest of the document's data (fill in at the end) + + the actual number of bytes the corresponding + document must fill + the byte to fill remaining space with + + + + When overridden in a derived class, gets a value indicating whether the current stream supports reading. + + + true if the stream supports reading; otherwise, false. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports seeking. + + + true if the stream supports seeking; otherwise, false. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports writing. + + + true if the stream supports writing; otherwise, false. + + + + + When overridden in a derived class, gets the length in bytes of the stream. + + + + A long value representing the length of the stream in bytes. + + + A class derived from Stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, gets or sets the position within the current stream. + + + + The current position within the stream. + + + An I/O error occurs. + + + The stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + This is the main class of the POIFS system; it manages the entire + life cycle of the filesystem. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Convenience method for clients that want to avoid the auto-Close behaviour of the constructor. + + The stream. + + A convenience method ( + CreateNonClosingInputStream()) has been provided for this purpose: + StreamwrappedStream = POIFSFileSystem.CreateNonClosingInputStream(is); + HSSFWorkbook wb = new HSSFWorkbook(wrappedStream); + is.reset(); + doSomethingElse(is); + + + + + + Initializes a new instance of the class. intended for writing + + + + + Create a POIFSFileSystem from an Stream. Normally the stream is Read until + EOF. The stream is always Closed. In the unlikely case that the caller has such a stream and + needs to use it after this constructor completes, a work around is to wrap the + stream in order to trap the Close() call. + + the Streamfrom which to Read the data + + +

    Creates a POIFSFileSystem from a File. This uses less memory than + creating from an InputStream.

    + +

    Note that with this constructor, you will need to call {@link #close()} + when you're done to have the underlying file closed, as the file is + kept open during normal operation to read the data out.

    + @param readOnly whether the POIFileSystem will only be used in read-only mode + + @param file the File from which to read the data + + @exception IOException on errors reading, or on invalid data +
    + +

    Creates a POIFSFileSystem from a File. This uses less memory than + creating from an InputStream. The File will be opened read-only

    + +

    Note that with this constructor, you will need to call {@link #close()} + when you're done to have the underlying file closed, as the file is + kept open during normal operation to read the data out.

    + + @param file the File from which to read the data + + @exception IOException on errors reading, or on invalid data +
    + + + Checks that the supplied Stream(which MUST + support mark and reset, or be a PushbackInputStream) + has a POIFS (OLE2) header at the start of it. + If your Streamdoes not support mark / reset, + then wrap it in a PushBackInputStream, then be + sure to always use that, and not the original! + + An Streamwhich supports either mark/reset, or is a PushbackStream + + true if [has POIFS header] [the specified inp]; otherwise, false. + + + + Checks if the supplied first 8 bytes of a stream / file + has a POIFS (OLE2) header. + + + Creates a new {@link POIFSFileSystem} in a new {@link File}. + Use {@link #POIFSFileSystem(File)} to open an existing File, + this should only be used to create a new empty filesystem. + + @param file The file to create and open + @return The created and opened {@link POIFSFileSystem} + + + This tool extracts out the source of all VBA Modules of an office file, + both OOXML (eg XLSM) and OLE2/POIFS (eg DOC), to STDOUT or a directory. + + @since 3.15-beta2 + + + Extracts the VBA modules from a macro-enabled office file and Writes them + to files in outputDir. + + Creates the outputDir, directory, including any necessary but + nonexistent parent directories, if outputDir does not exist. + If outputDir is null, Writes the contents to standard out instead. + + @param input the macro-enabled office file. + @param outputDir the directory to write the extracted VBA modules to. + @param extension file extension of the extracted VBA modules + @since 3.15-beta2 + + + Extracts the VBA modules from a macro-enabled office file and Writes them + to .vba files in outputDir. + + Creates the outputDir, directory, including any necessary but + nonexistent parent directories, if outputDir does not exist. + If outputDir is null, Writes the contents to standard out instead. + + @param input the macro-enabled office file. + @param outputDir the directory to write the extracted VBA modules to. + @since 3.15-beta2 + + + Finds all VBA Macros in an office file (OLE2/POIFS and OOXML/OPC), + and returns them. + + @since 3.15-beta2 + + + Reads all macros from all modules of the opened office file. + @return All the macros and their contents + + @since 3.15-beta2 + + + Recursively traverses directory structure rooted at dir. + For each macro module that is found, the module's name and code are + Added to modules. + + @param dir + @param modules + @throws IOException + @since 3.15-beta2 + + + Read length bytes of MBCS (multi-byte character Set) characters from the stream + + @param stream the inputstream to read from + @param length number of bytes to read from stream + @param charset the character Set encoding of the bytes in the stream + @return a java String in the supplied character Set + @throws IOException + + + Reads module from DIR node in input stream and Adds it to the modules map for decompression later + on the second pass through this function, the module will be decompressed + + Side-effects: Adds a new module to the module map or Sets the buf field on the module + to the decompressed stream contents (the VBA code for one module) + + @param in the Run-length encoded input stream to read from + @param streamName the stream name of the module + @param modules a map to store the modules + @throws IOException + + + Skips n bytes in an input stream, throwing IOException if the + number of bytes skipped is different than requested. + @throws IOException + + + Reads VBA Project modules from a VBA Project directory located at + macroDir into modules. + + @since 3.15-beta2 + + + Class POIFSWriterEvent + + @author Marc Johnson (mjohnson at apache dot org) + @version %I%, %G% + + + namespace scoped constructor + + @param stream the DocumentOutputStream, freshly opened + @param path the path of the document + @param documentName the name of the document + @param limit the limit, in bytes, that can be written to the + stream + + + @return the DocumentOutputStream, freshly opened + + + @return the document's path + + + @return the document's name + + + @return the limit on writing, in bytes + + + + EventArgs for POIFSWriter + author: Tony Qu + + + + + Initializes a new instance of the class. + + the POIFSDocumentWriter, freshly opened + the path of the document + the name of the document + the limit, in bytes, that can be written to the stream + + + + Gets the limit on writing, in bytes + + The limit. + + + + Gets the document's name + + The name. + + + + Gets the document's path + + The path. + + + + the POIFSDocumentWriter, freshly opened + + The stream. + + + Interface POIFSWriterListener + + @author Marc Johnson (mjohnson at apache dot org) + @version %I%, %G% + + + Process a POIFSWriterEvent that this listener had registered + for + + @param event the POIFSWriterEvent + + + + An event-driven Reader for POIFS file systems. Users of this class + first Create an instance of it, then use the RegisterListener + methods to Register POIFSReaderListener instances for specific + documents. Once all the listeners have been Registered, the Read() + method is called, which results in the listeners being notified as + their documents are Read. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + + + + Read from an InputStream and Process the documents we Get + + the InputStream from which to Read the data + POIFSDocument list + + + Register a POIFSReaderListener for all documents + + @param listener the listener to be registered + + @exception NullPointerException if listener is null + @exception InvalidOperationException if read() has already been + called + + + Register a POIFSReaderListener for a document in the root + directory + + @param listener the listener to be registered + @param name the document name + + @exception NullPointerException if listener is null or name is + null or empty + @exception InvalidOperationException if read() has already been + called + + + Register a POIFSReaderListener for a document in the specified + directory + + @param listener the listener to be registered + @param path the document path; if null, the root directory is + assumed + @param name the document name + + @exception NullPointerException if listener is null or name is + null or empty + @exception InvalidOperationException if read() has already been + called + + + + Processes the properties. + + The small_blocks. + The big_blocks. + The properties. + The path. + + + + Class POIFSReaderEvent + + @author Marc Johnson (mjohnson at apache dot org) + @version %I%, %G% + + + package scoped constructor + + @param stream the DocumentInputStream, freshly opened + @param path the path of the document + @param documentName the name of the document + + + @return the DocumentInputStream, freshly opened + + + @return the document's path + + + @return the document's name + + + + EventArgs for POIFSReader + author: Tony Qu + + + + Interface POIFSReaderListener + + @author Marc Johnson (mjohnson at apache dot org) + @version %I%, %G% + + + Process a POIFSReaderEvent that this listener had Registered + for + + @param event the POIFSReaderEvent + + + A registry for POIFSReaderListeners and the DocumentDescriptors of + the documents those listeners are interested in + + @author Marc Johnson (mjohnson at apache dot org) + @version %I%, %G% + + + Construct the registry + + + Register a POIFSReaderListener for a particular document + + @param listener the listener + @param path the path of the document of interest + @param documentName the name of the document of interest + + + Register for all documents + + @param listener the listener who wants to Get all documents + + + Get am iterator of listeners for a particular document + + @param path the document path + @param name the name of the document + + @return an Iterator POIFSReaderListeners; may be empty + + + + A POIFS backed by a byte array. + + + + + A POIFS DataSource backed by a File + TODO - Return the ByteBuffers in such a way that in RW mode, + changes to the buffer end up on the disk (will fix the HPSF TestWrite + currently failing unit test when done) + + + + + Reads a sequence of bytes from this FileStream starting at the given file position. + + + The file position at which the transfer is to begin; + + + + + Writes a sequence of bytes to this FileStream from the given Stream, + starting at the given file position. + + The Stream from which bytes are to be transferred + The file position at which the transfer is to begin; + must be non-negative + + + + Common definition of how we read and write bytes + + + + + Close the underlying stream + + + + + Copies the contents to the specified Stream + + + + + Prepare to be written + + + + This interface defines methods for finding and setting sibling + Property instances + @author Marc Johnson (mjohnson at apache dot org) + + + + + Gets or sets the previous child. + + The previous child. + + + + Gets or sets the next child. + + The next child. + + + + Trivial extension of Property for POIFSDocuments + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + the name of the directory + + + + Initializes a new instance of the class. + + index number + byte data + offset into byte data + + + + Change a Property's name + + the Property whose name Is being Changed. + the new name for the Property + true if the name Change could be made, else false + + + + Delete a Property + + the Property being Deleted + true if the Property could be Deleted, else false + + + + Directory Property Comparer + + + + + Object equality, implemented as object identity + + Object we're being Compared to + true if identical, else false + + + + Compare method. Assumes both parameters are non-null + instances of Property. One property is less than another if + its name is shorter than the other property's name. If the + names are the same length, the property whose name comes + before the other property's name, alphabetically, is less + than the other property. + + first object to compare, better be a Property + second object to compare, better be a Property + negative value if o1 smaller than o2, + zero if o1 equals o2, + positive value if o1 bigger than o2. + + + + Gets a value indicating whether this instance is directory. + + + true if a directory type Property; otherwise, false. + + + + + Perform whatever activities need to be performed prior to + writing + + + + + Get an iterator over the children of this Parent; all elements + are instances of Property. + + Iterator of children; may refer to an empty collection + + + + Add a new child to the collection of children + + the new child to be added; must not be null + + + + Trivial extension of Property for POIFSDocuments + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + POIFSDocument name + POIFSDocument size + + + + Initializes a new instance of the class. + + index number + byte data + offset into byte data + + + + Gets or sets the document. + + the associated POIFSDocument + + + + Determines whether this instance is directory. + + + true if this instance is directory; otherwise, false. + + + + + Perform whatever activities need to be performed prior to + writing + + + + Update the size of the property's data + + + + Behavior for parent (directory) properties + @author Marc Johnson27591@hotmail.com + + + + + Get an iterator over the children of this Parent + all elements are instances of Property. + + + + + + Add a new child to the collection of children + + the new child to be added; must not be null + + + + Sets the previous child. + + + + + Sets the next child. + + + + + This abstract base class is the ancestor of all classes + implementing POIFS Property behavior. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + + + + Constructor from byte data + + index number + byte data + offset into byte data + + + + Write the raw data to an OutputStream. + + the OutputStream to which the data Should be + written. + + + + Gets or sets the start block for the document referred to by this + Property. + + the start block index + + + + Based on the currently defined size, Should this property use + small blocks? + + true if the size Is less than _big_block_minimum_bytes + + + + does the length indicate a small document? + + length in bytes + + true if the length Is less than + _big_block_minimum_bytes; otherwise, false. + + + + + Gets or sets the name of this property + + property name + + + + Gets a value indicating whether this instance is directory. + + + true if a directory type Property; otherwise, false. + + + + + Gets or sets the storage class ID for this property stream. ThIs Is the Class ID + of the COM object which can read and write this property stream + Storage Class ID + + + + Set the property type. Makes no attempt to validate the value. + + the property type (root, file, directory) + + + + Sets the color of the node. + + the node color (red or black) + + + + Sets the child property. + + the child property's index in the Property Table + + + + Get the child property (its index in the Property Table) + + The index of the child. + + + + Gets or sets the size of the document associated with this Property + + the size of the document, in bytes + + + + Gets or sets the index. + + The index. + Get the index for this Property + @return the index of this Property within its Property Table + + + + Perform whatever activities need to be performed prior to + writing + + + + + Gets the index of the next child. + + The index of the next child. + + + + Gets the index of the previous child. + + The index of the previous child. + + + + Determines whether the specified index Is valid + + value to be checked + + true if the index Is valid; otherwise, false. + + + + + Gets or sets the previous child. + + the new 'previous' child; may be null, which has + the effect of saying there Is no 'previous' child + + + + Gets or sets the next Child + + the new 'next' child; may be null, which has the + effect of saying there Is no 'next' child + + + + Get an array of objects, some of which may implement + POIFSViewable + + an array of Object; may not be null, but may be empty + + + + Get an Iterator of objects, some of which may implement POIFSViewable + + may not be null, but may have an empty + back end store + + + + Give viewers a hint as to whether to call GetViewableArray or + GetViewableIterator + + true if a viewer Should call GetViewableArray; otherwise, false + if a viewer Should call GetViewableIterator + + + + + Provides a short description of the object, to be used when a + POIFSViewable object has not provided its contents. + + The short description. + + + + Constants used by Properties namespace + + + + + Convert raw data blocks to an array of Property's + + The blocks to be converted + the converted List of Property objects. May contain + nulls, but will not be null + + + Default constructor + + + reading constructor (used when we've read in a file and we want + to extract the property table from it). Populates the + properties thoroughly + + @param startBlock the first block of the property table + @param blockList the list of blocks + + @exception IOException if anything goes wrong (which should be + a result of the input being NFG) + + + Prepare to be written Leon + + + Return the number of BigBlock's this instance uses + + @return count of BigBlock instances + + + Write the storage to an Stream + + @param stream the Stream to which the stored data should + be written + + @exception IOException on problems writing to the specified + stream + + + + Initializes a new instance of the class. + + index number + byte data + offset into byte data + + + + Gets or sets the size of the document associated with this Property + + the size of the document, in bytes + + + + The block containing the archive header + @author Marc Johnson (mjohnson at apache dot org) + + + + What big block Size the file uses. Most files + use 512 bytes, but a few use 4096 + + + Number of small block allocation table blocks (int) + (Number of MiniFAT Sectors in Microsoft parlance) + + + + create a new HeaderBlockReader from an Stream + + the source Stream + + + + Alerts the short read. + + The read. + The expected size. + + + + Get start of Property Table + + the index of the first block of the Property Table + + + + Gets start of small block allocation table + + The SBAT start. + + + + Gets number of BAT blocks + + The BAT count. + + + + Gets the BAT array. + + The BAT array. + + + + Gets the XBAT count. + + The XBAT count. + @return XBAT count + + + + Gets the index of the XBAT. + + The index of the XBAT. + + + + Gets The Big Block Size, normally 512 bytes, sometimes 4096 bytes + + The size of the big block. + @return + + + + A block of block allocation table entries. BATBlocks are created + only through a static factory method: createBATBlocks. + @author Marc Johnson (mjohnson at apache dot org) + + + + For a regular fat block, these are 128 / 1024 + next sector values. + For a XFat (DIFat) block, these are 127 / 1023 + next sector values, then a chaining value. + + + Does this BATBlock have any free sectors in it? + + + Where in the file are we? + + + + Create a single instance initialized with default values + + + + Create a single instance initialized (perhaps partially) with entries + + @param entries the array of block allocation table entries + @param start_index the index of the first entry to be written + to the block + @param end_index the index, plus one, of the last entry to be + written to the block (writing is for all index + k, start_index <= k < end_index) + + + Create a single BATBlock from the byte buffer, which must hold at least + one big block of data to be read. + + + ** + + + + Create an array of BATBlocks from an array of int block + allocation table entries + + the poifs bigBlockSize + the array of int entries + the newly created array of BATBlocks + + + + Create an array of XBATBlocks from an array of int block + allocation table entries + + + the array of int entries + the start block of the array of XBAT blocks + the newly created array of BATBlocks + + + + Calculate how many BATBlocks are needed to hold a specified + number of BAT entries. + + the number of entries + the number of BATBlocks needed + + + + Calculate how many XBATBlocks are needed to hold a specified + number of BAT entries. + + the number of entries + the number of XBATBlocks needed + + + Calculates the maximum size of a file which is addressable given the + number of FAT (BAT) sectors specified. (We don't care if those BAT + blocks come from the 109 in the header, or from header + XBATS, it + won't affect the calculation) + + The actual file size will be between [size of fatCount-1 blocks] and + [size of fatCount blocks]. + For 512 byte block sizes, this means we may over-estimate by up to 65kb. + For 4096 byte block sizes, this means we may over-estimate by up to 4mb + + + + Gets the entries per block. + + The number of entries per block + + + + Gets the entries per XBAT block. + + number of entries per XBAT block + + + + Gets the XBAT chain offset. + + offset of chain index of XBAT block + + + Does this BATBlock have any free sectors in it, or + is it full? + + + How many sectors in this block are taken? + Note that calling {@link #hasFreeSectors()} is much quicker + + + Retrieve where in the file we live + + + + Create a single instance initialized (perhaps partially) with entries + + the array of block allocation table entries + the index of the first entry to be written + to the block + the index, plus one, of the last entry to be + written to the block (writing is for all index + k, start_index less than k less than end_index) + + + + + Write the block's data to an Stream + + the Stream to which the stored data should + be written + + + + Abstract base class of all POIFS block storage classes. All + extensions of BigBlock should write 512 bytes of data when + requested to write their data. + This class has package scope, as there is no reason at this time to + make the class public. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Default implementation of write for extending classes that + contain their data in a simple array of bytes. + + the OutputStream to which the data should be written. + the byte array of to be written. + + + + Write the block's data to an OutputStream + + the OutputStream to which the stored data should be written + + + + Write the storage to an OutputStream + + the OutputStream to which the stored data should be written + + + + This class manages and creates the Block Allocation Table, which is + basically a set of linked lists of block indices. + Each block of the filesystem has an index. The first block, the + header, is skipped; the first block after the header is index 0, + the next is index 1, and so on. + A block's index is also its index into the Block Allocation + Table. The entry that it finds in the Block Allocation Table is the + index of the next block in the linked list of blocks making up a + file, or it is set to -2: end of list. + + @author Marc Johnson (mjohnson at apache dot org) + + + + + create a BlockAllocationTableReader for an existing filesystem. Side + effect: when this method finishes, the BAT blocks will have + been Removed from the raw block list, and any blocks labeled as + 'unused' in the block allocation table will also have been + Removed from the raw block list. + the poifs bigBlockSize + the number of BAT blocks making up the block allocation table + the array of BAT block indices from the + filesystem's header + the number of XBAT blocks + the index of the first XBAT block + the list of RawDataBlocks + + + + create a BlockAllocationTableReader from an array of raw data blocks + + + the raw data + the list holding the managed blocks + + + + Initializes a new instance of the class. + + + + + walk the entries from a specified point and return the + associated blocks. The associated blocks are Removed from the block list + + the first block in the chain + + the raw data block list + array of ListManagedBlocks, in their correct order + + + + determine whether the block specified by index is used or not + + determine whether the block specified by index is used or not + + true if the specified block is used; otherwise, false. + + + + + return the next block index + + The index of the current block + index of the next block (may be + POIFSConstants.END_OF_CHAIN, indicating end of chain + (duh)) + + + + Convert an array of blocks into a Set of integer indices + + the array of blocks containing the indices + the list of blocks being managed. Unused + blocks will be eliminated from the list + + + + This class manages and creates the Block Allocation Table, which is + basically a set of linked lists of block indices. + Each block of the filesystem has an index. The first block, the + header, is skipped; the first block after the header is index 0, + the next is index 1, and so on. + A block's index is also its index into the Block Allocation + Table. The entry that it finds in the Block Allocation Table is the + index of the next block in the linked list of blocks making up a + file, or it is set to -2: end of list. + * + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + + + + Create the BATBlocks we need + + start block index of BAT blocks + + + + Allocate space for a block of indices + + the number of blocks to allocate space for + the starting index of the blocks + + + + Sets the start block for this instance + + + index into the array of BigBlock instances making up the the filesystem + + + + + create the BATBlocks + + + + + Write the storage to an OutputStream + + the OutputStream to which the stored data should be written + + + + Gets the number of BigBlock's this instance uses + + count of BigBlock instances + + + + Interface for lists of blocks that are mapped by block allocation + tables + @author Marc Johnson (mjohnson at apache dot org) + + + + + remove the specified block from the list + + the index of the specified block; if the index is + out of range, that's ok + + + + Remove and return the specified block from the list + + the index of the specified block + the specified block + + + + get the blocks making up a particular stream in the list. The + blocks are removed from the list. + + the index of the first block in the stream + + the stream as an array of correctly ordered blocks + + + + set the associated BlockAllocationTable + + the associated BlockAllocationTable + + + + Initializes a new instance of the class. + + + + + provide blocks to manage + + blocks to be managed + + + + remove the specified block from the list + + the index of the specified block; if the index is + out of range, that's ok + + + + Remove and return the specified block from the list + + the index of the specified block + the specified block + + + + get the blocks making up a particular stream in the list. The + blocks are removed from the list. + + the index of the first block in the stream + + + the stream as an array of correctly ordered blocks + + + + + set the associated BlockAllocationTable + + the associated BlockAllocationTable + + + + An interface for persisting block storage of POIFS components. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Writes the blocks. + + The stream. + + + Wraps a byte array and provides simple data input access. + Internally, this class maintains a buffer read index, so that for the most part, primitive + data can be read in a data-input-stream-like manner.

    + + Note - the calling class should call the {@link #available()} method to detect end-of-buffer + and Move to the next data block when the current is exhausted. + For optimisation reasons, no error handling is performed in this class. Thus, mistakes in + calling code ran may raise ugly exceptions here, like {@link ArrayIndexOutOfBoundsException}, + etc .

    + + The multi-byte primitive input methods ({@link #readUshortLE()}, {@link #readIntLE()} and + {@link #readLongLE()}) have corresponding 'spanning Read' methods which (when required) perform + a read across the block boundary. These spanning read methods take the previous + {@link DataInputBlock} as a parameter. + Reads of larger amounts of data (into byte array buffers) must be managed by the caller + since these could conceivably involve more than two blocks. + + @author Josh Micich + + + Possibly any size (usually 512K or 64K). Assumed to be at least 8 bytes for all blocks + before the end of the stream. The last block in the stream can be any size except zero. + + + Reads a short which was encoded in little endian format. + + + Reads a short which spans the end of prevBlock and the start of this block. + + + Reads an int which was encoded in little endian format. + + + Reads an int which spans the end of prevBlock and the start of this block. + + + Reads a long which was encoded in little endian format. + + + Reads a long which spans the end of prevBlock and the start of this block. + + + Reads a small amount of data from across the boundary between two blocks. + The {@link #_readIndex} of this (the second) block is updated accordingly. + Note- this method (and other code) assumes that the second {@link DataInputBlock} + always is big enough to complete the read without being exhausted. + + + Reads len bytes from this block into the supplied buffer. + + +

    + create a document block from a raw data block + + The block. +
    + + + Create a single instance initialized with data. + + the InputStream delivering the data. + the poifs bigBlockSize + + + + Get the number of bytes Read for this block. + + bytes Read into the block + + + + Was this a partially Read block? + + true if the block was only partially filled with data + + + + Gets the fill byte used + + The fill byte. + + + + convert a single long array into an array of DocumentBlock + instances + + the poifs bigBlockSize + the byte array to be converted + the intended size of the array (which may be smaller) + an array of DocumentBlock instances, filled from the + input array + + + + Read data from an array of DocumentBlocks + + the blocks to Read from + the buffer to Write the data into + the offset into the array of blocks to Read from + + + + Write the storage to an OutputStream + + the OutputStream to which the stored data should + be written + + + + Constants used in reading/writing the Header block + @author Marc Johnson (mjohnson at apache dot org) + + + + + The block containing the archive header + @author Marc Johnson (mjohnson at apache dot org) + + + + What big block Size the file uses. Most files + use 512 bytes, but a few use 4096 + + + Number of small block allocation table blocks (int) + (Number of MiniFAT Sectors in Microsoft parlance) + + + + create a new HeaderBlockReader from an Stream + + the source Stream + + + + Alerts the short read. + + The read. + expected size to read + + + + Get start of Property Table + + the index of the first block of the Property Table + + + + Gets start of small block allocation table + + The SBAT start. + + + + Gets number of BAT blocks + + The BAT count. + + + + Gets the BAT array. + + The BAT array. + + + + Gets the XBAT count. + + The XBAT count. + @return XBAT count + + + + Gets the index of the XBAT. + + The index of the XBAT. + + + + Gets The Big Block Size, normally 512 bytes, sometimes 4096 bytes + + The size of the big block. + @return + + + + The block containing the archive header + @author Marc Johnson (mjohnson at apache dot org) + + + + + Set BAT block parameters. Assumes that all BAT blocks are + contiguous. Will construct XBAT blocks if necessary and return + the array of newly constructed XBAT blocks. + + count of BAT blocks + index of first BAT block + array of XBAT blocks; may be zero Length, will not be + null + + + + Set start of Property Table + + the index of the first block of the Property + Table + + + + Set start of small block allocation table + + the index of the first big block of the small + block allocation table + + + + Set count of SBAT blocks + + the number of SBAT blocks + + + + For a given number of BAT blocks, calculate how many XBAT + blocks will be needed + + + number of BAT blocks + number of XBAT blocks needed + + + + Write the block's data to an Stream + + the Stream to which the stored data should + be written + + + + + An interface for blocks managed by a list that works with a + BlockAllocationTable to keep block sequences straight + @author Marc Johnson (mjohnson at apache dot org + + + + + Get the data from the block + + the block's data as a byte array + + + + A block of Property instances + @author Marc Johnson (mjohnson at apache dot org) + + + + + Create a single instance initialized with default values + + + the properties to be inserted + the offset into the properties array + + + + Create an array of PropertyBlocks from an array of Property + instances, creating empty Property instances to make up any + shortfall + + + the Property instances to be converted into PropertyBlocks, in a java List + the array of newly created PropertyBlock instances + + + + Write the block's data to an OutputStream + + the OutputStream to which the stored data should be written + + + + A big block created from an InputStream, holding the raw data + @author Marc Johnson (mjohnson at apache dot org + + + + + Constructor RawDataBlock + + the Stream from which the data will be read + + + + Initializes a new instance of the class. + + the Stream from which the data will be read + the size of the POIFS blocks, normally 512 bytes {@link POIFSConstants#BIG_BLOCK_SIZE} + + + + When we read the data, did we hit end of file? + + true if the EoF was hit during this block, or; otherwise, falseif not. If you have a dodgy short last block, then + it's possible to both have data, and also hit EoF... + + + + Did we actually find any data to read? It's possible, + in the event of a short last block, to both have hit + the EoF, but also to have data + + true if this instance has data; otherwise, false. + + + + Get the data from the block + + the block's data as a byte array + + + + A list of RawDataBlocks instances, and methods to manage the list + @author Marc Johnson (mjohnson at apache dot org + + + + + Initializes a new instance of the class. + + the InputStream from which the data will be read + The big block size, either 512 bytes or 4096 bytes + + + + This class implements reading the small document block list from an + existing file + @author Marc Johnson (mjohnson at apache dot org) + + + + + fetch the small document block list from an existing file, normally + needed for debugging and low level dumping. You should typically call + + the poifs bigBlockSize + the raw data from which the small block table will be extracted + the root property (which contains the start block and small block table size) + the start block of the SBAT + the small document block reader + + + + fetch the small document block list from an existing file + + the poifs bigBlockSize + the raw data from which the small block table will be extracted + the root property (which contains the start block and small block table size) + the start block of the SBAT + the small document block list + + + + This class implements reading the small document block list from an + existing file + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + the poifs bigBlockSize + a IList of POIFSDocument instances + the Filesystem's root property + + + + Get the number of SBAT blocks + + number of SBAT big blocks + + + + Gets the SBAT. + + the Small Block Allocation Table + + + + Return the number of BigBlock's this instance uses + + count of BigBlock instances + + + + Sets the start block. + + The start block. + + + + Write the storage to an OutputStream + + the OutputStream to which the stored data should be written + + + + Storage for documents that are too small to use regular + DocumentBlocks for their data + @author Marc Johnson (mjohnson at apache dot org) + + + + + convert a single long array into an array of SmallDocumentBlock + instances + + the poifs bigBlockSize + the byte array to be converted + the intended size of the array (which may be smaller) + an array of SmallDocumentBlock instances, filled from + the array + + + + fill out a List of SmallDocumentBlocks so that it fully occupies + a Set of big blocks + + + the List to be filled out. + number of big blocks the list encompasses + + + + Factory for creating SmallDocumentBlocks from DocumentBlocks + + + the original DocumentBlocks + the total document size + an array of new SmallDocumentBlocks instances + + + + create a list of SmallDocumentBlock's from raw data + + + the raw data containing the SmallDocumentBlock + a List of SmallDocumentBlock's extracted from the input + + + + Read data from an array of SmallDocumentBlocks + + the blocks to Read from. + the buffer to Write the data into. + the offset into the array of blocks to Read from + + + + Calculate the storage size of a Set of SmallDocumentBlocks + + number of SmallDocumentBlocks + total size + + + + Makes the empty small document block. + + + + + + Converts to block count. + + The size. + + + + + Write the storage to an OutputStream + + the OutputStream to which the stored data should + be written + + + + Get the data from the block + + the block's data as a byte array + + + + A list of SmallDocumentBlocks instances, and methods to manage the list + @author Marc Johnson (mjohnson at apache dot org) + + + + + Initializes a new instance of the class. + + a list of SmallDocumentBlock instances + + +

    A class describing attributes of the Big Block Size

    +
    + + Returns the value that Gets written into the + header. + Is the power of two that corresponds to the + size of the block, eg 512 => 9 + + + + A repository for constants shared by POI classes. + @author Marc Johnson (mjohnson at apache dot org) + + + + Most files use 512 bytes as their big block size + + + Some use 4096 bytes + + + Most files use 512 bytes as their big block size + + + Most files use 512 bytes as their big block size + + + How big a block in the small block stream is. Fixed size + + + How big a single property is + + + The minimum size of a document before it's stored using + Big Blocks (normal streams). Smaller documents go in the + Mini Stream (SBAT / Small Blocks) + + + The highest sector number you're allowed, 0xFFFFFFFA + + + Indicates the sector holds a FAT block (0xFFFFFFFD) + + + Indicates the sector holds a DIFAT block (0xFFFFFFFC) + + + Indicates the sector is the end of a chain (0xFFFFFFFE) + + + Indicates the sector is not used (0xFFFFFFFF) + + + The first 4 bytes of an OOXML file, used in detection + + + The first 5 bytes of a raw XML file, used in detection + + + + Interface for a drill-down viewable object. Such an object has + content that may or may not be displayed, at the discretion of the + viewer. The content is returned to the viewer as an array or as an + Iterator, and the object provides a clue as to which technique the + viewer should use to get its content. + A POIFSViewable object is also expected to provide a short + description of itself, that can be used by a viewer when the + viewable object is collapsed. + @author Marc Johnson (mjohnson at apache dot org) + + + + + Provides a short description of the object to be used when a + POIFSViewable object has not provided its contents. + + true if [prefer array]; otherwise, false. + + + + Gets the short description. + + The short description. + + + + Get an array of objects, some of which may implement POIFSViewable + + The viewable array. + + + + Give viewers a hint as to whether to call ViewableArray or ViewableIterator + + The viewable iterator. + + + + This class contains methods used to inspect POIFSViewable objects + @author Marc Johnson (mjohnson at apache dot org) + + + + + Inspect an object that may be viewable, and drill down if told to + + the object to be viewed + if true and the object implements POIFSViewable, inspect the objects' contents + how far in to indent each string + string to use for indenting + a List of Strings holding the content + + + + Indents the specified indent level. + + how far in to indent each string + string to use for indenting + The data. + + + + Copies an Entry into a target POIFS directory, recursively + + + Copies nodes from one POIFS to the other minus the excepts + + @param source + is the source POIFS to copy from + @param target + is the target POIFS to copy to + @param excepts + is a list of Strings specifying what nodes NOT to copy + + + Copies nodes from one POIFS to the other minus the excepts + + @param source + is the source POIFS to copy from + @param target + is the target POIFS to copy to + @param excepts + is a list of Strings specifying what nodes NOT to copy + + + Implementation of a BlockingInputStream to provide data to + RawDataBlock that expects data in 512 byte chunks. Useful to read + data from slow (ie, non FileInputStream) sources, for example when + Reading an OLE2 Document over a network. + + Possible extentions: add a timeout. Curently a call to Read(byte[]) on this + class is blocking, so use at your own peril if your underlying stream blocks. + + @author Jens Gerhard + @author aviks - documentation cleanups. + + + We had to revert to byte per byte Reading to keep + with slow network connections on one hand, without + missing the end-of-file. + This is the only method that does its own thing in this class + everything else is delegated to aggregated stream. + THIS IS A BLOCKING BLOCK READ!!! + + + + Creates a new BoundedInputStream that wraps the given input + stream and limits it to a certain size. + + The wrapped input stream + The maximum number of bytes to return + + + + Creates a new BoundedInputStream that wraps the given input + stream and is unlimited. + + The wrapped input stream + + + + Invokes the delegate's read() method if + the current position is less than the limit. + + the byte read or -1 if the end of stream + or the limit has been reached. + if an I/O error occurs + + + + Returns the number of elements between the current position and the limit. + + The number of elements remaining in this buffer + + + + Tells whether there are any elements between the current position and the limit. + + true if, and only if, there is at least one element remaining in this buffer + + + + Represents a class ID (16 bytes). Unlike other little-endian + type the {@link ClassID} is not just 16 bytes stored in the wrong + order. Instead, it is a double word (4 bytes) followed by two + words (2 bytes each) followed by 8 bytes. + @author Rainer Klute + klute@rainer-klute.de + @version $Id: ClassID.java 489730 2006-12-22 19:18:16Z bayard $ + @since 2002-02-09 + + + + The bytes making out the class ID in correct order, + i.e. big-endian. + + + + Creates a and Reads its value from a byte array. + + The byte array to Read from. + The offset of the first byte to Read. + + + + Creates a and initializes its value with 0x00 bytes. + + + +

    Creates a {@link ClassID} from a human-readable representation of the Class ID in standard + format "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}".

    + + @param externalForm representation of the Class ID represented by this object. +
    + + The number of bytes occupied by this object in the byte + stream. + + + + Gets the length. + + The number of bytes occupied by this object in the byte stream. + + + + Gets or sets the bytes making out the class ID. They are returned in correct order, i.e. big-endian. + + the bytes making out the class ID.. + + + + Reads the class ID's value from a byte array by turning little-endian into big-endian. + + The byte array to Read from + The offset within the + A byte array containing the class ID. + + + + Writes the class ID to a byte array in the little-endian format. + + The byte array to Write to. + The offset within the + + + + Checks whether this ClassID is equal to another + object. + + the object to compare this PropertySet with + true if the objects are equal, else + false + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a human-Readable representation of the Class ID in standard + format "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}". + + + A String representation of the Class ID represented by this object.. + + + + + Fills the specified array. + + The array. + The default value. + + + + Assigns the specified byte value to each element of the specified + range of the specified array of bytes. The range to be filled + extends from index fromIndex, inclusive, to index + toIndex, exclusive. (If fromIndex==toIndex, the + range to be filled is empty.) + + the array to be filled + the index of the first element (inclusive) to be filled with the specified value + the index of the last element (exclusive) to be filled with the specified value + the value to be stored in all elements of the array + if fromIndex > toIndex + if fromIndex < 0 or toIndex > a.length + + + + Checks that {@code fromIndex} and {@code toIndex} are in + the range and throws an appropriate exception, if they aren't. + + + + + + + + Convert Array to ArrayList + + source array + + + + + Fills the specified array. + + The array. + The default value. + + + + Equals the specified a1. + + The a1. + The b1. + + + + Returns true if the two specified arrays of Objects are + equal to one another. The two arrays are considered equal if + both arrays contain the same number of elements, and all corresponding + pairs of elements in the two arrays are equal. Two objects e1 + and e2 are considered equal if (e1==null ? e2==null + : e1.equals(e2)). In other words, the two arrays are equal if + they contain the same elements in the same order. Also, two array + references are considered equal if both are null. + + @param a one array to be tested for equality + @param a2 the other array to be tested for equality + @return true if the two arrays are equal + + + + Moves a number of entries in an array to another point in the array, shifting those inbetween as required. + + The array to alter + The (0 based) index of the first entry to move + The (0 based) index of the positition to move to + The number of entries to move + + + + Copies the specified array, truncating or padding with zeros (if + necessary) so the copy has the specified length. This method is temporary + replace for Arrays.copyOf() until we start to require JDK 1.6. + + the array to be copied + the length of the copy to be returned + a copy of the original array, truncated or padded with zeros to obtain the specified length + + + Returns a hash code based on the contents of the specified array. + For any two long arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link Long} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. + For any two non-null int arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link int} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. + For any two short arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link short} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. + For any two char arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link Character} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. + For any two byte arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link Byte} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. + For any two bool arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link Boolean} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. + For any two float arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link Float} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. + For any two double arrays a and b + such that Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is the same value that would be + obtained by invoking the {@link List#hashCode() hashCode} + method on a {@link List} Containing a sequence of {@link Double} + instances representing the elements of a in the same order. + If a is null, this method returns 0. + + @param a the array whose hash value to compute + @return a content-based hash code for a + @since 1.5 + + + Returns a hash code based on the contents of the specified array. If + the array Contains other arrays as elements, the hash code is based on + their identities rather than their contents. It is therefore + acceptable to invoke this method on an array that Contains itself as an + element, either directly or indirectly through one or more levels of + arrays. + + For any two arrays a and b such that + Arrays.Equals(a, b), it is also the case that + Arrays.HashCode(a) == Arrays.HashCode(b). + + The value returned by this method is equal to the value that would + be returned by Arrays.AsList(a).HashCode(), unless a + is null, in which case 0 is returned. + + @param a the array whose content-based hash code to compute + @return a content-based hash code for a + @see #deepHashCode(Object[]) + @since 1.5 + + + Returns a hash code based on the "deep contents" of the specified + array. If the array Contains other arrays as elements, the + hash code is based on their contents and so on, ad infInitum. + It is therefore unacceptable to invoke this method on an array that + Contains itself as an element, either directly or indirectly through + one or more levels of arrays. The behavior of such an invocation is + undefined. + + For any two arrays a and b such that + Arrays.DeepEquals(a, b), it is also the case that + Arrays.DeepHashCode(a) == Arrays.DeepHashCode(b). + + The computation of the value returned by this method is similar to + that of the value returned by {@link List#hashCode()} on a list + Containing the same elements as a in the same order, with one + difference: If an element e of a is itself an array, + its hash code is computed not by calling e.HashCode(), but as + by calling the appropriate overloading of Arrays.HashCode(e) + if e is an array of a primitive type, or as by calling + Arrays.DeepHashCode(e) recursively if e is an array + of a reference type. If a is null, this method + returns 0. + + @param a the array whose deep-content-based hash code to compute + @return a deep-content-based hash code for a + @see #hashCode(Object[]) + @since 1.5 + + + Returns true if the two specified arrays are deeply + Equal to one another. Unlike the {@link #Equals(Object[],Object[])} + method, this method is appropriate for use with nested arrays of + arbitrary depth. + + Two array references are considered deeply equal if both + are null, or if they refer to arrays that contain the same + number of elements and all corresponding pairs of elements in the two + arrays are deeply Equal. + + Two possibly null elements e1 and e2 are + deeply equal if any of the following conditions hold: +
      +
    • e1 and e2 are both arrays of object reference + types, and Arrays.DeepEquals(e1, e2) would return true
    • +
    • e1 and e2 are arrays of the same primitive + type, and the appropriate overloading of + Arrays.Equals(e1, e2) would return true.
    • +
    • e1 == e2
    • +
    • e1.Equals(e2) would return true.
    • +
    + Note that this defInition permits null elements at any depth. + + If either of the specified arrays contain themselves as elements + either directly or indirectly through one or more levels of arrays, + the behavior of this method is undefined. + + @param a1 one array to be tested for Equality + @param a2 the other array to be tested for Equality + @return true if the two arrays are equal + @see #Equals(Object[],Object[]) + @see Objects#deepEquals(Object, Object) + @since 1.5 +
    + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements are + Separated by the characters ", " (a comma followed by a + space). Elements are Converted to strings as by + String.ValueOf(long). Returns "null" if a + is null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements are + Separated by the characters ", " (a comma followed by a + space). Elements are Converted to strings as by + String.ValueOf(int). Returns "null" if a is + null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements are + Separated by the characters ", " (a comma followed by a + space). Elements are Converted to strings as by + String.ValueOf(short). Returns "null" if a + is null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements are + Separated by the characters ", " (a comma followed by a + space). Elements are Converted to strings as by + String.ValueOf(char). Returns "null" if a + is null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements + are Separated by the characters ", " (a comma followed + by a space). Elements are Converted to strings as by + String.ValueOf(byte). Returns "null" if + a is null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements are + Separated by the characters ", " (a comma followed by a + space). Elements are Converted to strings as by + String.ValueOf(bool). Returns "null" if + a is null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements are + Separated by the characters ", " (a comma followed by a + space). Elements are Converted to strings as by + String.ValueOf(float). Returns "null" if a + is null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the contents of the specified array. + The string representation consists of a list of the array's elements, + enclosed in square brackets ("[]"). Adjacent elements are + Separated by the characters ", " (a comma followed by a + space). Elements are Converted to strings as by + String.ValueOf(double). Returns "null" if a + is null. + + @param a the array whose string representation to return + @return a string representation of a + @since 1.5 + + + Returns a string representation of the "deep contents" of the specified + array. If the array Contains other arrays as elements, the string + representation Contains their contents and so on. This method is + designed for Converting multidimensional arrays to strings. + + The string representation consists of a list of the array's + elements, enclosed in square brackets ("[]"). Adjacent + elements are Separated by the characters ", " (a comma + followed by a space). Elements are Converted to strings as by + String.ValueOf(Object), unless they are themselves + arrays. + + If an element e is an array of a primitive type, it is + Converted to a string as by invoking the appropriate overloading of + Arrays.ToString(e). If an element e is an array of a + reference type, it is Converted to a string as by invoking + this method recursively. + + To avoid infInite recursion, if the specified array Contains itself + as an element, or Contains an indirect reference to itself through one + or more levels of arrays, the self-reference is Converted to the string + "[...]". For example, an array Containing only a reference + to itself would be rendered as "[[...]]". + + This method returns "null" if the specified array + is null. + + @param a the array whose string representation to return + @return a string representation of a + @see #ToString(Object[]) + @since 1.5 + + + Returns a string representation of the contents of the specified array. + If the array contains other arrays as elements, they are converted to + strings by the {@link Object#toString} method inherited from + Object, which describes their identities rather than + their contents. + +

    The value returned by this method is equal to the value that would + be returned by Arrays.asList(a).toString(), unless a + is null, in which case "null" is returned.

    + + @param a the array whose string representation to return + @return a string representation of a + @see #deepToString(Object[]) + @since 1.5 +
    + + The signum of this BigInteger: -1 for negative, 0 for zero, or + 1 for positive. Note that the BigInteger zero must have + a signum of 0. This is necessary to ensures that there is exactly one + representation for each BigInteger value. + + @serial + + + The magnitude of this BigInteger, in big-endian order: the + zeroth element of this array is the most-significant int of the + magnitude. The magnitude must be "minimal" in that the most-significant + int ({@code mag[0]}) must be non-zero. This is necessary to + ensure that there is exactly one representation for each BigInteger + value. Note that this implies that the BigInteger zero has a + zero-length mag array. + + + One plus the bitCount of this BigInteger. Zeros means unitialized. + + @serial + @see #bitCount + @deprecated Deprecated since logical value is offset from stored + value and correction factor is applied in accessor method. + + + One plus the bitLength of this BigInteger. Zeros means unitialized. + (either value is acceptable). + + @serial + @see #bitLength() + @deprecated Deprecated since logical value is offset from stored + value and correction factor is applied in accessor method. + + + Two plus the index of the lowest-order int in the magnitude of this + BigInteger that contains a nonzero int, or -2 (either value is acceptable). + The least significant int has int-number 0, the next int in order of + increasing significance has int-number 1, and so forth. + @deprecated Deprecated since logical value is offset from stored + value and correction factor is applied in accessor method. + + + This mask is used to obtain the value of an int as if it were unsigned. + + + This internal constructor differs from its public cousin + with the arguments reversed in two ways: it assumes that its + arguments are correct, and it doesn't copy the magnitude array. + + + Translates a byte array containing the two's-complement binary + representation of a BigInteger into a BigInteger. The input array is + assumed to be in big-endian byte-order: the most significant + byte is in the zeroth element. + + @param val big-endian two's-complement binary representation of + BigInteger. + @throws NumberFormatException {@code val} is zero bytes long. + + + This private constructor translates an int array containing the + two's-complement binary representation of a BigInteger into a + BigInteger. The input array is assumed to be in big-endian + int-order: the most significant int is in the zeroth element. + + + Constructs a BigInteger with the specified value, which may not be zero. + + + Returns the input array stripped of any leading zero bytes. + Since the source is trusted the copying may be skipped. + + + Returns the String representation of this BigInteger in the + given radix. If the radix is outside the range from {@link + Character#Min_RADIX} to {@link Character#Max_RADIX} inclusive, + it will default to 10 (as is the case for + {@code Integer.toString}). The digit-to-character mapping + provided by {@code Character.forDigit} is used, and a minus + sign is prepended if appropriate. (This representation is + compatible with the {@link #BigInteger(String, int) (String, + int)} constructor.) + + @param radix radix of the String representation. + @return String representation of this BigInteger in the given radix. + @see Integer#toString + @see Character#forDigit + @see #BigInteger(java.lang.String, int) + + + The BigInteger constant zero. + + @since 1.2 + + + The BigInteger constant one. + + @since 1.2 + + + The BigInteger constant two. (Not exported.) + + + The BigInteger constant ten. + + @since 1.5 + + + Returns a BigInteger whose value is equal to that of the + specified {@code long}. This "static factory method" is + provided in preference to a ({@code long}) constructor + because it allows for reuse of frequently used BigIntegers. + + @param val value of the BigInteger to return. + @return a BigInteger with the specified value. + + + Returns a BigInteger with the given two's complement representation. + Assumes that the input array will not be modified (the returned + BigInteger will reference the input array if feasible). + + + Package private method to return bit length for an integer. + + + Returns the number of bits in the two's complement representation + of this BigInteger that differ from its sign bit. This method is + useful when implementing bit-vector style sets atop BigIntegers. + + @return number of bits in the two's complement representation + of this BigInteger that differ from its sign bit. + + + Returns a BigInteger whose value is the absolute value of this + BigInteger. + + @return {@code abs(this)} + + + Returns a BigInteger whose value is {@code (-this)}. + + @return {@code -this} + + + Returns a BigInteger whose value is (thisexponent). + Note that {@code exponent} is an integer rather than a BigInteger. + + @param exponent exponent to which this BigInteger is to be raised. + @return thisexponent + @throws ArithmeticException {@code exponent} is negative. (This would + cause the operation to yield a non-integer value.) + + + Multiplies int arrays x and y to the specified lengths and places + the result into z. There will be no leading zeros in the resultant array. + + + Multiply an array by one word k and add to result, return the carry + + + Squares the contents of the int array x. The result is placed into the + int array z. The contents of x are not changed. + + + Add one word to the number a mlen words into a. Return the resulting + carry. + + + Returns the signum function of this BigInteger. + + @return -1, 0 or 1 as the value of this BigInteger is negative, zero or + positive. + + + Returns a byte array containing the two's-complement + representation of this BigInteger. The byte array will be in + big-endian byte-order: the most significant byte is in + the zeroth element. The array will contain the minimum number + of bytes required to represent this BigInteger, including at + least one sign bit, which is {@code (ceil((this.bitLength() + + 1)/8))}. (This representation is compatible with the + {@link #BigInteger(byte[]) (byte[])} constructor.) + + @return a byte array containing the two's-complement representation of + this BigInteger. + @see #BigInteger(byte[]) + + + Returns the length of the two's complement representation in ints, + including space for at least one sign bit. + + + Returns the specified int of the little-endian two's complement + representation (int 0 is the least significant). The int number can + be arbitrarily high (values are logically preceded by infinitely many + sign ints). + + + Returns the index of the int that contains the first nonzero int in the + little-endian binary representation of the magnitude (int 0 is the + least significant). If the magnitude is zero, return value is undefined. + + + Returns a copy of the input array stripped of any leading zero bytes. + + + Takes an array a representing a negative 2's-complement number and + returns the minimal (no leading zero bytes) unsigned whose value is -a. + + + Takes an array a representing a negative 2's-complement number and + returns the minimal (no leading zero ints) unsigned whose value is -a. + + + Returns the number of zero bits preceding the highest-order + ("leftmost") one-bit in the two's complement binary representation + of the specified {@code int} value. Returns 32 if the + specified value has no one-bits in its two's complement representation, + in other words if it is equal to zero. + + Note that this method is closely related to the logarithm base 2. + For all positive {@code int} values x: +
      +
    • floor(log2(x)) = {@code 31 - numberOfLeadingZeros(x)}
    • +
    • ceil(log2(x)) = {@code 32 - numberOfLeadingZeros(x - 1)}
    • +
    + + @return the number of zero bits preceding the highest-order + ("leftmost") one-bit in the two's complement binary representation + of the specified {@code int} value, or 32 if the value + is equal to zero. + @since 1.5 +
    + + Returns the number of zero bits following the lowest-order ("rightmost") + one-bit in the two's complement binary representation of the specified + {@code int} value. Returns 32 if the specified value has no + one-bits in its two's complement representation, in other words if it is + equal to zero. + + @return the number of zero bits following the lowest-order ("rightmost") + one-bit in the two's complement binary representation of the + specified {@code int} value, or 32 if the value is equal + to zero. + @since 1.5 + + + Returns the number of one-bits in the two's complement binary + representation of the specified {@code int} value. This function is + sometimes referred to as the population count. + + @return the number of one-bits in the two's complement binary + representation of the specified {@code int} value. + @since 1.5 + + + Compares the magnitude array of this BigInteger with the specified + BigInteger's. This is the version of compareTo ignoring sign. + + @param val BigInteger whose magnitude array to be compared. + @return -1, 0 or 1 as this magnitude array is less than, equal to or + greater than the magnitude aray for the specified BigInteger's. + + + Compares this BigInteger with the specified Object for equality. + + @param x Object to which this BigInteger is to be compared. + @return {@code true} if and only if the specified Object is a + BigInteger whose value is numerically equal to this BigInteger. + + + Returns the minimum of this BigInteger and {@code val}. + + @param val value with which the minimum is to be computed. + @return the BigInteger whose value is the lesser of this BigInteger and + {@code val}. If they are equal, either may be returned. + + + Returns the maximum of this BigInteger and {@code val}. + + @param val value with which the maximum is to be computed. + @return the BigInteger whose value is the greater of this and + {@code val}. If they are equal, either may be returned. + + + Returns the hash code for this BigInteger. + + @return hash code for this BigInteger. + + + Converts this BigInteger to an {@code int}. This + conversion is analogous to a + narrowing primitive conversion from {@code long} to + {@code int} as defined in section 5.1.3 of + The Java(TM) Language Specification: + if this BigInteger is too big to fit in an + {@code int}, only the low-order 32 bits are returned. + Note that this conversion can lose information about the + overall magnitude of the BigInteger value as well as return a + result with the opposite sign. + + @return this BigInteger converted to an {@code int}. + + + Converts this BigInteger to a {@code long}. This + conversion is analogous to a + narrowing primitive conversion from {@code long} to + {@code int} as defined in section 5.1.3 of + The Java(TM) Language Specification: + if this BigInteger is too big to fit in a + {@code long}, only the low-order 64 bits are returned. + Note that this conversion can lose information about the + overall magnitude of the BigInteger value as well as return a + result with the opposite sign. + + @return this BigInteger converted to a {@code long}. + + + Returns a BigInteger whose value is {@code (this >> n)}. Sign + extension is performed. The shift distance, {@code n}, may be + negative, in which case this method performs a left shift. + (Computes floor(this / 2n).) + + @param n shift distance, in bits. + @return {@code this >> n} + @throws ArithmeticException if the shift distance is {@code + Integer.Min_VALUE}. + @see #shiftLeft + + + Returns a BigInteger whose value is {@code (~this)}. (This method + returns a negative value if and only if this BigInteger is + non-negative.) + + @return {@code ~this} + + + Returns a BigInteger whose value is {@code (this | val)}. (This method + returns a negative BigInteger if and only if either this or val is + negative.) + + @param val value to be OR'ed with this BigInteger. + @return {@code this | val} + + + Package private methods used by BigDecimal code to multiply a BigInteger + with a long. Assumes v is not equal to INFLATED. + + + Returns a BigInteger whose value is {@code (this * val)}. + + @param val value to be multiplied by this BigInteger. + @return {@code this * val} + + + Returns a BigInteger whose value is {@code (this + val)}. + + @param val value to be added to this BigInteger. + @return {@code this + val} + + + Adds the contents of the int arrays x and y. This method allocates + a new int array to hold the answer and returns a reference to that + array. + + + Returns a BigInteger whose value is {@code (this - val)}. + + @param val value to be subtracted from this BigInteger. + @return {@code this - val} + + + Subtracts the contents of the second int arrays (little) from the + first (big). The first int array (big) must represent a larger number + than the second. This method allocates the space necessary to hold the + answer. + + + Returns a BigInteger whose value is {@code (this / val)}. + + @param val value by which this BigInteger is to be divided. + @return {@code this / val} + @throws ArithmeticException if {@code val} is zero. + + + Holds the magnitude of this MutableBigInteger in big endian order. + The magnitude may start at an offset into the value array, and it may + end before the length of the value array. + + + The number of ints of the value array that are currently used + to hold the magnitude of this MutableBigInteger. The magnitude starts + at an offset and offset + intLen may be less than value.Length. + + + The offset into the value array where the magnitude of this + MutableBigInteger begins. + + + MutableBigInteger with one element value array with the value 1. Used by + BigDecimal divideAndRound to increment the quotient. Use this constant + only when the method is not going to modify this object. + + + The default constructor. An empty MutableBigInteger is created with + a one word capacity. + + + Construct a new MutableBigInteger with a magnitude specified by + the int val. + + + Construct a new MutableBigInteger with the specified value array + up to the length of the array supplied. + + + Construct a new MutableBigInteger with a magnitude equal to the + specified BigInteger. + + + Construct a new MutableBigInteger with a magnitude equal to the + specified MutableBigInteger. + + + Internal helper method to return the magnitude array. The caller is not + supposed to modify the returned array. + + + Convert this MutableBigInteger to a long value. The caller has to make + sure this MutableBigInteger can be fit into long. + + + Convert this MutableBigInteger to a BigInteger object. + + + Clear out a MutableBigInteger for reuse. + + + Set a MutableBigInteger to zero, removing its offset. + + + Compare the magnitude of two MutableBigIntegers. Returns -1, 0 or 1 + as this MutableBigInteger is numerically less than, equal to, or + greater than b. + + + Compare this against half of a MutableBigInteger object (Needed for + remainder tests). + Assumes no leading unnecessary zeros, which holds for results + from divide(). + + + Return the index of the lowest set bit in this MutableBigInteger. If the + magnitude of this MutableBigInteger is zero, -1 is returned. + + + Return the int in use in this MutableBigInteger at the specified + index. This method is not used because it is not inlined on all + platforms. + + + Return a long which is equal to the unsigned value of the int in + use in this MutableBigInteger at the specified index. This method is + not used because it is not inlined on all platforms. + + + Ensure that the MutableBigInteger is in normal form, specifically + making sure that there are no leading zeros, and that if the + magnitude is zero, then intLen is zero. + + + If this MutableBigInteger cannot hold len words, increase the size + of the value array to len words. + + + Convert this MutableBigInteger into an int array with no leading + zeros, of a length that is equal to this MutableBigInteger's intLen. + + + Sets the int at index+offset in this MutableBigInteger to val. + This does not get inlined on all platforms so it is not used + as often as originally intended. + + + Sets this MutableBigInteger's value array to the specified array. + The intLen is set to the specified length. + + + Sets this MutableBigInteger's value array to a copy of the specified + array. The intLen is set to the length of the new array. + + + Sets this MutableBigInteger's value array to a copy of the specified + array. The intLen is set to the length of the specified array. + + + Returns true iff this MutableBigInteger has a value of one. + + + Returns true iff this MutableBigInteger has a value of zero. + + + Returns true iff this MutableBigInteger is even. + + + Returns true iff this MutableBigInteger is odd. + + + Returns true iff this MutableBigInteger is in normal form. A + MutableBigInteger is in normal form if it has no leading zeros + after the offset, and intLen + offset <= value.Length. + + + Returns a String representation of this MutableBigInteger in radix 10. + + + Right shift this MutableBigInteger n bits. The MutableBigInteger is left + in normal form. + + + Left shift this MutableBigInteger n bits. + + + A primitive used for division. This method adds in one multiple of the + divisor a back to the dividend result at a specified offset. It is used + when qhat was estimated too large, and must be adjusted. + + + This method is used for division. It multiplies an n word input a by one + word input x, and subtracts the n word product from q. This is needed + when subtracting qhat*divisor from dividend. + + + Right shift this MutableBigInteger n bits, where n is + less than 32. + Assumes that intLen > 0, n > 0 for speed + + + Left shift this MutableBigInteger n bits, where n is + less than 32. + Assumes that intLen > 0, n > 0 for speed + + + Adds the contents of two MutableBigInteger objects.The result + is placed within this MutableBigInteger. + The contents of the addend are not changed. + + + Subtracts the smaller of this and b from the larger and places the + result into this MutableBigInteger. + + + Subtracts the smaller of a and b from the larger and places the result + into the larger. Returns 1 if the answer is in a, -1 if in b, 0 if no + operation was performed. + + + Multiply the contents of two MutableBigInteger objects. The result is + placed into MutableBigInteger z. The contents of y are not changed. + + + Multiply the contents of this MutableBigInteger by the word y. The + result is placed into z. + + + This method is used for division of an n word dividend by a one word + divisor. The quotient is placed into quotient. The one word divisor is + specified by divisor. + + @return the remainder of the division is returned. + + + + Calculates the quotient of this div b and places the quotient in the + provided MutableBigInteger objects and the remainder object is returned. + + Uses Algorithm D in Knuth section 4.3.1. + Many optimizations to that algorithm have been adapted from the Colin + Plumb C library. + It special cases one word divisors for speed. The content of b is not + changed. + + + + Internally used to calculate the quotient of this div v and places the + quotient in the provided MutableBigInteger object and the remainder is + returned. + + @return the remainder of the division will be returned. + + + Divide this MutableBigInteger by the divisor represented by its magnitude + array. The quotient will be placed into the provided quotient object & + the remainder object is returned. + + + Compare two longs as if they were unsigned. + Returns true iff one is bigger than two. + + + This method divides a long quantity by an int to estimate + qhat for two multi precision numbers. It is used when + the signed value of n is less than zero. + + + Calculate GCD of this and b. This and b are changed by the computation. + + + Calculate GCD of this and v. + Assumes that this and v are not zero. + + + Calculate GCD of a and b interpreted as unsigned integers. + + + Returns the modInverse of this mod p. This and p are not affected by + the operation. + + + Calculate the multiplicative inverse of this mod mod, where mod is odd. + This and mod are not changed by the calculation. + + This method implements an algorithm due to Richard Schroeppel, that uses + the same intermediate representation as Montgomery Reduction + ("Montgomery Form"). The algorithm is described in an unpublished + manuscript entitled "Fast Modular Reciprocals." + + + Uses the extended Euclidean algorithm to compute the modInverse of base + mod a modulus that is a power of 2. The modulus is 2^k. + + + + Manage operations dealing with bit-mapped fields. + @author Marc Johnson (mjohnson at apache dot org) + @author Andrew C. Oliver (acoliver at apache dot org) + + + + + Create a instance + + + the mask specifying which bits apply to this + BitField. Bits that are set in this mask are the + bits that this BitField operates on + + + + + Create a instance + + + the mask specifying which bits apply to this + BitField. Bits that are set in this mask are the + bits that this BitField operates on + + + + + Clear the bits. + + the int data containing the bits we're interested in + the value of holder with the specified bits cleared (set to 0) + + + + Clear the bits. + + the short data containing the bits we're interested in + the value of holder with the specified bits cleared (set to 0) + + + + Obtain the value for the specified BitField, appropriately + shifted right. Many users of a BitField will want to treat the + specified bits as an int value, and will not want to be aware + that the value is stored as a BitField (and so shifted left so + many bits) + + the int data containing the bits we're interested in + the selected bits, shifted right appropriately + + + + Obtain the value for the specified BitField, unshifted + + the short data containing the bits we're interested in + the selected bits + + + + Obtain the value for the specified BitField, appropriately + shifted right, as a short. Many users of a BitField will want + to treat the specified bits as an int value, and will not want + to be aware that the value is stored as a BitField (and so + shifted left so many bits) + + the short data containing the bits we're interested in + the selected bits, shifted right appropriately + + + + Obtain the value for the specified BitField, appropriately + shifted right. Many users of a BitField will want to treat the + specified bits as an int value, and will not want to be aware + that the value is stored as a BitField (and so shifted left so + many bits) + + the int data containing the bits we're interested in + the selected bits, shifted right appropriately + + + + Are all of the bits set or not? This is a stricter test than + isSet, in that all of the bits in a multi-bit set must be set + for this method to return true + + the int data containing the bits we're interested in + + true if all of the bits are set otherwise, false. + + + + + is the field set or not? This is most commonly used for a + single-bit field, which is often used to represent a boolean + value; the results of using it for a multi-bit field is to + determine whether *any* of its bits are set + + the int data containing the bits we're interested in + + true if any of the bits are set; otherwise, false. + + + + + Set the bits. + + the int data containing the bits we're interested in + the value of holder with the specified bits set to 1 + + + + Set a boolean BitField + + the int data containing the bits we're interested in + indicating whether to set or clear the bits + the value of holder with the specified bits set or cleared + + + + Set the bits. + + the short data containing the bits we're interested in + the value of holder with the specified bits set to 1 + + + + Set a boolean BitField + + the short data containing the bits we're interested in + indicating whether to set or clear the bits + the value of holder with the specified bits set or cleared + + + + Obtain the value for the specified BitField, appropriately + shifted right, as a short. Many users of a BitField will want + to treat the specified bits as an int value, and will not want + to be aware that the value is stored as a BitField (and so + shifted left so many bits) + + the short data containing the bits we're interested in + the new value for the specified bits + the selected bits, shifted right appropriately + + + + Sets the value. + + the byte data containing the bits we're interested in + The value. + + + + + Set a boolean BitField + + the byte data containing the bits we're interested in + indicating whether to set or clear the bits + the value of holder with the specified bits set or cleared + + + + Clears the bits. + + the byte data containing the bits we're interested in + the value of holder with the specified bits cleared + + + + Set the bits. + + the byte data containing the bits we're interested in + the value of holder with the specified bits set to 1 + + + + Returns immutable Btfield instances. + @author Jason Height (jheight at apache dot org) + + + + + Gets the instance. + + The mask. + + + + + representation of a byte (8-bit) field at a fixed location within a + byte array + @author Marc Johnson (mjohnson at apache dot org + + + + + Initializes a new instance of the class. + + The offset. + + + + Initializes a new instance of the class. + + The offset. + The value. + + + + Initializes a new instance of the class. + + The offset. + The data. + + + + Initializes a new instance of the class. + + The offset. + The _value. + The data. + + + + Gets or sets the value. + + The value. + + + + set the value from its offset into an array of bytes + + the byte array from which the value is to be read + + + + set the value from an Stream + + the Stream from which the value is to be read + + + + set the ByteField's current value and write it to a byte array + + value to be set + the byte array to write the value to + + + + Returns a that represents the current . + + + A that represents the current . + + + + + write the value out to an array of bytes at the appropriate offset + + the array of bytes to which the value is to be written + + + Utilities for working with Microsoft CodePages. + +

    Provides constants for understanding numeric codepages, + along with utilities to translate these into Java Character Sets.

    +
    + +

    Codepage 037, a special case

    +
    + +

    Codepage for SJIS

    +
    + +

    Codepage for GBK, aka MS936

    +
    + +

    Codepage for MS949

    +
    + +

    Codepage for UTF-16

    +
    + +

    Codepage for UTF-16 big-endian

    +
    + +

    Codepage for Windows 1250

    +
    + +

    Codepage for Windows 1251

    +
    + +

    Codepage for Windows 1252

    +
    + +

    Codepage for Windows 1253

    +
    + +

    Codepage for Windows 1254

    +
    + +

    Codepage for Windows 1255

    +
    + +

    Codepage for Windows 1256

    +
    + +

    Codepage for Windows 1257

    +
    + +

    Codepage for Windows 1258

    +
    + +

    Codepage for Johab

    +
    + +

    Codepage for Macintosh Roman (Java: MacRoman)

    +
    + +

    Codepage for Macintosh Japan (Java: unknown - use SJIS, cp942 or + cp943)

    +
    + +

    Codepage for Macintosh Chinese Traditional (Java: unknown - use Big5, + MS950, or cp937)

    +
    + +

    Codepage for Macintosh Korean (Java: unknown - use EUC_KR or + cp949)

    +
    + +

    Codepage for Macintosh Arabic (Java: MacArabic)

    +
    + +

    Codepage for Macintosh Hebrew (Java: MacHebrew)

    +
    + +

    Codepage for Macintosh Greek (Java: MacGreek)

    +
    + +

    Codepage for Macintosh Cyrillic (Java: MacCyrillic)

    +
    + +

    Codepage for Macintosh Chinese Simplified (Java: unknown - use + EUC_CN, ISO2022_CN_GB, MS936 or cp935)

    +
    + +

    Codepage for Macintosh Romanian (Java: MacRomania)

    +
    + +

    Codepage for Macintosh Ukrainian (Java: MacUkraine)

    +
    + +

    Codepage for Macintosh Thai (Java: MacThai)

    +
    + +

    Codepage for Macintosh Central Europe (Latin-2) + (Java: MacCentralEurope)

    +
    + +

    Codepage for Macintosh Iceland (Java: MacIceland)

    +
    + +

    Codepage for Macintosh Turkish (Java: MacTurkish)

    +
    + +

    Codepage for Macintosh Croatian (Java: MacCroatian)

    +
    + +

    Codepage for US-ASCII

    +
    + +

    Codepage for KOI8-R

    +
    + +

    Codepage for ISO-8859-1

    +
    + +

    Codepage for ISO-8859-2

    +
    + +

    Codepage for ISO-8859-3

    +
    + +

    Codepage for ISO-8859-4

    +
    + +

    Codepage for ISO-8859-5

    +
    + +

    Codepage for ISO-8859-6

    +
    + +

    Codepage for ISO-8859-7

    +
    + +

    Codepage for ISO-8859-8

    +
    + +

    Codepage for ISO-8859-9

    +
    + +

    Codepage for ISO-2022-JP

    +
    + +

    Another codepage for ISO-2022-JP

    +
    + +

    Yet another codepage for ISO-2022-JP

    +
    + +

    Codepage for ISO-2022-KR

    +
    + +

    Codepage for EUC-JP

    +
    + +

    Codepage for EUC-KR

    +
    + +

    Codepage for GB2312

    +
    + +

    Codepage for GB18030

    +
    + +

    Another codepage for US-ASCII

    +
    + +

    Codepage for UTF-8

    +
    + +

    Codepage for Unicode

    +
    + + Converts a string into bytes, in the equivalent character encoding + to the supplied codepage number. + @param string The string to convert + @param codepage The codepage number + + + Converts the bytes into a String, based on the equivalent character encoding + to the supplied codepage number. + @param string The byte of the string to convert + @param codepage The codepage number + + + Converts the bytes into a String, based on the equivalent character encoding + to the supplied codepage number. + @param string The byte of the string to convert + @param codepage The codepage number + + +

    Turns a codepage number into the equivalent character encoding's + name.

    + + @param codepage The codepage number + + @return The character encoding's name. If the codepage number is 65001, + the encoding name is "UTF-8". All other positive numbers are mapped to + "cp" followed by the number, e.g. if the codepage number is 1252 the + returned character encoding name will be "cp1252". + + @exception UnsupportedEncodingException if the specified codepage is + less than zero. +
    + + + This class comes from Java + + + + + Initializes a new instance of the class. + + + + + Adds the specified o. + + The o. + + + + Determines whether [contains] [the specified o]. + + The o. + + true if [contains] [the specified o]; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + is null. + + + is less than zero. + + + is multidimensional. + -or- + is equal to or greater than the length of . + -or- + The number of elements in the source is greater than the available space from to the end of the destination . + + + The type of the source cannot be cast automatically to the type of the destination . + + + + + Gets the number of elements contained in the . + + + + The number of elements contained in the . + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Removes the specified o. + + The o. + + + + Removes all of the elements from this set. + The set will be empty after this call returns. + + + + + This class comes from Java + + + + + Initializes a new instance of the class. + + + + + Removes the specified key. + + The key. + + + + + Gets the enumerator. + + + + + + Determines whether the specified key contains key. + + The key. + + true if the specified key contains key; otherwise, false. + + + + + Adds the specified key. + + The key. + The value. + + + + Gets the count. + + The count. + + + + Gets or sets the with the specified key. + + + + + + Gets the keys. + + The keys. + + + + Clears this instance. + + + + + Loads the specified in stream. + + The in stream. + + + + Loads the convert. + + The string. + + + Converts encoded \uxxxx to unicode chars + and changes special saved chars to their original forms + + + + + Continues the line. + + The line. + + + + + CRC Verification + + + + + Initializes a new instance of the class. + + + + + CRC Bytes. + + The buffer. + + + + + String CRC + + the string + + + + + File CRC + + the input file + + + + + Stream CRC + + the input stream + + + + + behavior of a field at a fixed location within a byte array + @author Marc Johnson (mjohnson at apache dot org + + + + + set the value from its offset into an array of bytes + + the byte array from which the value is to be read + + + + set the value from an Stream + + the Stream from which the value is to be read + + + + return the value as a String + + + + + + write the value out to an array of bytes at the appropriate offset + + the array of bytes to which the value is to be written + + + + dump data in hexadecimal format; derived from a HexDump utility I + wrote in June 2001. + @author Marc Johnson + @author Glen Stampoultzis (glens at apache.org) + + + + Used to build output as Hex + + + Used to build output as Hex + + + dump an array of bytes to a String + + @param data the byte array to be dumped + @param offset its offset, whatever that might mean + @param index initial index into the byte array + @param length number of characters to output + + @exception ArrayIndexOutOfBoundsException if the index is + outside the data array's bounds + @return output string + + + Dumps bytesToDump bytes to an output stream. + + @param in The stream to read from + @param out The output stream + @param start The index to use as the starting position for the left hand side label + @param bytesToDump The number of bytes to output. Use -1 to read until the end of file. + + + + Shorts to hex. + + The value. + char array of 2 (zero padded) uppercase hex chars and prefixed with '0x' + + + + Bytes to hex. + + The value. + char array of 1 (zero padded) uppercase hex chars and prefixed with '0x' + + + + Ints to hex. + + The value. + char array of 4 (zero padded) uppercase hex chars and prefixed with '0x' + + + + char array of 4 (zero padded) uppercase hex chars and prefixed with '0x' + + The value. + char array of 4 (zero padded) uppercase hex chars and prefixed with '0x' + + + + Toes the hex chars. + + The p value. + The n bytes. + char array of uppercase hex chars, zero padded and prefixed with '0x' + + + + This method reads hex data from a filename and returns a byte array. + The file may contain line comments that are preceeded with a # symbol. + + The filename to read + The bytes read from the file. + If there was a problem while reading the file. + + + + Same as ReadData(String) except that this method allows you to specify sections within + a file. Sections are referenced using section headers in the form: + + The stream. + The section. + + + + + Reads the data. + + The filename. + The section. + + + + + Reads the data. + + The stream. + The EOF char. + + + + + Reads from string. + + The data. + + + + + Reads to EOL. + + The stream. + + + + Reads the next byte of data from the input stream. The value byte is + returned as an int in the range 0 to + 255. If no byte is available because the end of the stream + has been reached, the value -1 is returned. This method + blocks until input data is available, the end of the stream is detected, + or an exception is thrown. + + A subclass must provide an implementation of this method. + + + the next byte of data, or -1 if the end of the + stream is reached. + + if an I/O error occurs + + + + Reads some number of bytes from the input stream and stores them into + the buffer array b. The number of bytes actually read is + returned as an integer. This method blocks until input data is + available, end of file is detected, or an exception is thrown. + +

    If the length of b is zero, then no bytes are read and + 0 is returned; otherwise, there is an attempt to read at + least one byte. If no byte is available because the stream is at the + end of the file, the value -1 is returned; otherwise, at + least one byte is read and stored into b.

    + +

    The first byte read is stored into element b[0], the + next one into b[1], and so on. The number of bytes read is, + at most, equal to the length of b. Let k be the + number of bytes actually read; these bytes will be stored in elements + b[0] through b[k-1], + leaving elements b[k] through + b[b.length-1] unaffected.

    + +

    The read(b) method for class InputStream + has the same effect as:

     read(b, 0, b.length) 

    +
    + the buffer into which the data is read. + + the total number of bytes read into the buffer, or + -1 if there is no more data because the end of + the stream has been reached. + + If the first byte cannot be read for any reason + other than the end of the file, if the input stream has been closed, or + if some other I/O error occurs. + if b is null. + +
    + + + Reads up to len bytes of data from the input stream into + an array of bytes. An attempt is made to read as many as + len bytes, but a smaller number may be read. + The number of bytes actually read is returned as an integer. + +

    This method blocks until input data is available, end of file is + detected, or an exception is thrown.

    + +

    If len is zero, then no bytes are read and + 0 is returned; otherwise, there is an attempt to read at + least one byte. If no byte is available because the stream is at end of + file, the value -1 is returned; otherwise, at least one + byte is read and stored into b.

    + +

    The first byte read is stored into element b[off], the + next one into b[off+1], and so on. The number of bytes read + is, at most, equal to len. Let k be the number of + bytes actually read; these bytes will be stored in elements + b[off] through b[off+k-1], + leaving elements b[off+k] through + b[off+len-1] unaffected.

    + +

    In every case, elements b[0] through + b[off] and elements b[off+len] through + b[b.length-1] are unaffected.

    + +

    The read(b, off, len) method + for class InputStream simply calls the method + read() repeatedly. If the first such call results in an + IOException, that exception is returned from the call to + the read(b, off, len) method. If + any subsequent call to read() results in a + IOException, the exception is caught and treated as if it + were end of file; the bytes read up to that point are stored into + b and the number of bytes read before the exception + occurred is returned. The default implementation of this method blocks + until the requested amount of input data len has been read, + end of file is detected, or an exception is thrown. Subclasses are encouraged + to provide a more efficient implementation of this method.

    +
    + the buffer into which the data is read. + the start offset in array b at which the data is written. + the maximum number of bytes to read. + + the total number of bytes read into the buffer, or + -1 if there is no more data because the end of + the stream has been reached. + If the first byte cannot be read for any reason + other than end of file, or if the input stream has been closed, or if + some other I/O error occurs. + If b is null. + If off is negative, + len is negative, or len is greater than + b.length - off + +
    + + + Skips over and discards n bytes of data from this input + stream. The skip method may, for a variety of reasons, end + up skipping over some smaller number of bytes, possibly 0. + This may result from any of a number of conditions; reaching end of file + before n bytes have been skipped is only one possibility. + The actual number of bytes skipped is returned. If {@code n} is + negative, the {@code skip} method for class {@code InputStream} always + returns 0, and no bytes are skipped. Subclasses may handle the negative + value differently. + +

    The skip method of this class creates a + byte array and then repeatedly reads into it until n bytes + have been read or the end of the stream has been reached. Subclasses are + encouraged to provide a more efficient implementation of this method. + For instance, the implementation may depend on the ability to seek.

    +
    + the number of bytes to be skipped. + the actual number of bytes skipped. + if the stream does not support seek, + or if some other I/O error occurs. + +
    + + + Returns an estimate of the number of bytes that can be read (or + skipped over) from this input stream without blocking by the next + invocation of a method for this input stream. The next invocation + might be the same thread or another thread. A single read or skip of this + many bytes will not block, but may read or skip fewer bytes. + +

    Note that while some implementations of {@code InputStream} will return + the total number of bytes in the stream, many will not. It is + never correct to use the return value of this method to allocate + a buffer intended to hold all data in this stream.

    + +

    A subclass' implementation of this method may choose to throw an + {@link IOException} if this input stream has been closed by + invoking the {@link #close()} method.

    + +

    The {@code available} method for class {@code InputStream} always + returns {@code 0}.

    + +

    This method should be overridden by subclasses.

    +
    + if an I/O error occurs. +
    + + + Closes this input stream and releases any system resources associated + with the stream. + +

    The Close method of InputStream does nothing.

    +
    + if an I/O error occurs. +
    + + + Marks the current position in this input stream. A subsequent call to + the reset method repositions this stream at the last marked + position so that subsequent reads re-read the same bytes. + +

    The readlimit arguments tells this input stream to + allow that many bytes to be read before the mark position gets + invalidated.

    + +

    The general contract of mark is that, if the method + markSupported returns true, the stream somehow + remembers all the bytes read after the call to mark and + stands ready to supply those same bytes again if and whenever the method + reset is called. However, the stream is not required to + remember any data at all if more than readlimit bytes are + read from the stream before reset is called.

    + +

    Marking a closed stream should not have any effect on the stream.

    + +

    The mark method of InputStream does + nothing.

    +
    + the maximum limit of bytes that can be read before + the mark position becomes invalid. + + +
    + + + Repositions this stream to the position at the time the + mark method was last called on this input stream. + +

    The general contract of reset is:

    + +
      +
    • If the method markSupported returns + true, then: + +
      • If the method mark has not been called since + the stream was created, or the number of bytes read from the stream + since mark was last called is larger than the argument + to mark at that last call, then an + IOException might be thrown.
      • + +
      • If such an IOException is not thrown, then the + stream is reset to a state such that all the bytes read since the + most recent call to mark (or since the start of the + file, if mark has not been called) will be resupplied + to subsequent callers of the read method, followed by + any bytes that otherwise would have been the next input data as of + the time of the call to reset.
      • + +
      • If the method markSupported returns + false, then: + +
        • The call to reset may throw an + IOException.
        • + +
        • If an IOException is not thrown, then the stream + is reset to a fixed state that depends on the particular type of the + input stream and how it was created. The bytes that will be supplied + to subsequent callers of the read method depend on the + particular type of the input stream.
    + +

    The method reset for class InputStream + does nothing except throw an IOException.

    +
    +
    + + + Tests if this input stream supports the mark and + reset methods. Whether or not mark and + reset are supported is an invariant property of a + particular input stream instance. The markSupported method + of InputStream returns false. + + + true if this stream instance supports the mark + and reset methods; false otherwise. + + + + + + + construct the with its offset into its containing byte array class. + + offset of the field within its byte array. + + + + construct the with its offset into its containing + byte array and initialize its value + + offset of the field within its byte array + the initial value + + + + Construct the with its offset into its containing + byte array and initialize its value from its byte array + + offset of the field within its byte array + the byte array to Read the value from + + + + construct the with its offset into its containing + byte array, initialize its value, and write the value to a byte + + offset of the field within its byte array + the initial value + the byte array to write the value to + + + + get or Set the IntegerField's current value + + The value. + + + + + Set the IntegerField's current value and write it to a byte array + + value to be Set + the byte array to write the value to + + + + Set the value from its offset into an array of bytes + + The data. + + + + Set the value from an Stream + + the Stream from which the value is to be Read + + + + write the value out to an array of bytes at the appropriate offset + + the array of bytes to which the value is to be written + + + + Same as using the constructor with the same + parameter list. Avoid creation of an useless object. + + offset of the field within its byte array + the initial value + the byte array to write the value to + + + + Returns a that represents the current . + + + A that represents the current . + + + + + A List of int's; as full an implementation of the java.Util.List interface as possible, with an eye toward minimal creation of objects + + the mimicry of List is as follows: +
      +
    • if possible, operations designated 'optional' in the List + interface are attempted
    • +
    • wherever the List interface refers to an Object, substitute + int
    • +
    • wherever the List interface refers to a Collection or List, + substitute IntList
    • +
    + + the mimicry is not perfect, however: +
      +
    • operations involving Iterators or ListIterators are not + supported
    • +
    • Remove(Object) becomes RemoveValue to distinguish it from + Remove(int index)
    • +
    • subList is not supported
    • +
    + @author Marc Johnson +
    +
    + + + create an IntList of default size + + + + + create a copy of an existing IntList + + the existing IntList + + + + create an IntList with a predefined Initial size + + the size for the internal array + + + + + add the specfied value at the specified index + + the index where the new value is to be Added + the new value + + + + Appends the specified element to the end of this list + + element to be Appended to this list. + return true (as per the general contract of the Collection.add method + + + + Appends all of the elements in the specified collection to the + end of this list, in the order that they are returned by the + specified collection's iterator. The behavior of this + operation is unspecified if the specified collection is + modified while the operation is in progress. (Note that this + will occur if the specified collection is this list, and it's + nonempty.) + + collection whose elements are to be Added to this list. + return true if this list Changed as a result of the call. + + + + Inserts all of the elements in the specified collection into + this list at the specified position. Shifts the element + currently at that position (if any) and any subsequent elements + to the right (increases their indices). The new elements will + appear in this list in the order that they are returned by the + specified collection's iterator. The behavior of this + operation is unspecified if the specified collection is + modified while the operation is in progress. (Note that this + will occur if the specified collection is this list, and it's + nonempty.) + + index at which to insert first element from the specified collection. + elements to be inserted into this list. + return true if this list Changed as a result of the call. + + + + Removes all of the elements from this list. This list will be + empty After this call returns (unless it throws an exception). + + + + + Returns true if this list Contains the specified element. More + formally, returns true if and only if this list Contains at + least one element e such that o == e + + element whose presence in this list is to be Tested. + return true if this list Contains the specified element. + + + + Returns true if this list Contains all of the elements of the + specified collection. + + collection to be Checked for Containment in this list. + return true if this list Contains all of the elements of the specified collection. + + + + Compares the specified object with this list for Equality. + Returns true if and only if the specified object is also a + list, both lists have the same size, and all corresponding + pairs of elements in the two lists are Equal. (Two elements e1 + and e2 are equal if e1 == e2.) In other words, two lists are + defined to be equal if they contain the same elements in the + same order. This defInition ensures that the Equals method + works properly across different implementations of the List + interface. + + the object to be Compared for Equality with this list. + return true if the specified object is equal to this list. + + + + Returns the element at the specified position in this list. + + index of element to return. + return the element at the specified position in this list. + + + + Returns the hash code value for this list. The hash code of a + list is defined to be the result of the following calculation: + + + hashCode = 1; + Iterator i = list.Iterator(); + while (i.HasNext()) { + Object obj = i.Next(); + hashCode = 31*hashCode + (obj==null ? 0 : obj.HashCode()); + } + + + This ensures that list1.Equals(list2) implies that + list1.HashCode()==list2.HashCode() for any two lists, list1 and + list2, as required by the general contract of Object.HashCode. + + + return the hash code value for this list. + + + + Returns the index in this list of the first occurrence of the + specified element, or -1 if this list does not contain this + element. More formally, returns the lowest index i such that + (o == Get(i)), or -1 if there is no such index. + + element to search for. + return the index in this list of the first occurrence of the + specified element, or -1 if this list does not contain + this element. + + + + Returns true if this list Contains no elements. + + return true if this list Contains no elements. + + + + Returns the index in this list of the last occurrence of the + specified element, or -1 if this list does not contain this + element. More formally, returns the highest index i such that + (o == Get(i)), or -1 if there is no such index. + + element to search for. + the index in this list of the last occurrence of the + specified element, or -1 if this list does not contain + this element. + + + + + Removes the element at the specified position in this list. + Shifts any subsequent elements to the left (subtracts one from + their indices). Returns the element that was Removed from the + list. + + the index of the element to Removed. + return the element previously at the specified position. + + + + Removes the first occurrence in this list of the specified + element (optional operation). If this list does not contain + the element, it is unChanged. More formally, Removes the + element with the lowest index i such that (o.Equals(get(i))) + (if such an element exists). + + element to be Removed from this list, if present. + return true if this list Contained the specified element. + + + + Removes from this list all the elements that are Contained in + the specified collection + + collection that defines which elements will be Removed from the list. + return true if this list Changed as a result of the call. + + + + Retains only the elements in this list that are Contained in + the specified collection. In other words, Removes from this + list all the elements that are not Contained in the specified + collection. + + collection that defines which elements this Set will retain. + return true if this list Changed as a result of the call. + + + + Replaces the element at the specified position in this list with the specified element + + index of element to Replace. + element to be stored at the specified position. + the element previously at the specified position. + + + + Returns the number of elements in this list. If this list + Contains more than Int32.MaxValue elements, returns + Int32.MaxValue. + + the number of elements in this IntList + + + + the number of elements in this IntList + + + + + Returns an array Containing all of the elements in this list in + proper sequence. Obeys the general contract of the + Collection.ToArray method. + + an array Containing all of the elements in this list in proper sequence. + + + + Returns an array Containing all of the elements in this list in + proper sequence. Obeys the general contract of the + Collection.ToArray(Object[]) method. + + the array into which the elements of this list are to + be stored, if it is big enough; otherwise, a new array + is allocated for this purpose. + return an array Containing the elements of this list. + + + + A List of objects that are indexed AND keyed by an int; also allows for Getting + the index of a value in the list + +

    I am happy is someone wants to re-implement this without using the + internal list and hashmap. If so could you please make sure that + you can add elements half way into the list and have the value-key mappings + update

    +
    + + @author Jason Height +
    + + + create an IntMapper of default size + + + + + Appends the specified element to the end of this list + + element to be Appended to this list. + return true (as per the general contract of the Collection.add method) + + + + Gets the size. + + + + + Gets the T object at the specified index. + + + + + + + Gets the index of T object. + + The o. + + + + + Gets the enumerator. + + + + + + Implementors of this interface allow client code to 'delay' writing to a certain section of a + data output stream.
    + A typical application is for writing BIFF records when the size is not known until well after + the header has been written. The client code can call + to reserve two bytes of the output for the 'ushort size' header field. The delayed output can + be written at any stage. +
    + @author Josh Micich +
    + + + Creates an output stream intended for outputting a sequence of size bytes. + + + + + + Peeks at the first 8 bytes of the stream. Returns those bytes, but + with the stream unaffected. Requires a stream that supports mark/reset, + or a PushbackInputStream. If the stream has >0 but <8 bytes, + remaining bytes will be zero. + @throws EmptyFileException if the stream is empty + + + + Reads all the data from the input stream, and returns + the bytes Read. + + The stream. + + Tony Qu changed the code + + + + Reads up to {@code length} bytes from the input stream, and returns the bytes read. + + + + + + + + Reads the fully. + + The stream. + The b. + + + + + Same as the normal InputStream#read(byte[], int, int), but tries to ensure + that the buffer is filled completely if possible, i.e. b.remaining() + returns 0. + If the end of file is reached before any bytes are Read, returns -1. + If the end of the file is reached after some bytes are read, returns the + number of bytes read. If the end of the file isn't reached before the + buffer has no more remaining capacity, will return the number of bytes + that were read. + + the stream from which the data is read. + the buffer into which the data is read. + the start offset in array b at which the data is written. + the maximum number of bytes to read. + + + + + Copies all the data from the given InputStream to the OutputStream. It + leaves both streams open, so you will still need to close them once done. + + + + + + Quietly (no exceptions) close Closable resource. In case of error it will + be printed to {@link IOUtils} class logger. + + @param closeable + resource to close + + + + Adapts a plain byte array to + + @author Josh Micich + + + + Adapts a plain byte array to + + @author Josh Micich + + + + @author Josh Micich + + + + Wraps an providing

    + + This class does not buffer any input, so the stream Read position maintained + by this class is consistent with that of the inner stream. +

    + + @author Josh Micich + +
    + + + Reads up to byte.length bytes of data from this + input stream into an array of bytes. This method blocks until some + input is available. + + simulate java FilterInputStream + + + + + + + Reads up to len bytes of data from this input stream + into an array of bytes.If len is not zero, the method + blocks until some input is available; otherwise, no + bytes are read and0 is returned. + + simulate java FilterInputStream + + + + + + + + + @author Josh Micich + + + + Wraps an providing + + @author Josh Micich + + + + a utility class for handling little-endian numbers, which the 80x86 world is + replete with. The methods are all static, and input/output is from/to byte + arrays, or from InputStreams. + + + @author Marc Johnson (mjohnson at apache dot org) + @author Andrew Oliver (acoliver at apache dot org) + + + + + Initializes a new instance of the class. + + + + + get a short value from a byte array + + the byte array + a starting offset into the byte array + the short (16-bit) value + + + + get an unsigned short value from a byte array + + the byte array + a starting offset into the byte array + the unsigned short (16-bit) value in an integer + + + + get a short value from a byte array + + a starting offset into the byte array + the short (16-bit) value + + + + get a short value from a byte array + + the unsigned short (16-bit) value in an integer + + + + + get an int value from a byte array + + the byte array + a starting offset into the byte array + the int (32-bit) value + + + + get an int value from the beginning of a byte array + + the byte array + the int (32-bit) value + + + + Gets the U int. + + the byte array + a starting offset into the byte array + the unsigned int (32-bit) value in a long + + + + Gets the U int. + + the byte array + the unsigned int (32-bit) value in a long + + + + get a long value from a byte array + + the byte array + a starting offset into the byte array + the long (64-bit) value + + + + get a double value from a byte array, reads it in little endian format + then converts the resulting revolting IEEE 754 (curse them) floating + point number to a c# double + + the byte array + a starting offset into the byte array + the double (64-bit) value + + + + Puts the short. + + the byte array + a starting offset into the byte array + The value. + + + + Added for consistency with other put~() methods + + the byte array + a starting offset into the byte array + The value. + + + + Puts the U short. + + the byte array + a starting offset into the byte array + The value. + + + Put signed short into output stream + + @param value + the short (16-bit) value + @param outputStream + output stream + @throws IOException + if an I/O error occurs + + + + put an int value into a byte array + + the byte array + a starting offset into the byte array + the int (32-bit) value + + + + Put int into output stream + + the int (32-bit) value + output stream + + + + put a long value into a byte array + + the byte array + a starting offset into the byte array + the long (64-bit) value + + + + put a double value into a byte array + + the byte array + a starting offset into the byte array + the double (64-bit) value + + + + Reads the short. + + The stream. + + + + + get an int value from an Stream + + the Stream from which the int is to be read + the int (32-bit) value + will be propagated back to the caller + if the stream cannot provide enough bytes + + + + get a long value from a Stream + + the Stream from which the long is to be read + the long (64-bit) value + will be propagated back to the caller + if the stream cannot provide enough bytes + + + + Us the byte to int. + + The b. + + + + + Copy a portion of a byte array + + the original byte array + Where to start copying from. + Number of bytes to copy. + The byteArray value + + if copying would cause access ofdata outside array bounds. + + + + + Gets the unsigned byte. + + the byte array + + + + + Gets the unsigned byte. + + the byte array + a starting offset into the byte array + + + + + Puts the double. + + the byte array + The value. + + + put a double value into a byte array + + @param value + the double (64-bit) value + @param outputStream + output stream + @throws IOException + if an I/O error occurs + + + Put unsigned int into output stream + + @param value + the int (32-bit) value + @param outputStream + output stream + @throws IOException + if an I/O error occurs + + + + Puts the uint. + + the byte array + a starting offset into the byte array + The value. + + + + Puts the long. + + the byte array + The value. + + + Put long into output stream + + @param value + the long (64-bit) value + @param outputStream + output stream + @throws IOException + if an I/O error occurs + + + + Puts the long. + + the byte array + The value. + + + + Puts the ulong. + + the byte array + a starting offset into the byte array + The value. + + + + Puts the number. + + the byte array + a starting offset into the byte array + The value. + The size. + + + + Puts the number. + + the byte array + a starting offset into the byte array + The value. + The size. + + + + Puts the short array. + + the byte array + a starting offset into the byte array + The value. + + + + Puts the U short. + + the byte array + The value. + + + Put unsigned short into output stream + + @param value + the unsigned short (16-bit) value + @param outputStream + output stream + @throws IOException + if an I/O error occurs + + + + Reads from stream. + + The stream. + The size. + + + + + Reads the long. + + The stream. + + + + This utility class is used to set locale and time zone settings beside + of the JDK internal {@link java.util.Locale#setDefault(Locale)} and + {@link java.util.TimeZone#setDefault(TimeZone)} methods, because + the locale/time zone specific handling of certain office documents - + maybe for different time zones / locales ... - shouldn't affect + other java components. + + + Excel doesn't store TimeZone information in the file, so if in doubt, + use UTC to perform calculations + + + Default encoding for unknown byte encodings of native files + (at least it's better than to rely on a platform dependent encoding + for legacy stuff ...) + + + As time zone information is not stored in any format, it can be + set before any date calculations take place. + This setting is specific to the current thread. + + @param timezone the timezone under which date calculations take place + + + @return the time zone which is used for date calculations, defaults to UTC + + + Sets default user locale. + This setting is specific to the current thread. + + + @return the default user locale, defaults to {@link Locale#ROOT} + + + @return a calendar for the user locale and time zone + + + Convenience method - month is 0-based as in java.util.Calendar + + @param year + @param month + @param day + @return a calendar for the user locale and time zone, and the given date + + + Convenience method - month is 0-based as in java.util.Calendar + + @param year + @param month + @param day + @param hour + @param minute + @param second + @return a calendar for the user locale and time zone, and the given date + + + @return a calendar for the user locale and time zone + + + @return a calendar for the user locale and time zone + + + + construct the with its offset into its containing byte array + + The offset. + + + + construct the LongField with its offset into its containing + byte array and initialize its value + + offset of the field within its byte array + the initial value + + + + Construct the class with its offset into its containing + byte array and initialize its value from its byte array + + The offset of the field within its byte array + the byte array to read the value from + + + + construct the class with its offset into its containing + byte array, initialize its value, and write the value to a byte + array + + offset of the field within its byte array + the initial value + the byte array to write the value to + + + + Getg or sets the LongField's current value + + The current value + + + + set the LongField's current value and write it to a byte array + + value to be set + the byte array to write the value to + + + + set the value from its offset into an array of bytes + + the byte array from which the value is to be read + + + + set the value from an Stream + + the Stream from which the value is to be + + + + write the value out to an array of bytes at the appropriate offset + + the array of bytes to which the value is to be written + + + + Same as using the constructor with the same + parameter list. Avoid creation of an useless object. + + offset of the field within its byte array + the initial value + the byte array to write the value to + + + + Returns a that represents the current . + + + A that represents the current . + + + + This class provides common functionality for the + various LZW implementations in the different file + formats. + It's currently used by HDGF and HMEF. + + Two good resources on LZW are: + http://en.wikipedia.org/wiki/LZW + http://marknelson.us/1989/10/01/lzw-data-compression/ + + + Does the mask bit mean it's compressed or uncompressed? + + + How much to append to the code length in the stream + to Get the real code length? Normally 2 or 3 + + + Does the 12 bits of the position Get stored in + Little Endian or Big Endian form? + This controls whether a pos+length of 0x12 0x34 + becomes a position of 0x123 or 0x312 + + + Populates the dictionary, and returns where in it + to begin writing new codes. + Generally, if the dictionary is pre-populated, then new + codes should be placed at the end of that block. + Equally, if the dictionary is left with all zeros, then + usually the new codes can go in at the start. + + + Adjusts the position offset if needed when looking + something up in the dictionary. + + + Decompresses the given input stream, returning the array of bytes + of the decompressed input. + + + Perform a streaming decompression of the input. + Works by: + 1) Reading a flag byte, the 8 bits of which tell you if the + following 8 codes are compressed our un-compressed + 2) Consider the 8 bits in turn + 3) If the bit is Set, the next code is un-compressed, so + add it to the dictionary and output it + 4) If the bit isn't Set, then read in the length and start + position in the dictionary, and output the bytes there + 5) Loop until we've done all 8 bits, then read in the next + flag byte + + + Given an integer, turn it into a java byte, handling + the wrapping. + This is a convenience method + + + Given a java byte, turn it into an integer between 0 + and 255 (i.e. handle the unwrapping). + This is a convenience method + + + + A Logger class that strives to make it as easy as possible for + developers to write Log calls, while simultaneously making those + calls as cheap as possible by performing lazy evaluation of the Log + message. + @author Marc Johnson (mjohnson at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Nicola Ken Barozzi (nicolaken at apache.org) + + + + Log a message + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 The object to Log. + + + Check if a Logger is enabled to Log at the specified level + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first object to place in the message + @param obj2 second object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + @param obj6 sixth Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + @param obj6 sixth Object to place in the message + @param obj7 seventh Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + @param obj6 sixth Object to place in the message + @param obj7 seventh Object to place in the message + @param obj8 eighth Object to place in the message + + + Log a message + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 The object to Log. This is converted to a string. + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param exception An error message to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param obj6 sixth object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param obj6 sixth object to place in the message + @param obj7 seventh object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param obj6 sixth object to place in the message + @param obj7 seventh object to place in the message + @param obj8 eighth object to place in the message + @param exception An exception to be Logged + + + File header for PNG format. + + + Checks if the offset matches the PNG header. + + @param data the data to check. + @param offset the offset to check at. + @return {@code true} if the offset matches. + + + Map of POILogger instances, with classes as keys + + + A common instance of NullLogger, as it does nothing + we only need the one + + + The name of the class to use. Initialised the + first time we need it + + + + Initializes a new instance of the class. + + + + + Get a logger, based on a class name + + the class whose name defines the log + a POILogger for the specified class + + + + Get a logger, based on a String + + the String that defines the log + a POILogger for the specified class + + + package scope so it cannot be instantiated outside of the util + package. You need a POILogger? Go to the POILogFactory for one + + + + Log a message + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 The object to Log. This is converted to a string. + + + Log a message + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 The object to Log. This is converted to a string. + @param exception An exception to be Logged + + + Check if a Logger is enabled to Log at the specified level + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first object to place in the message + @param obj2 second object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + @param obj6 sixth Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + @param obj6 sixth Object to place in the message + @param obj7 seventh Object to place in the message + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third Object to place in the message + @param obj4 fourth Object to place in the message + @param obj5 fifth Object to place in the message + @param obj6 sixth Object to place in the message + @param obj7 seventh Object to place in the message + @param obj8 eighth Object to place in the message + + + Log an exception, without a message + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param exception An error message to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param obj6 sixth object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param obj6 sixth object to place in the message + @param obj7 seventh object to place in the message + @param exception An exception to be Logged + + + Log a message. Lazily appends Object parameters together. + + @param level One of DEBUG, INFO, WARN, ERROR, FATAL + @param obj1 first Object to place in the message + @param obj2 second Object to place in the message + @param obj3 third object to place in the message + @param obj4 fourth object to place in the message + @param obj5 fifth object to place in the message + @param obj6 sixth object to place in the message + @param obj7 seventh object to place in the message + @param obj8 eighth object to place in the message + @param exception An exception to be Logged + + + + Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. + + + The unsigned byte cast to an Int32, or -1 if at the end of the stream. + + + The stream does not support reading. + + + Methods were called after the stream was closed. + + + + + Unreads the specified b. + + The b. + + + + When overridden in a derived class, gets a value indicating whether the current stream supports reading. + + + true if the stream supports reading; otherwise, false. + + + + + Pushes back a portion of an array of bytes by copying it to the front + of the pushback buffer. + + the byte array to push back. + the start offset of the data. + the number of bytes to push back. + + + + When overridden in a derived class, gets a value indicating whether the current stream supports seeking. + + + true if the stream supports seeking; otherwise, false. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports writing. + + + true if the stream supports writing; otherwise, false. + + + + + When overridden in a derived class, gets the length in bytes of the stream. + + + + A long value representing the length of the stream in bytes. + + + A class derived from Stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, gets or sets the position within the current stream. + + + + The current position within the stream. + + + An I/O error occurs. + + + The stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. + + + + + When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device. + + + An I/O error occurs. + + + + + When overridden in a derived class, sets the position within the current stream. + + A byte offset relative to the parameter. + A value of type indicating the reference point used to obtain the new position. + + The new position within the current stream. + + + An I/O error occurs. + + + The stream does not support seeking, such as if the stream is constructed from a pipe or console output. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, sets the length of the current stream. + + The desired length of the current stream in bytes. + + An I/O error occurs. + + + The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + An array of bytes. This method copies bytes from to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The number of bytes to be written to the current stream. + + The sum of and is greater than the buffer length. + + + is null. + + + or is negative. + + + An I/O error occurs. + + + The stream does not support writing. + + + Methods were called after the stream was closed. + + + + + Writes a byte to the current position in the stream and advances the position within the stream by one byte. + + The byte to write to the stream. + + An I/O error occurs. + + + The stream does not support writing, or the stream is already closed. + + + Methods were called after the stream was closed. + + + + + Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. + + + The unsigned byte cast to an Int32, or -1 if at the end of the stream. + + + The stream does not support reading. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + + An array of bytes. When this method returns, the buffer contains the specified byte array with the values between and ( + - 1) replaced by the bytes read from the current source. + The zero-based byte offset in at which to begin storing the data read from the current stream. + The maximum number of bytes to be read from the current stream. + + The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. + + + The sum of and is larger than the buffer length. + + + is null. + + + or is negative. + + + An I/O error occurs. + + + The stream does not support reading. + + + Methods were called after the stream was closed. + + + + + Unreads the specified b. + + The b. + + + + When overridden in a derived class, gets a value indicating whether the current stream supports reading. + + + true if the stream supports reading; otherwise, false. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports seeking. + + + true if the stream supports seeking; otherwise, false. + + + + + When overridden in a derived class, gets a value indicating whether the current stream supports writing. + + + true if the stream supports writing; otherwise, false. + + + + + When overridden in a derived class, gets the length in bytes of the stream. + + + + A long value representing the length of the stream in bytes. + + + A class derived from Stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, gets or sets the position within the current stream. + + + + The current position within the stream. + + + An I/O error occurs. + + + The stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. + + + + + When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device. + + + An I/O error occurs. + + + + + When overridden in a derived class, sets the position within the current stream. + + A byte offset relative to the parameter. + A value of type indicating the reference point used to obtain the new position. + + The new position within the current stream. + + + An I/O error occurs. + + + The stream does not support seeking, such as if the stream is constructed from a pipe or console output. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, sets the length of the current stream. + + The desired length of the current stream in bytes. + + An I/O error occurs. + + + The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. + + + Methods were called after the stream was closed. + + + + + When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + An array of bytes. This method copies bytes from to the current stream. + The zero-based byte offset in at which to begin copying bytes to the current stream. + The number of bytes to be written to the current stream. + + The sum of and is greater than the buffer length. + + + is null. + + + or is negative. + + + An I/O error occurs. + + + The stream does not support writing. + + + Methods were called after the stream was closed. + + + + + Writes a byte to the current position in the stream and advances the position within the stream by one byte. + + The byte to write to the stream. + + An I/O error occurs. + + + The stream does not support writing, or the stream is already closed. + + + Methods were called after the stream was closed. + + + + A common exception thrown by our binary format Parsers + (especially HSSF and DDF), when they hit invalid + format or data when Processing a record. + + + Wrapper of InputStream which provides Run Length Encoding (RLE) + decompression on the fly. Uses MS-OVBA decompression algorithm. See + http://download.microsoft.com/download/2/4/8/24862317-78F0-4C4B-B355-C7B2C1D997DB/[MS-OVBA].pdf + + + Bitmasks for performance + + + the wrapped inputstream + + + a byte buffer with size 4096 for storing a single chunk + + + the current position in the byte buffer for Reading + + + the number of bytes in the byte buffer + + + Creates a new wrapper RLE Decompression InputStream. + + @param in The stream to wrap with the RLE Decompression + @throws IOException + + + Reads a single chunk from the underlying inputstream. + + @return number of bytes that were Read, or -1 if the end of the stream was reached. + @throws IOException + + + Helper method to determine how many bits in the CopyToken are used for the CopyLength. + + @param offset + @return returns the number of bits in the copy token (a value between 4 and 12) + + + Convenience method for read a 2-bytes short in little endian encoding. + + @return short value from the stream, -1 if end of stream is reached + @throws IOException + + + Convenience method for read a 4-bytes int in little endian encoding. + + @return integer value from the stream, -1 if end of stream is reached + @throws IOException + + + + construct the ShortField with its offset into its containing + byte array + + offset of the field within its byte array + if offset is negative + + + + construct the ShortField with its offset into its containing byte array and initialize its value + + offset of the field within its byte array + the initial value + if offset is negative + + + + Construct the ShortField with its offset into its containing + byte array and initialize its value from its byte array + + offset of the field within its byte array + the byte array to read the value from + if the offset is not + within the range of 0..(data.length - 1) + + + + construct the ShortField with its offset into its containing + byte array, initialize its value, and write its value to its + byte array + + offset of the field within its byte array + the initial value + the byte array to write the value to + if offset is negative + + + + Gets or sets the value. + + The value. + + + + set the ShortField's current value and write it to a byte array + + value to be set + the byte array to write the value to + if the offset is out + of range + + + + set the value from its offset into an array of bytes + + the byte array from which the value is to be read + if the offset is out + of range + + + + set the value from an Stream + + the Stream from which the value is to be + read + if an IOException is thrown from reading + the Stream + if there is not enough data + available from the Stream + + + + write the value out to an array of bytes at the appropriate + offset + + the array of bytes to which the value is to be + written + if the offset is out + of range + + + + Same as using the constructor with the same + parameter list. Avoid creation of an useless object. + + offset of the field within its byte array + the initial value + the byte array to write the value to + + + + Returns a that represents the current . + + + A that represents the current . + + + + + A List of short's; as full an implementation of the java.Util.List + interface as possible, with an eye toward minimal creation of + objects + + the mimicry of List is as follows: +
      +
    • if possible, operations designated 'optional' in the List + interface are attempted
    • +
    • wherever the List interface refers to an Object, substitute + short
    • +
    • wherever the List interface refers to a Collection or List, + substitute shortList
    • +
    + + the mimicry is not perfect, however: +
      +
    • operations involving Iterators or ListIterators are not + supported
    • +
    • Remove(Object) becomes RemoveValue to distinguish it from + Remove(short index)
    • +
    • subList is not supported
    • +
    +
    +
    + + + create an shortList of default size + + + + + create a copy of an existing shortList + + the existing shortList + + + + create an shortList with a predefined Initial size + + the size for the internal array + + + + add the specfied value at the specified index + + the index where the new value is to be Added + the new value + + + + Appends the specified element to the end of this list + + element to be Appended to this list. + return true (as per the general contract of the Collection.add method). + + + + Appends all of the elements in the specified collection to the + end of this list, in the order that they are returned by the + specified collection's iterator. The behavior of this + operation is unspecified if the specified collection is + modified while the operation is in progress. (Note that this + will occur if the specified collection is this list, and it's + nonempty.) + + collection whose elements are to be Added to this list. + return true if this list Changed as a result of the call. + + + + Inserts all of the elements in the specified collection into + this list at the specified position. Shifts the element + currently at that position (if any) and any subsequent elements + to the right (increases their indices). The new elements will + appear in this list in the order that they are returned by the + specified collection's iterator. The behavior of this + operation is unspecified if the specified collection is + modified while the operation is in progress. (Note that this + will occur if the specified collection is this list, and it's + nonempty.) + + index at which to insert first element from the specified collection. + elements to be inserted into this list. + return true if this list Changed as a result of the call. + if the index is out of range (index < 0 || index > size()) + + + + Removes all of the elements from this list. This list will be + empty After this call returns (unless it throws an exception). + + + + + Returns true if this list Contains the specified element. More + formally, returns true if and only if this list Contains at + least one element e such that o == e + + element whose presence in this list is to be Tested. + return true if this list Contains the specified element. + + + + Returns true if this list Contains all of the elements of the specified collection. + + collection to be Checked for Containment in this list. + return true if this list Contains all of the elements of the specified collection. + + + + Compares the specified object with this list for Equality. + Returns true if and only if the specified object is also a + list, both lists have the same size, and all corresponding + pairs of elements in the two lists are Equal. (Two elements e1 + and e2 are equal if e1 == e2.) In other words, two lists are + defined to be equal if they contain the same elements in the + same order. This defInition ensures that the Equals method + works properly across different implementations of the List + interface. + + the object to be Compared for Equality with this list. + return true if the specified object is equal to this list. + + + + Returns the element at the specified position in this list. + + index of element to return. + return the element at the specified position in this list. + + + + Returns the hash code value for this list. The hash code of a + list is defined to be the result of the following calculation: + + + hashCode = 1; + Iterator i = list.Iterator(); + while (i.HasNext()) { + Object obj = i.Next(); + hashCode = 31*hashCode + (obj==null ? 0 : obj.HashCode()); + } + + + This ensures that list1.Equals(list2) implies that + list1.HashCode()==list2.HashCode() for any two lists, list1 and + list2, as required by the general contract of Object.HashCode. + + return the hash code value for this list. + + + + Returns the index in this list of the first occurrence of the + specified element, or -1 if this list does not contain this + element. More formally, returns the lowest index i such that + (o == Get(i)), or -1 if there is no such index. + + element to search for. + the index in this list of the first occurrence of the + specified element, or -1 if this list does not contain + this element. + + + + + Returns true if this list Contains no elements. + + return true if this list Contains no elements. + + + + Returns the index in this list of the last occurrence of the + specified element, or -1 if this list does not contain this + element. More formally, returns the highest index i such that + (o == Get(i)), or -1 if there is no such index. + + element to search for. + return the index in this list of the last occurrence of the + specified element, or -1 if this list does not contain this element. + + + + Removes the element at the specified position in this list. + Shifts any subsequent elements to the left (subtracts one from + their indices). Returns the element that was Removed from the + list. + + the index of the element to Removed. + return the element previously at the specified position. + + + + Removes the first occurrence in this list of the specified + element (optional operation). If this list does not contain + the element, it is unChanged. More formally, Removes the + element with the lowest index i such that (o.Equals(get(i))) + (if such an element exists). + + element to be Removed from this list, if present. + return true if this list Contained the specified element. + + + + Removes from this list all the elements that are Contained in the specified collection + + collection that defines which elements will be removed from this list. + return true if this list Changed as a result of the call. + + + + Retains only the elements in this list that are Contained in + the specified collection. In other words, Removes from this + list all the elements that are not Contained in the specified + collection. + + collection that defines which elements this Set will retain. + return true if this list Changed as a result of the call. + + + + Replaces the element at the specified position in this list with the specified element + + index of element to Replace. + element to be stored at the specified position. + return the element previously at the specified position. + + + + Returns the number of elements in this list. If this list + Contains more than Int32.MaxValue elements, returns + Int32.MaxValue. + + return the number of elements in this shortList + + + + the number of elements in this shortList + + + + + Returns an array Containing all of the elements in this list in + proper sequence. Obeys the general contract of the + Collection.ToArray method. + + an array Containing all of the elements in this list in + proper sequence. + + + + Returns an array Containing all of the elements in this list in + proper sequence. Obeys the general contract of the + Collection.ToArray(Object[]) method. + + the array into which the elements of this list are to + be stored, if it is big enough; otherwise, a new array + is allocated for this purpose. + return an array Containing the elements of this list. + + + + Title: String Utility Description: Collection of string handling utilities + @author Andrew C. Oliver + @author Sergei Kozello (sergeikozello at mail.ru) + @author Toshiaki Kamoshida (kamoshida.toshiaki at future dot co dot jp) + @since May 10, 2002 + @version 1.0 + + + + Constructor for the StringUtil object + + + + Given a byte array of 16-bit unicode characters in Little Endian + Format (most important byte last), return a Java String representation + of it. + { 0x16, 0x00 } -0x16 + + the byte array to be converted + the initial offset into the + byte array. it is assumed that string[ offset ] and string[ offset + 1 ] contain the first 16-bit unicode character + the Length of the string + the converted string + + + + Given a byte array of 16-bit unicode characters in little endian + Format (most important byte last), return a Java String representation + of it. + { 0x16, 0x00 } -0x16 + + the byte array to be converted + the converted string + + + Convert String to 16-bit unicode characters in little endian format + + @param string the string + @return the byte array of 16-bit unicode characters + + + + Given a byte array of 16-bit unicode characters in big endian + Format (most important byte first), return a Java String representation + of it. + { 0x00, 0x16 } -0x16 + + the byte array to be converted + the initial offset into the + byte array. it is assumed that string[ offset ] and string[ offset + 1 ] contain the first 16-bit unicode character + the Length of the string + the converted string + + + + Given a byte array of 16-bit unicode characters in big endian + Format (most important byte first), return a Java String representation + of it. + { 0x00, 0x16 } -0x16 + + the byte array to be converted + the converted string + + + + Read 8 bit data (in IsO-8859-1 codepage) into a (unicode) Java + String and return. + (In Excel terms, read compressed 8 bit unicode as a string) + + byte array to read + offset to read byte array + Length to read byte array + generated String instance by reading byte array + + + + Takes a unicode (java) string, and returns it as 8 bit data (in IsO-8859-1 + codepage). + (In Excel terms, write compressed 8 bit unicode) + + the String containing the data to be written + the byte array to which the data Is to be written + an offset into the byte arrat at which the data Is start when written + + + + Takes a unicode string, and returns it as little endian (most + important byte last) bytes in the supplied byte array. + (In Excel terms, write uncompressed unicode) + + the String containing the unicode data to be written + the byte array to hold the uncompressed unicode, should be twice the Length of the String + the offset to start writing into the byte array + + + + Takes a unicode string, and returns it as big endian (most + important byte first) bytes in the supplied byte array. + (In Excel terms, write uncompressed unicode) + + the String containing the unicode data to be written + the byte array to hold the uncompressed unicode, should be twice the Length of the String. + the offset to start writing into the byte array + + + + Gets the preferred encoding. + + the encoding we want to use, currently hardcoded to IsO-8859-1 + + + + check the parameter Has multibyte character + + string to check + + true if Has at least one multibyte character; otherwise, false. + + + + InputStream in is expected to contain: +
      +
    1. ushort nChars
    2. +
    3. byte is16BitFlag
    4. +
    5. byte[]/char[] characterData
    6. +
    + For this encoding, the is16BitFlag is always present even if nChars==0. +
    + + InputStream in is expected to contain: +
      +
    1. byte is16BitFlag
    2. +
    3. byte[]/char[] characterData
    4. +
    + For this encoding, the is16BitFlag is always present even if nChars==0. +
    + This method should be used when the nChars field is not stored + as a ushort immediately before the is16BitFlag. Otherwise, {@link + #readUnicodeString(LittleEndianInput)} can be used. +
    + + OutputStream out will get: +
      +
    1. ushort nChars
    2. +
    3. byte is16BitFlag
    4. +
    5. byte[]/char[] characterData
    6. +
    + For this encoding, the is16BitFlag is always present even if nChars==0. +
    + + OutputStream out will get: +
      +
    1. byte is16BitFlag
    2. +
    3. byte[]/char[] characterData
    4. +
    + For this encoding, the is16BitFlag is always present even if nChars==0. +
    + This method should be used when the nChars field is not stored + as a ushort immediately before the is16BitFlag. Otherwise, {@link + #writeUnicodeString(LittleEndianOutput, String)} can be used. +
    + + + Gets the number of bytes that would be written by WriteUnicodeString(LittleEndianOutput, String) + + The value. + + + + + Checks to see if a given String needs to be represented as Unicode + + The value. + + true if string needs Unicode to be represented.; otherwise, false. + + Tony Qu change the logic + + + + Encodes non-US-ASCII characters in a string, good for encoding file names for download + http://www.acriticsreview.com/List.aspx?listid=42 + + + + + + + Encodes a non-US-ASCII character. + + + + + + + Encodes a non-US-ASCII character. + + + + + + + Encodes a non-US-ASCII character. + + + + + + + Encodes a non-US-ASCII character. + + + + + + + Determines if the character needs to be encoded. + http://www.acriticsreview.com/List.aspx?listid=42 + + + + + + Some strings may contain encoded characters of the unicode private use area. + Currently the characters of the symbol fonts are mapped to the corresponding + characters in the normal unicode range. + + @param string the original string + @return the string with mapped characters + + @see Private Use Area (symbol) + @see Symbol font - Unicode alternatives for Greek and special characters in HTML + + + The minimum value of a + + Unicode high-surrogate code unit + in the UTF-16 encoding, constant {@code '\u005CuD800'}. + A high-surrogate is also known as a leading-surrogate. + + @since 1.5 + + + The maximum value of a + + Unicode high-surrogate code unit + in the UTF-16 encoding, constant {@code '\u005CuDBFF'}. + A high-surrogate is also known as a leading-surrogate. + + @since 1.5 + + + The minimum value of a + + Unicode low-surrogate code unit + in the UTF-16 encoding, constant {@code '\u005CuDC00'}. + A low-surrogate is also known as a trailing-surrogate. + + @since 1.5 + + + The maximum value of a + + Unicode low-surrogate code unit + in the UTF-16 encoding, constant {@code '\u005CuDFFF'}. + A low-surrogate is also known as a trailing-surrogate. + + @since 1.5 + + + Converts the specified surrogate pair to its supplementary code + point value. This method does not validate the specified + surrogate pair. The caller must validate it using {@link + #isSurrogatePair(char, char) isSurrogatePair} if necessary. + + @param high the high-surrogate code unit + @param low the low-surrogate code unit + @return the supplementary code point composed from the + specified surrogate pair. + @since 1.5 + + + Determines the number of {@code char} values needed to + represent the specified character (Unicode code point). If the + specified character is equal to or greater than 0x10000, then + the method returns 2. Otherwise, the method returns 1. + + This method doesn't validate the specified character to be a + valid Unicode code point. The caller must validate the + character value using {@link #isValidCodePoint(int) isValidCodePoint} + if necessary. + + @param codePoint the character (Unicode code point) to be tested. + @return 2 if the character is a valid supplementary character; 1 otherwise. + @see Character#isSupplementaryCodePoint(int) + @since 1.5 + + + + A logger class that strives to make it as easy as possible for + developers to write log calls, while simultaneously making those + calls as cheap as possible by performing lazy Evaluation of the log + message. + + + @author Marc Johnson (mjohnson at apache dot org) + @author Glen Stampoultzis (glens at apache.org) + @author Nicola Ken Barozzi (nicolaken at apache.org) + + + + + Log a message + + One of DEBUG, INFO, WARN, ERROR, FATAL + The object to log. + + + + Log a message + + One of DEBUG, INFO, WARN, ERROR, FATAL + The object to log. This is Converted to a string. + An exception to be logged + + + + Check if a logger is enabled to log at the specified level + + One of DEBUG, INFO, WARN, ERROR, FATAL + + + + Creates a temporary file. Files are collected into one directory and by default are + deleted on exit from the VM. Files can be kept by defining the system property + poi.keep.tmp.files. + + Dont forget to close all files or it might not be possible to delete them. + + + + + + + + + construct the with its offset into its containing byte array + + The offset. + + + + construct the LongField with its offset into its containing + byte array and initialize its value + + offset of the field within its byte array + the initial value + + + + Construct the class with its offset into its containing + byte array and initialize its value from its byte array + + The offset of the field within its byte array + the byte array to read the value from + + + + construct the class with its offset into its containing + byte array, initialize its value, and write the value to a byte + array + + offset of the field within its byte array + the initial value + the byte array to write the value to + + + + Getg or sets the LongField's current value + + The current value + + + + set the LongField's current value and write it to a byte array + + value to be set + the byte array to write the value to + + + + set the value from its offset into an array of bytes + + the byte array from which the value is to be read + + + + set the value from an Stream + + the Stream from which the value is to be + + + + write the value out to an array of bytes at the appropriate offset + + the array of bytes to which the value is to be written + + + + Returns a that represents the current . + + + A that represents the current . + + + + @author Yegor Kozlov + + + In Escher absolute distances are specified in + English Metric Units (EMUs), occasionally referred to as A units; + there are 360000 EMUs per centimeter, 914400 EMUs per inch, 12700 EMUs per point. + + + Master DPI (576 pixels per inch). + Used by the reference coordinate system in PowerPoint (HSLF) + + + Pixels DPI (96 pixels per inch) + + + Points DPI (72 pixels per inch) + + + + Converts points to EMUs + + + EMUs + + + Converts pixels to EMUs + @param pixels pixels + @return EMUs + + + Converts a value of type FixedPoint to a decimal number + + @param fixedPoint + @return decimal number + + @see [MS-OSHARED] - 2.2.1.6 FixedPoint + + + Converts a value of type floating point to a FixedPoint + + @param floatPoint + @return fixedPoint + + @see [MS-OSHARED] - 2.2.1.6 FixedPoint + + + Internal helper class for CellNumberFormatter + + + Internal helper class for CellNumberFormatter + + This class represents a single modification to a result string. The way + this works is complicated, but so is numeric formatting. In general, for + most formats, we use a DecimalFormat object that will Put the string out + in a known format, usually with all possible leading and trailing zeros. + We then walk through the result and the original format, and note any + modifications that need to be made. Finally, we go through and apply + them all, dealing with overlapping modifications. + + + Formats a date value. + + @author Ken Arnold, Industrious Media LLC + + + Creates a new date formatter with the given specification. + + @param format The format. + + + {@inheritDoc} + + + {@inheritDoc} +

    + For a date, this is "mm/d/y". + + + This class : printing out an elapsed time format. + + @author Ken Arnold, Industrious Media LLC + + + Creates a elapsed time formatter. + + @param pattern The pattern to Parse. + + + {@inheritDoc} + + + {@inheritDoc} +

    + For a date, this is "mm/d/y". + + + + Format a value as it would be were no format specified. This is also + used when the format specified is General. + + + Maps a format string to its Parsed version for efficiencies sake. + + + Returns a {@link CellFormat} that applies the given format. Two calls + with the same format may or may not return the same object. + + @param format The format. + + @return A {@link CellFormat} that applies the given format. + + + Creates a new object. + + @param format The format. + + + Returns the result of Applying the format to the given value. If the + value is a number (a type of {@link Number} object), the correct number + format type is chosen; otherwise it is considered a text object. + + @param value The value + + @return The result, in a {@link CellFormatResult}. + + + Returns the result of applying the format to the given date. + + @param date The date. + @param numericValue The numeric value for the date. + + @return The result, in a {@link CellFormatResult}. + + + Fetches the appropriate value from the cell, and returns the result of + Applying it to the appropriate format. For formula cells, the computed + value is what is used. + + @param c The cell. + + @return The result, in a {@link CellFormatResult}. + + + Returns the {@link CellFormatPart} that applies to the value. Result + depends on how many parts the cell format has, the cell value and any + conditions. The value must be a {@link Number}. + + @param value The value. + @return The {@link CellFormatPart} that applies to the value. + + + Returns the ultimate cell type, following the results of formulas. If + the cell is a {@link Cell#CELL_TYPE_FORMULA}, this returns the result of + {@link Cell#getCachedFormulaResultType()}. Otherwise this returns the + result of {@link Cell#getCellType()}. + + @param cell The cell. + + @return The ultimate type of this cell. + + + Returns true if the other object is a {@link CellFormat} object + with the same format. + + @param obj The other object. + + @return true if the two objects are Equal. + + + Returns a hash code for the format. + + @return A hash code for the format. + + + This object represents a condition in a cell format. + + @author Ken Arnold, Industrious Media LLC + + + Returns an instance of a condition object. + + @param opString The operator as a string. One of "<", + "<=", ">", ">=", + "=", "==", "!=", or + "<>". + @param constStr The constant (such as "12"). + + @return A condition object for the given condition. + + + Returns true if the given value passes the constraint's test. + + @param value The value to compare against. + + @return true if the given value passes the constraint's test. + + + Objects of this class represent a single part of a cell format expression. + Each cell can have up to four of these for positive, zero, negative, and text + values. +

    + Each format part can contain a color, a condition, and will always contain a + format specification. For example "[Red][>=10]#" has a color + ([Red]), a condition (>=10) and a format specification + (#). +

    + This class also Contains patterns for matching the subparts of format + specification. These are used internally, but are made public in case other + code has use for them. + + @author Ken Arnold, Industrious Media LLC + + + Pattern for the color part of a cell format part. + + + Pattern for the condition part of a cell format part. + + + Pattern for the format specification part of a cell format part. + + + Pattern for the currency symbol part of a cell format part + + + Pattern for an entire cell single part. + + + Within {@link #FORMAT_PAT}, the group number for the matched color. + + + Within {@link #FORMAT_PAT}, the group number for the operator in the + condition. + + + Within {@link #FORMAT_PAT}, the group number for the value in the + condition. + + + Within {@link #FORMAT_PAT}, the group number for the format + specification. + + + Create an object to represent a format part. + + @param desc The string to Parse. + + + Returns true if this format part applies to the given value. If + the value is a number and this is part has a condition, returns + true only if the number passes the condition. Otherwise, this + allways return true. + + @param valueObject The value to Evaluate. + + @return true if this format part applies to the given value. + + + Returns the number of the first group that is the same as the marker + string. Starts from group 1. + + @param pat The pattern to use. + @param str The string to match against the pattern. + @param marker The marker value to find the group of. + + @return The matching group number. + + @throws ArgumentException No group matches the marker. + + + Returns the color specification from the matcher, or null if + there is none. + + @param m The matcher for the format part. + + @return The color specification or null. + + + Returns the condition specification from the matcher, or null if + there is none. + + @param m The matcher for the format part. + + @return The condition specification or null. + + + Returns the CellFormatType object implied by the format specification for + the format part. + + @param matcher The matcher for the format part. + + @return The CellFormatType. + + + Returns the formatter object implied by the format specification for the + format part. + + @param matcher The matcher for the format part. + + @return The formatter. + + + Returns the type of format. + + @param fdesc The format specification + + @return The type of format. + + + Returns a version of the original string that has any special characters + quoted (or escaped) as appropriate for the cell format type. The format + type object is queried to see what is special. + + @param repl The original string. + @param type The format type representation object. + + @return A version of the string with any special characters Replaced. + + @see CellFormatType#isSpecial(char) + + + Apply this format part to the given value. This returns a {@link + CellFormatResult} object with the results. + + @param value The value to apply this format part to. + + @return A {@link CellFormatResult} object Containing the results of + Applying the format to the value. + + + Returns the CellFormatType object implied by the format specification for + the format part. + + @return The CellFormatType. + + + Returns true if this format part has a condition. + + @return true if this format part has a condition. + + + Expands a character. This is only partly done, because we don't have the + correct info. In Excel, this would be expanded to fill the rest of the + cell, but we don't know, in general, what the "rest of the cell" is1. + + @param part The character to be repeated is the second character in this + string. + + @return The character repeated three times. + + + Returns the string from the group, or "" if the group is + null. + + @param m The matcher. + @param g The group number. + + @return The group or "". + + + This object Contains the result of Applying a cell format or cell format part + to a value. + + @author Ken Arnold, Industrious Media LLC + @see CellFormatPart#Apply(Object) + @see CellFormat#Apply(Object) + + + This is true if no condition was given that applied to the + value, or if the condition is satisfied. If a condition is relevant, and + when applied the value fails the test, this is false. + + + The resulting text. This will never be null. + + + The color the format Sets, or null if the format Sets no color. + This will always be null if {@link #applies} is false. + + + Creates a new format result object. + + @param applies The value for {@link #applies}. + @param text The value for {@link #text}. + @param textColor The value for {@link #textColor}. + + + This is the abstract supertype for the various cell formatters. + + @author Ken Arnold, Industrious Media LLC + + + The original specified format. + + + This is the locale used to Get a consistent format result from which to + work. + + + Creates a new formatter object, storing the format in {@link #format}. + + @param format The format. + + + Format a value according the format string. + + @param toAppendTo The buffer to append to. + @param value The value to format. + + + Format a value according to the type, in the most basic way. + + @param toAppendTo The buffer to append to. + @param value The value to format. + + + Formats the value, returning the resulting string. + + @param value The value to format. + + @return The value, formatted. + + + Formats the value in the most basic way, returning the resulting string. + + @param value The value to format. + + @return The value, formatted. + + + Returns the input string, surrounded by quotes. + + @param str The string to quote. + + @return The input string, surrounded by quotes. + + + The different kinds of formats that the formatter understands. + + @author Ken Arnold, Industrious Media LLC + + + The general (default) format; also used for "General". + + + A numeric format. + + + A date format. + + + An elapsed time format. + + + A text format. + + + Returns true if the format is special and needs to be quoted. + + @param ch The character to test. + + @return true if the format is special and needs to be quoted. + + + Returns a new formatter of the appropriate type, for the given pattern. + The pattern must be appropriate for the type. + + @param pattern The pattern to use. + + @return A new formatter of the appropriate type, for the given pattern. + + + A formatter for the default "General" cell format. + + @author Ken Arnold, Industrious Media LLC + + + Creates a new general formatter. + + + The general style is not quite the same as any other, or any combination + of others. + + @param toAppendTo The buffer to append to. + @param value The value to format. + + + Equivalent to {@link #formatValue(StringBuilder,Object)}. {@inheritDoc}. + + + This class : printing out a value using a number format. + + @author Ken Arnold, Industrious Media LLC + + +

    + The CellNumberFormatter.simpleValue() method uses the SIMPLE_NUMBER + CellFormatter defined here. The CellFormat.GENERAL_FORMAT CellFormat + no longer uses the SIMPLE_NUMBER CellFormatter. + Note that the simpleValue()/SIMPLE_NUMBER CellFormatter format + ("#" for integer values, and "#.#" for floating-point values) is + different from the 'General' format for numbers ("#" for integer + values and "#.#########" for floating-point values). + +
    + + This class is used to mark where the special characters in the format + are, as opposed to the other characters that are simply printed. + + + Creates a new cell number formatter. + + @param format The format to Parse. + + + {@inheritDoc} + + + {@inheritDoc} +

    + For a number, this is "#" for integer values, and "#.#" + for floating-point values. + + + This class : printing out text. + + @author Ken Arnold, Industrious Media LLC + + + {@inheritDoc} + + + {@inheritDoc} +

    + For text, this is just printing the text. + + + The denominator. + + + The numerator. + + + Create a fraction given a double value and a denominator. + + @param val double value of fraction + @param exactDenom the exact denominator + @return a SimpleFraction with the given values set. + + + Create a fraction given the double value and either the maximum error + allowed or the maximum number of denominator digits. + + @param value the double value to convert to a fraction. + @param maxDenominator maximum denominator value allowed. + + @throws RuntimeException if the continued fraction failed to + converge. + @throws IllegalArgumentException if value > Integer.MAX_VALUE + + + Create a fraction given the double value and either the maximum error + allowed or the maximum number of denominator digits. +

    + References: +

    +

    + + Based on org.apache.commons.math.fraction.Fraction from Apache Commons-Math. + YK: The only reason of having this class is to avoid dependency on the Commons-Math jar. + + @param value the double value to convert to a fraction. + @param epsilon maximum error allowed. The resulting fraction is within + epsilon of value, in absolute terms. + @param maxDenominator maximum denominator value allowed. + @param maxIterations maximum number of convergents + @throws RuntimeException if the continued fraction failed to + converge. + @throws IllegalArgumentException if value > Integer.MAX_VALUE +
    + + Create a fraction given a numerator and denominator. + @param numerator + @param denominator maxDenominator The maximum allowed value for denominator + + + Access the denominator. + @return the denominator. + + + Access the numerator. + @return the numerator. + + + Evaluator for formula arguments. + + @author jfaenomoto@gmail.com + + + Evaluate a generic {@link ValueEval} argument to a double value that represents a date in POI. + + @param arg {@link ValueEval} an argument. + @param srcCellRow number cell row. + @param srcCellCol number cell column. + @return a double representing a date in POI. + @throws EvaluationException exception upon argument evaluation. + + + Evaluate a generic {@link ValueEval} argument to an array of double values that represents dates in POI. + + @param arg {@link ValueEval} an argument. + @param srcCellRow number cell row. + @param srcCellCol number cell column. + @return an array of doubles representing dates in POI. + @throws EvaluationException exception upon argument evaluation. + + + Evaluate a generic {@link ValueEval} argument to a double value. + + @param arg {@link ValueEval} an argument. + @param srcCellRow number cell row. + @param srcCellCol number cell column. + @return a double value. + @throws EvaluationException exception upon argument evaluation. + + + Parser for java dates. + + @author jfaenomoto@gmail.com + + + Parses a date from a string. + + @param strVal a string with a date pattern. + @return a date parsed from argument. + @throws EvaluationException exception upon parsing. + + + @param month 1-based + + + Implementation for the function MAXIFS +

    + Syntax: MAXIFS(data_range, criteria_range1, criteria1, [criteria_range2, criteria2]) +

    +
    + + Implementation for the function MINIFS +

    + Syntax: MINIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2]) +

    +
    + + Implementation of Excel 'Analysis ToolPak' function NETWORKDAYS()
    + Returns the number of workdays given a starting and an ending date, considering an interval of holidays. A workday is any non + saturday/sunday date. +

    + Syntax
    + NETWORKDAYS(startDate, endDate, holidays) +

    + + @author jfaenomoto@gmail.com + + + Constructor. + + @param anEvaluator an injected {@link ArgumentsEvaluator}. + + + Evaluate for NETWORKDAYS. Given two dates and a optional date or interval of holidays, determines how many working days are there + between those dates. + + @return {@link ValueEval} for the number of days between two dates. + + + A calculator for workdays, considering dates as excel representations. + + @author jfaenomoto@gmail.com + + + Constructor. + + + Calculate how many workdays are there between a start and an end date, as excel representations, considering a range of holidays. + + @param start start date. + @param end end date. + @param holidays an array of holidays. + @return number of workdays between start and end dates, including both dates. + + + Calculate the workday past x workdays from a starting date, considering a range of holidays. + + @param start start date. + @param workdays number of workdays to be past from starting date. + @param holidays an array of holidays. + @return date past x workdays. + + + Calculates how many days of week past between a start and an end date. + + @param start start date. + @param end end date. + @param dayOfWeek a day of week as represented by {@link Calendar} constants. + @return how many days of week past in this interval. + + + Calculates how many holidays in a list are workdays, considering an interval of dates. + + @param start start date. + @param end end date. + @param holidays an array of holidays. + @return number of holidays that occur in workdays, between start and end dates. + + + @param aDate a given date. + @return true if date is weekend, false otherwise. + + + @param aDate a given date. + @param holidays an array of holidays. + @return true if date is a holiday, false otherwise. + + + @param aDate a given date. + @param holidays an array of holidays. + @return 1 is not a workday, 0 otherwise. + + + @param start start date. + @param end end date. + @param aDate a date to be analyzed. + @return true if aDate is between start and end dates, false otherwise. + + + Implementation of Excel 'Analysis ToolPak' function WORKDAY()
    + Returns the date past a number of workdays beginning at a start date, considering an interval of holidays. A workday is any non + saturday/sunday date. +

    + Syntax
    + WORKDAY(startDate, days, holidays) +

    + + @author jfaenomoto@gmail.com + + + Evaluate for WORKDAY. Given a date, a number of days and a optional date or interval of holidays, determines which date it is past + number of parametrized workdays. + + @return {@link ValueEval} with date as its value. + + + Returns a collection of ATP function names implemented by POI. + + @return an array of supported functions + @since 3.8 beta6 + + + Returns a collection of ATP function names NOT implemented by POI. + + @return an array of not supported functions + @since 3.8 beta6 + + + Register a ATP function in runtime. + + @param name the function name + @param func the functoin to register + @throws ArgumentException if the function is unknown or already registered. + @since 3.8 beta6 + + + Implementation of Excel 'Analysis ToolPak' function MROUND()
    + + Returns a number rounded to the desired multiple.

    + + Syntax
    + MROUND(number, multiple) + +

    + + @author Yegor Kozlov + + + Implementation of Excel 'Analysis ToolPak' function ISEVEN() ISODD()
    + + @author Josh Micich +
    + + * Implementation of Excel 'Analysis ToolPak' function RANDBETWEEN()
    + * + * Returns a random integer number between the numbers you specify.

    + * + * Syntax
    + * RANDBETWEEN(bottom, top)

    + * + * bottom is the smallest integer RANDBETWEEN will return.
    + * top is the largest integer RANDBETWEEN will return.
    + + * @author Brendan Nolan + + + Evaluate for RANDBETWEEN(). Must be given two arguments. Bottom must be greater than top. + Bottom is rounded up and top value is rounded down. After rounding top has to be set greater + than top. + + @see org.apache.poi.ss.formula.functions.FreeRefFunction#evaluate(org.apache.poi.ss.formula.eval.ValueEval[], org.apache.poi.ss.formula.OperationEvaluationContext) + + + Implementation of Excel 'Analysis ToolPak' function YEARFRAC()
    + + Returns the fraction of the year spanned by two dates.

    + + Syntax
    + YEARFRAC(startDate, endDate, basis)

    + + The basis optionally specifies the behaviour of YEARFRAC as follows: + + + + + + + + +
    ValueDays per MonthDays per Year
    0 (default)30360
    1actualactual
    2actual360
    3actual365
    430360
    + + + +

    + Internal calculation methods for Excel 'Analysis ToolPak' function YEARFRAC() + Algorithm inspired by www.dwheeler.com/yearfrac + @author Josh Micich + + + Date Count convention + http://en.wikipedia.org/wiki/Day_count_convention + + + Office Online Help on YEARFRAC + http://office.microsoft.com/en-us/excel/HP052093441033.aspx + +
    + + use UTC time-zone to avoid daylight savings issues + + + the length of normal long months i.e. 31 + + + the length of normal short months i.e. 30 + + + + Calculates YEARFRAC() + + The start date. + The end date. + The basis value. + + + + + Basis 0, 30/360 date convention + + The start date value assumed to be less than or equal to endDateVal. + The end date value assumed to be greater than or equal to startDateVal. + + + + + Basis 1, Actual/Actual date convention + + The start date value assumed to be less than or equal to endDateVal. + The end date value assumed to be greater than or equal to startDateVal. + + + + + Basis 2, Actual/360 date convention + + The start date value assumed to be less than or equal to endDateVal. + The end date value assumed to be greater than or equal to startDateVal. + + + + + Basis 3, Actual/365 date convention + + The start date value assumed to be less than or equal to endDateVal. + The end date value assumed to be greater than or equal to startDateVal. + + + + + Basis 4, European 30/360 date convention + + The start date value assumed to be less than or equal to endDateVal. + The end date value assumed to be greater than or equal to startDateVal. + + + + + Calculates the adjusted. + + The start date. + The end date. + The date1day. + The date2day. + + + + + Determines whether [is last day of month] [the specified date]. + + The date. + + true if [is last day of month] [the specified date]; otherwise, false. + + + + + Gets the last day of month. + + The date. + + + + + Assumes dates are no more than 1 year apart. + + The start. + The end. + true + if dates both within a leap year, or span a period including Feb 29 + + + + return the whole number of days between the two time-stamps. Both time-stamps are + assumed to represent 12:00 midnight on the respective day. + + The start date ticks. + The end date ticks. + + + + + Averages the length of the year. + + The start year. + The end year. + + + + + determine Leap Year + + the year + + + + + Determines whether [is greater than one year] [the specified start]. + + The start date. + The end date. + + true if [is greater than one year] [the specified start]; otherwise, false. + + + + + Creates the date. + + The day count. + + + + + Simple Date Wrapper + + + + 1-based month + + + day of month + + + milliseconds since 1970 + + + Common functionality across file formats for Evaluating formula cells.

    + + + Coordinates several formula Evaluators together so that formulas that involve external + references can be Evaluated. + @param workbookNames the simple file names used to identify the workbooks in formulas + with external links (for example "MyData.xls" as used in a formula "[MyData.xls]Sheet1!A1") + @param Evaluators all Evaluators for the full Set of workbooks required by the formulas. + + + Should be called whenever there are major Changes (e.g. moving sheets) to input cells + in the Evaluated workbook. If performance is not critical, a single call to this method + may be used instead of many specific calls to the Notify~ methods. + + Failure to call this method After changing cell values will cause incorrect behaviour + of the Evaluate~ methods of this class + + + If cell Contains a formula, the formula is Evaluated and returned, + else the CellValue simply copies the appropriate cell value from + the cell and also its cell type. This method should be preferred over + EvaluateInCell() when the call should not modify the contents of the + original cell. + + @param cell may be null signifying that the cell is not present (or blank) + @return null if the supplied cell is null or blank + + + If cell Contains formula, it Evaluates the formula, and + Puts the formula result back into the cell, in place + of the old formula. + Else if cell does not contain formula, this method leaves + the cell unChanged. + Note that the same instance of HSSFCell is returned to + allow chained calls like: +

    +            int EvaluatedCellType = Evaluator.EvaluateInCell(cell).CellType;
    +            
    + Be aware that your cell value will be Changed to hold the + result of the formula. If you simply want the formula + value computed for you, use {@link #EvaluateFormulaCellEnum(Cell)}} + @param cell + @return the {@code cell} that was passed in, allowing for chained calls +
    + + If cell Contains formula, it Evaluates the formula, and saves the result of the formula. The + cell remains as a formula cell. If the cell does not contain formula, this method returns -1 + and leaves the cell unChanged. + + Note that the type of the formula result is returned, so you know what kind of + cached formula result is also stored with the formula. +
    +             int EvaluatedCellType = Evaluator.EvaluateFormulaCell(cell);
    +             
    + Be aware that your cell will hold both the formula, and the result. If you want the cell + Replaced with the result of the formula, use {@link #EvaluateInCell(NPOI.SS.UserModel.Cell)} + @param cell The cell to Evaluate + @return -1 for non-formula cells, or the type of the formula result +
    + + If cell Contains formula, it Evaluates the formula, + and saves the result of the formula. The cell + remains as a formula cell. + Else if cell does not contain formula, this method leaves + the cell unChanged. + Note that the type of the formula result is returned, + so you know what kind of value is also stored with + the formula. +
    +            ICellType EvaluatedCellType = Evaluator.EvaluateFormulaCellEnum(cell);
    +            
    + Be aware that your cell will hold both the formula, + and the result. If you want the cell Replaced with + the result of the formula, use {@link #Evaluate(NPOI.SS.UserModel.Cell)} } + @param cell The cell to Evaluate + @return The type of the formula result (the cell's type remains as CellType.FORMULA however) + If cell is not a formula cell, returns {@link CellType#_NONE} rather than throwing an exception. + @since POI 3.15 beta 3 +
    + + Loops over all cells in all sheets of the supplied + workbook. + For cells that contain formulas, their formulas are + Evaluated, and the results are saved. These cells + remain as formula cells. + For cells that do not contain formulas, no Changes + are made. + This is a helpful wrapper around looping over all + cells, and calling EvaluateFormulaCell on each one. + + + {@inheritDoc} + + + {@inheritDoc} + + + An exception thrown by implementors of {@link FormulaEvaluator} when + attempting to evaluate a formula which requires a function that POI + does not (yet) support. + + + Represents a cell being used for forked Evaluation that has had a value Set different from the + corresponding cell in the shared master workbook. + + @author Josh Micich + + + corresponding cell from master workbook + + + Represents a sheet being used for forked Evaluation. Initially, objects of this class contain + only the cells from the master workbook. By calling {@link #getOrCreateUpdatableCell(int, int)}, + the master cell object is logically Replaced with a {@link ForkedEvaluationCell} instance, which + will be used in all subsequent Evaluations. + + @author Josh Micich + + + Only cells which have been split are Put in this map. (This has been done to conserve memory). + + + Represents a workbook being used for forked Evaluation. Most operations are delegated to the + shared master workbook, except those that potentially involve cell values that may have been + updated After a call to {@link #getOrCreateUpdatableCell(String, int, int)}. + + + An alternative workbook Evaluator that saves memory in situations where a single workbook is + concurrently and independently Evaluated many times. With standard formula Evaluation, around + 90% of memory consumption is due to loading of the {@link HSSFWorkbook} or {@link NPOI.xssf.usermodel.XSSFWorkbook}. + This class enables a 'master workbook' to be loaded just once and shared between many Evaluation + clients. Each Evaluation client Creates its own {@link ForkedEvaluator} and can Set cell values + that will be used for local Evaluations (and don't disturb Evaluations on other Evaluators). + + @author Josh Micich + + + @param udfFinder pass null for default (AnalysisToolPak only) + + + Sets the specified cell to the supplied value + @param sheetName the name of the sheet Containing the cell + @param rowIndex zero based + @param columnIndex zero based + + + Copies the values of all updated cells (modified by calls to {@link + #updateCell(String, int, int, ValueEval)}) to the supplied workbook.
    + Typically, the supplied workbook is a writable copy of the 'master workbook', + but at the very least it must contain sheets with the same names. +
    + + If cell Contains a formula, the formula is Evaluated and returned, + else the CellValue simply copies the appropriate cell value from + the cell and also its cell type. This method should be preferred over + EvaluateInCell() when the call should not modify the contents of the + original cell. + + @param sheetName the name of the sheet Containing the cell + @param rowIndex zero based + @param columnIndex zero based + @return null if the supplied cell is null or blank + + + Coordinates several formula Evaluators together so that formulas that involve external + references can be Evaluated. + @param workbookNames the simple file names used to identify the workbooks in formulas + with external links (for example "MyData.xls" as used in a formula "[MyData.xls]Sheet1!A1") + @param Evaluators all Evaluators for the full Set of workbooks required by the formulas. + + + Evaluation of 2D (Row+Column) and 3D (Sheet+Row+Column) areas + + + returns the 0-based index of the first row in + this area. + + + returns the 0-based index of the last row in + this area. + + + returns the 0-based index of the first col in + this area. + + + returns the 0-based index of the last col in + this area. + + + returns true if the cell at row and col specified + as absolute indexes in the sheet is contained in + this area. + @param row + @param col + + + returns true if the specified col is in range + @param col + + + returns true if the specified row is in range + @param row + + + @return the ValueEval from within this area at the specified row and col index. Never + null (possibly {@link BlankEval}). The specified indexes should be absolute + indexes in the sheet and not relative indexes within the area. + + + @return the ValueEval from within this area at the specified relativeRowIndex and + relativeColumnIndex. Never null (possibly {@link BlankEval}). The + specified indexes should relative to the top left corner of this area. + + + Creates an {@link AreaEval} offset by a relative amount from from the upper left cell + of this area + + + @author Josh Micich + + + @return whether cell at rowIndex and columnIndex is a subtotal. + By default return false which means 'don't care about subtotals' + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > This class is a + marker class. It is a special value for empty cells. + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Convenience method for the following:
    + (b ? BoolEval.TRUE : BoolEval.FALSE) + @return a BoolEval instance representing b. +
    + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + #NULL! - Intersection of two cell ranges is empty + + + #DIV/0! - Division by zero + + + #VALUE! - Wrong type of operand + + + #REF! - Illegal or deleted cell reference + + + #NAME? - Wrong function or range name + + + #NUM! - Value range overflow + + + #N/A - Argument or function not available + + + Translates an Excel internal error code into the corresponding POI ErrorEval instance + @param errorCode + + + Converts error codes to text. Handles non-standard error codes OK. + For debug/test purposes (and for formatting error messages). + @return the String representation of the specified Excel error code. + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + This class is used to simplify error handling logic within operator and function + implementations. Note - OperationEval.Evaluate() and Function.Evaluate() + method signatures do not throw this exception so it cannot propagate outside.

    + + Here is an example coded without EvaluationException, to show how it can help: +

    +             public Eval Evaluate(Eval[] args, int srcRow, short srcCol) {
    +            	// ...
    +            	Eval arg0 = args[0];
    +            	if(arg0 is ErrorEval) {
    +            		return arg0;
    +            	}
    +            	if(!(arg0 is AreaEval)) {
    +            		return ErrorEval.VALUE_INVALID;
    +            	}
    +            	double temp = 0;
    +            	AreaEval area = (AreaEval)arg0;
    +            	ValueEval[] values = area.LittleEndianConstants.BYTE_SIZE;
    +            	for (int i = 0; i < values.Length; i++) {
    +            		ValueEval ve = values[i];
    +            		if(ve is ErrorEval) {
    +            			return ve;
    +            		}
    +            		if(!(ve is NumericValueEval)) {
    +            			return ErrorEval.VALUE_INVALID;
    +            		}
    +            		temp += ((NumericValueEval)ve).NumberValue;
    +            	}
    +            	// ...
    +             }	 
    +             
    + In this example, if any error is encountered while Processing the arguments, an error is + returned immediately. This code is difficult to refactor due to all the points where errors + are returned.
    + Using EvaluationException allows the error returning code to be consolidated to one + place.

    +

    +             public Eval Evaluate(Eval[] args, int srcRow, short srcCol) {
    +            	try {
    +            		// ...
    +            		AreaEval area = GetAreaArg(args[0]);
    +            		double temp = sumValues(area.LittleEndianConstants.BYTE_SIZE);
    +            		// ...
    +            	} catch (EvaluationException e) {
    +            		return e.GetErrorEval();
    +            	}
    +            }
    +            
    +            private static AreaEval GetAreaArg(Eval arg0){
    +            	if (arg0 is ErrorEval) {
    +            		throw new EvaluationException((ErrorEval) arg0);
    +            	}
    +            	if (arg0 is AreaEval) {
    +            		return (AreaEval) arg0;
    +            	}
    +            	throw EvaluationException.InvalidValue();
    +            }
    +            
    +            private double sumValues(ValueEval[] values){
    +            	double temp = 0;
    +            	for (int i = 0; i < values.Length; i++) {
    +            		ValueEval ve = values[i];
    +            		if (ve is ErrorEval) {
    +            			throw new EvaluationException((ErrorEval) ve);
    +            		}
    +            		if (!(ve is NumericValueEval)) {
    +            			throw EvaluationException.InvalidValue();
    +            		}
    +            		temp += ((NumericValueEval) ve).NumberValue;
    +            	}
    +            	return temp;
    +            }
    +             
    + It is not mandatory to use EvaluationException, doing so might give the following advantages:
    + - Methods can more easily be extracted, allowing for re-use.
    + - Type management (typecasting etc) is simpler because error conditions have been Separated from + intermediate calculation values.
    + - Fewer local variables are required. Local variables can have stronger types.
    + - It is easier to mimic common Excel error handling behaviour (exit upon encountering first + error), because exceptions conveniently propagate up the call stack regardless of execution + points or the number of levels of nested calls.

    + + Note - Only standard evaluation errors are represented by EvaluationException ( + i.e. conditions expected to be encountered when evaluating arbitrary Excel formulas). Conditions + that could never occur in an Excel spReadsheet should result in runtime exceptions. Care should + be taken to not translate any POI internal error into an Excel evaluation error code. + + @author Josh Micich + + + #VALUE! - Wrong type of operand + + + #REF! - Illegal or deleted cell reference + + + #NUM! - Value range overflow + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Some function IDs that require special treatment + + + 1 + + + 78 + + + 100 + + + 148 + + + 255 + + + @see https://www.openoffice.org/sc/excelfileformat.pdf + + + Register a new function in runtime. + + @param name the function name + @param func the functoin to register + @throws ArgumentException if the function is unknown or already registered. + @since 3.8 beta6 + + + Returns a collection of function names implemented by POI. + + @return an array of supported functions + @since 3.8 beta6 + + + Returns an array of function names NOT implemented by POI. + + @return an array of not supported functions + @since 3.8 beta6 + + + @author Josh Micich + + + @return simple rectangular {@link AreaEval} which represents the intersection of areas + aeA and aeB. If the two areas do not intersect, the result is null. + + + @author Josh Micich + + + Creates a NameEval representing a function name + + + Evaluation of a Name defined in a Sheet or Workbook scope + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Provides functionality for evaluating arguments to functions and operators. + + @author Josh Micich + + + Retrieves a single value from a variety of different argument types according to standard + Excel rules. Does not perform any type conversion. + @param arg the Evaluated argument as passed to the function or operator. + @param srcCellRow used when arg is a single column AreaRef + @param srcCellCol used when arg is a single row AreaRef + @return a NumberEval, StringEval, BoolEval or BlankEval. + Never null or ErrorEval. + @throws EvaluationException(#VALUE!) if srcCellRow or srcCellCol do not properly index into + an AreaEval. If the actual value retrieved is an ErrorEval, a corresponding + EvaluationException is thrown. + + + Implements (some perhaps not well known) Excel functionality to select a single cell from an + area depending on the coordinates of the calling cell. Here is an example demonstrating + both selection from a single row area and a single column area in the same formula. + + + + + + + +
    A B C D
    1152025
    2 200
    3 300
    3 400
    + + If the formula "=1000+A1:B1+D2:D3" is put into the 9 cells from A2 to C4, the spReadsheet + will look like this: + + + + + + + +
    A B C D
    1152025
    212151220#VALUE!200
    313151320#VALUE!300
    4#VALUE!#VALUE!#VALUE!400
    + + Note that the row area (A1:B1) does not include column C and the column area (D2:D3) does + not include row 4, so the values in C1(=25) and D4(=400) are not accessible to the formula + as written, but in the 4 cells A2:B3, the row and column selection works ok.

    + + The same concept is extended to references across sheets, such that even multi-row, + multi-column areas can be useful.

    + + Of course with carefully (or carelessly) chosen parameters, cyclic references can occur and + hence this method can throw a 'circular reference' EvaluationException. Note that + this method does not attempt to detect cycles. Every cell in the specified Area ae + has already been Evaluated prior to this method call. Any cell (or cells) part of + ae that would incur a cyclic reference error if selected by this method, will + already have the value ErrorEval.CIRCULAR_REF_ERROR upon entry to this method. It + is assumed logic exists elsewhere to produce this behaviour. + + @return whatever the selected cell's Evaluated value Is. Never null. Never + ErrorEval. + @if there is a problem with indexing into the area, or if the + Evaluated cell has an error. + + + @return possibly ErrorEval, and null + + + Applies some conversion rules if the supplied value is not already an integer.
    + Value is first Coerced to a double ( See CoerceValueTodouble() ).

    + + Excel typically Converts doubles to integers by truncating toward negative infinity.
    + The equivalent java code Is:
    + return (int)Math.floor(d);
    + not:
    + return (int)d; // wrong - rounds toward zero + + + + Applies some conversion rules if the supplied value is not already a number. + Note - BlankEval is not supported and must be handled by the caller. + @param ev must be a NumberEval, StringEval or BoolEval + @return actual, Parsed or interpreted double value (respectively). + @throws EvaluationException(#VALUE!) only if a StringEval is supplied and cannot be Parsed + as a double (See Parsedouble() for allowable formats). + @throws Exception if the supplied parameter is not NumberEval, + StringEval or BoolEval + + + Converts a string to a double using standard rules that Excel would use.
    + Tolerates currency prefixes, commas, leading and trailing spaces.

    + + Some examples:
    + " 123 " -> 123.0
    + ".123" -> 0.123
    + These not supported yet:
    + " $ 1,000.00 " -> 1000.0
    + "$1.25E4" -> 12500.0
    + "5**2" -> 500
    + "250%" -> 2.5
    + + @param text + @return null if the specified text cannot be Parsed as a number + + + @param ve must be a NumberEval, StringEval, BoolEval, or BlankEval + @return the Converted string value. never null + + + @return null to represent blank values + @throws EvaluationException if ve is an ErrorEval, or if a string value cannot be converted + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation of Excel formula token '%'.

    + @author Josh Micich + + + + @author Josh Micich + + + @author Amol S Deshmukh < amolweb at ya hoo dot com > + + RefEval is the base interface for Ref2D and Ref3DEval. Basically a RefEval + impl should contain reference to the original ReferencePtg or Ref3DPtg as + well as the "value" resulting from the evaluation of the cell + reference. Thus if the HSSFCell has type CELL_TYPE_NUMERIC, the contained + value object should be of type NumberEval; if cell type is CELL_TYPE_STRING, + contained value object should be of type StringEval + + + The (possibly Evaluated) ValueEval contained + in this RefEval. eg. if cell A1 Contains "test" + then in a formula referring to cell A1 + the RefEval representing + A1 will return as the InnerValueEval the + object of concrete type StringEval + + + returns the zero based column index. + + + returns the zero based row index. + + + returns the number of sheets this applies to + + + Creates an {@link AreaEval} offset by a relative amount from this RefEval + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo Dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @return never null, possibly empty string. + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + This is a documentation of the observed behaviour of + the '+' operator in Excel: + + - 1+TRUE = 2 + - 1+FALSE = 1 + - 1+"true" = #VALUE! + - 1+"1" = 2 + - 1+A1 = #VALUE if A1 Contains "1" + - 1+A1 = 2 if A1 Contains ="1" + - 1+A1 = 2 if A1 Contains TRUE or =TRUE + - 1+A1 = #VALUE! if A1 Contains "TRUE" or ="TRUE" + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation for the Excel function AverageIfs
    +

    + Syntax :
    + AverageIfs ( average_range, criteria_range1, criteria1, + [criteria_range2, criteria2], ...)
    +

      +
    • average_range Required. One or more cells to get the average, including numbers or names, ranges, + or cell references that contain numbers. Blank and text values are ignored.
    • +
    • criteria1_range Required. The first range in which + to evaluate the associated criteria.
    • +
    • criteria1 Required. The criteria in the form of a number, expression, + cell reference, or text that define which cells in the criteria_range1 + argument will be counted
    • +
    • criteria_range2, criteria2, ... Optional. Additional ranges and their associated criteria. + Up to 127 range/criteria pairs are allowed.
    • +
    +

    + + @author Yegor Kozlov +
    + + Verify that each criteriaRanges argument contains the same number of rows and columns + as the avgRange argument + + @throws EvaluationException if + + + + @param ranges criteria ranges, each range must be of the same dimensions as aeAvg + @param predicates array of predicates, a predicate for each value in ranges + @param aeAvg the range to calculate + + @return the computed value + + +

    Some utils for Converting from and to any base

    + + @author cedric dot walter @ gmail dot com +
    + + Implementation for Excel Bin2Dec() function.

    +

    + Syntax:
    Bin2Dec (number)
    +

    + Converts a binary number to decimal. +

    + Number is the binary number you want to convert. Number cannot contain more than 10 characters (10 bits). + The most significant bit of number is the sign bit. The remaining 9 bits are magnitude bits. + Negative numbers are represented using two's-complement notation. +

    + Remark + If number is not a valid binary number, or if number contains more than 10 characters (10 bits), + BIN2DEC returns the #NUM! error value. + + @author cedric dot walter @ gmail dot com + + + Implementation for Excel CODE () function.

    +

    + Syntax:
    CODE (text )
    +

    + Returns a numeric code for the first character in a text string. The returned code corresponds to the character set used by your computer. +

    + text The text for which you want the code of the first character. + + @author cedric dot walter @ gmail dot com + + + Implementation for Excel COMPLEX () function.

    +

    + Syntax:
    COMPLEX (real_num,i_num,suffix )
    +

    + Converts real and imaginary coefficients into a complex number of the form x + yi or x + yj. +

    +

    + All complex number functions accept "i" and "j" for suffix, but neither "I" nor "J". + Using uppercase results in the #VALUE! error value. All functions that accept two + or more complex numbers require that all suffixes match. +

    + real_num The real coefficient of the complex number. + If this argument is nonnumeric, this function returns the #VALUE! error value. +

    +

    + i_num The imaginary coefficient of the complex number. + If this argument is nonnumeric, this function returns the #VALUE! error value. +

    +

    + suffix The suffix for the imaginary component of the complex number. +

      +
    • If omitted, suffix is assumed to be "i".
    • +
    • If suffix is neither "i" nor "j", COMPLEX returns the #VALUE! error value.
    • +
    + + @author cedric dot walter @ gmail dot com +
    + + Implementation for the function COUNTIFS +

    + Syntax: COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]) +

    +
    + + Implementation for Excel Bin2Dec() function.

    +

    + Syntax:
    Bin2Dec (number,[places] )
    +

    + Converts a decimal number to binary. +

    + The DEC2BIN function syntax has the following arguments: +

      +
    • Number Required. The decimal integer you want to Convert. If number is negative, valid place values are ignored and DEC2BIN returns a 10-character (10-bit) binary number in which the most significant bit is the sign bit. The remaining 9 bits are magnitude bits. Negative numbers are represented using two's-complement notation.
    • +
    • Places Optional. The number of characters to use. If places is omitted, DEC2BIN uses the minimum number of characters necessary. Places is useful for pAdding the return value with leading 0s (zeros).
    • +
    +

    + Remarks +

      +
    • If number < -512 or if number > 511, DEC2BIN returns the #NUM! error value.
    • +
    • If number is nonnumeric, DEC2BIN returns the #VALUE! error value.
    • +
    • If DEC2BIN requires more than places characters, it returns the #NUM! error value.
    • +
    • If places is not an integer, it is tRuncated.
    • +
    • If places is nonnumeric, DEC2BIN returns the #VALUE! error value.
    • +
    • If places is zero or negative, DEC2BIN returns the #NUM! error value.
    • +
    + + @author cedric dot walter @ gmail dot com +
    + + Implementation for Excel DELTA() function.

    +

    + Syntax:
    DEC2HEX (number,places )
    +

    + Converts a decimal number to hexadecimal. + + The decimal integer you want to Convert. If number is negative, places is ignored + and this function returns a 10-character (40-bit) hexadecimal number in which the + most significant bit is the sign bit. The remaining 39 bits are magnitude bits. + Negative numbers are represented using two's-complement notation. + +

      +
    • If number < -549,755,813,888 or if number > 549,755,813,887, this function returns the #NUM! error value.
    • +
    • If number is nonnumeric, this function returns the #VALUE! error value.
    • +
    + +

    places

    + + The number of characters to use. The places argument is useful for pAdding the + return value with leading 0s (zeros). + +
      +
    • If this argument is omitted, this function uses the minimum number of characters necessary.
    • +
    • If this function requires more than places characters, it returns the #NUM! error value.
    • +
    • If this argument is nonnumeric, this function returns the #VALUE! error value.
    • +
    • If this argument is negative, this function returns the #NUM! error value.
    • +
    • If this argument Contains a decimal value, this function ignores the numbers to the right side of the decimal point.
    • +
    + + @author cedric dot walter @ gmail dot com +
    + + Implementation for Excel DELTA() function.

    +

    + Syntax:
    DELTA (number1,number2 )
    +

    + Tests whether two values are Equal. Returns 1 if number1 = number2; returns 0 otherwise. + Use this function to filter a Set of values. For example, by summing several DELTA functions + you calculate the count of equal pairs. This function is also known as the Kronecker Delta function. + +

      +
    • If number1 is nonnumeric, DELTA returns the #VALUE! error value.
    • +
    • If number2 is nonnumeric, DELTA returns the #VALUE! error value.
    • +
    + + @author cedric dot walter @ gmail dot com +
    + + Implementation of the DGet function: + Finds the value of a column in an area with given conditions. + + TODO: + - wildcards ? and * in string conditions + - functions as conditions + + + Implementation of the DMin function: + Finds the minimum value of a column in an area with given conditions. + + TODO: + - wildcards ? and * in string conditions + - functions as conditions + + + This class performs a D* calculation. It takes an {@link IDStarAlgorithm} object and + uses it for calculating the result value. Iterating a database and Checking the + entries against the Set of conditions is done here. + + + + + @param nameValueEval Must not be a RefEval or AreaEval. Thus make sure resolveReference() is called on the value first! + @param db + @return + @throws EvaluationException + + + For a given database returns the column number for a column heading. + + @param db Database. + @param name Column heading. + @return Corresponding column number. + @If it's not possible to turn all headings into strings. + + + Checks a row in a database against a condition database. + + @param db Database. + @param row The row in the database to Check. + @param cdb The condition database to use for Checking. + @return Whether the row matches the conditions. + @If references could not be Resolved or comparison + operators and operands didn't match. + + + Test a value against a simple (< > <= >= = starts-with) condition string. + + @param value The value to Check. + @param condition The condition to check for. + @return Whether the condition holds. + @If comparison operator and operands don't match. + + + Test whether a value matches a numeric condition. + @param valueEval Value to Check. + @param op Comparator to use. + @param condition Value to check against. + @return whether the condition holds. + @If it's impossible to turn the condition into a number. + + + Resolve a ValueEval that's in an AreaEval. + + @param db AreaEval from which the cell to resolve is retrieved. + @param dbRow Relative row in the AreaEval. + @param dbCol Relative column in the AreaEval. + @return A ValueEval that is a NumberEval, StringEval, BoolEval, BlankEval or ErrorEval. + + + Implementation for the Excel EOMONTH() function.

    +

    + EOMONTH() returns the date of the last day of a month..

    +

    + Syntax:
    + EOMONTH(start_date,months)

    +

    + start_date is the starting date of the calculation + months is the number of months to be Added to start_date, + to give a new date. For this new date, EOMONTH returns the date of + the last day of the month. months may be positive (in the future), + zero or negative (in the past). + + + Implementation for the ERROR.TYPE() Excel function. +

    + Syntax:
    + ERROR.TYPE(errorValue)

    +

    + Returns a number corresponding to the error type of the supplied argument.

    +

    + + + + + + + + + + +
    errorValueReturn Value
    #NULL!1
    #DIV/0!2
    #VALUE!3
    #REF!4
    #NAME?5
    #NUM!6
    #N/A!7
    everything else#N/A!
    + + Note - the results of ERROR.TYPE() are different to the constants defined in + ErrorConstants. +

    + + @author Josh Micich +
    + + Implementation for Excel FACTDOUBLE() function.

    +

    + Syntax:
    FACTDOUBLE (number)
    +

    + Returns the double factorial of a number. +

    + Number is the value for which to return the double factorial. If number is not an integer, it is truncated. +

    + Remarks +

      +
    • If number is nonnumeric, FACTDOUBLE returns the #VALUE! error value.
    • +
    • If number is negative, FACTDOUBLE returns the #NUM! error value.
    • +
    + Use a cache for more speed of previously calculated factorial + + @author cedric dot walter @ gmail dot com +
    + + Implementation of the financial functions pmt, fv, ppmt, ipmt. + + @author Mike Argyriou micharg@gmail.com + + + Emulates Excel/Calc's PMT(interest_rate, number_payments, PV, FV, Type) + function, which calculates the payments for a loan or the future value of an investment + + @param r + - periodic interest rate represented as a decimal. + @param nper + - number of total payments / periods. + @param pv + - present value -- borrowed or invested principal. + @param fv + - future value of loan or annuity. + @param type + - when payment is made: beginning of period is 1; end, 0. + @return double representing periodic payment amount. + + + Overloaded pmt() call omitting type, which defaults to 0. + + @see #pmt(double, int, double, double, int) + + + Overloaded pmt() call omitting fv and type, which both default to 0. + + @see #pmt(double, int, double, double, int) + + + Emulates Excel/Calc's IPMT(interest_rate, period, number_payments, PV, + FV, Type) function, which calculates the portion of the payment at a + given period that is the interest on previous balance. + + @param r + - periodic interest rate represented as a decimal. + @param per + - period (payment number) to check value at. + @param nper + - number of total payments / periods. + @param pv + - present value -- borrowed or invested principal. + @param fv + - future value of loan or annuity. + @param type + - when payment is made: beginning of period is 1; end, 0. + @return double representing interest portion of payment. + + @see #pmt(double, int, double, double, int) + @see #fv(double, int, double, double, int) + + + Emulates Excel/Calc's PPMT(interest_rate, period, number_payments, PV, + FV, Type) function, which calculates the portion of the payment at a + given period that will apply to principal. + + @param r + - periodic interest rate represented as a decimal. + @param per + - period (payment number) to check value at. + @param nper + - number of total payments / periods. + @param pv + - present value -- borrowed or invested principal. + @param fv + - future value of loan or annuity. + @param type + - when payment is made: beginning of period is 1; end, 0. + @return double representing principal portion of payment. + + @see #pmt(double, int, double, double, int) + @see #ipmt(double, int, int, double, double, bool) + + + Emulates Excel/Calc's FV(interest_rate, number_payments, payment, PV, + Type) function, which calculates future value or principal at period N. + + @param r + - periodic interest rate represented as a decimal. + @param nper + - number of total payments / periods. + @param pmt + - periodic payment amount. + @param pv + - present value -- borrowed or invested principal. + @param type + - when payment is made: beginning of period is 1; end, 0. + @return double representing future principal value. + + + Overloaded fv() call omitting type, which defaults to 0. + + @see #fv(double, int, double, double, int) + + + Implementation for Excel HEX2DEC() function.

    +

    + Syntax:
    HEX2DEC (number)
    +

    + Converts a hexadecimal number to decimal. +

    + Number is the hexadecimal number you want to Convert. Number cannot contain more than 10 characters (40 bits). + The most significant bit of number is the sign bit. + The remaining 39 bits are magnitude bits. Negative numbers are represented using two's-complement notation. + Remark + If number is not a valid hexadecimal number, HEX2DEC returns the #NUM! error value. + + @author cedric dot walter @ gmail dot com + + + Implementation of Excel HYPERLINK function.

    + + In Excel this function has special behaviour - it causes the displayed cell value to behave like + a hyperlink in the GUI. From an evaluation perspective however, it is very simple.

    + + Syntax:
    + HYPERLINK(link_location, friendly_name)

    + + link_location The URL of the hyperlink
    + friendly_name (optional) the value to display

    + + Returns last argument. Leaves type unchanged (does not convert to {@link org.apache.poi.ss.formula.eval.StringEval}). + + @author Wayne Clingingsmith + + + Interface specifying how an algorithm to be used by {@link DStarRunner} should look like. + Each implementing class should correspond to one of the D* functions. + + + Process a match that is found during a run through a database. + @param eval ValueEval of the cell in the matching row. References will already be Resolved. + @return Whether we should continue iterating through the database. + + + Return a result ValueEval that will be the result of the calculation. + This is always called at the end of a run through the database. + @return a ValueEval + + + Implementation for Excel IMAGINARY() function.

    +

    + Syntax:
    IMAGINARY (Inumber)
    +

    + Returns the imaginary coefficient of a complex number in x + yi or x + yj text format. +

    + Inumber is a complex number for which you want the imaginary coefficient. +

    + Remarks +

      +
    • Use COMPLEX to convert real and imaginary coefficients into a complex number.
    • +
    + + @author cedric dot walter @ gmail dot com +
    + + Implementation for Excel ImReal() function.

    +

    + Syntax:
    ImReal (Inumber)
    +

    + Returns the real coefficient of a complex number in x + yi or x + yj text format. +

    + Inumber A complex number for which you want the real coefficient. +

    + Remarks +

      +
    • If inumber is not in the form x + yi or x + yj, this function returns the #NUM! error value.
    • +
    • Use COMPLEX to convert real and imaginary coefficients into a complex number.
    • +
    + + @author cedric dot walter @ gmail dot com +
    + + Implementation of Excel function INTERCEPT()

    + + Calculates the INTERCEPT of the linear regression line that is used to predict y values from x values
    + (http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html) + Syntax:
    + INTERCEPT(arrayX, arrayY)

    + + + @author Johan Karlsteen + + + Base class for linear regression functions. + + Calculates the linear regression line that is used to predict y values from x values
    + (http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html) + Syntax:
    + INTERCEPT(arrayX, arrayY)

    + or + SLOPE(arrayX, arrayY)

    + + + @author Johan Karlsteen + + + Calculates Modified internal rate of return. Syntax is MIRR(cash_flow_values, finance_rate, reinvest_rate) + +

    Returns the modified internal rate of return for a series of periodic cash flows. MIRR considers both the cost + of the investment and the interest received on reinvestment of cash.

    + + Values is an array or a reference to cells that contain numbers. These numbers represent a series of payments (negative values) and income (positive values) occurring at regular periods. +
      +
    • Values must contain at least one positive value and one negative value to calculate the modified internal rate of return. Otherwise, MIRR returns the #DIV/0! error value.
    • +
    • If an array or reference argument Contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included.
    • +
    + + Finance_rate is the interest rate you pay on the money used in the cash flows. + Reinvest_rate is the interest rate you receive on the cash flows as you reinvest them. + + @author Carlos Delgado (carlos dot del dot est at gmail dot com) + @author Cédric Walter (cedric dot walter at gmail dot com) + + @see Wikipedia on MIRR + @see Excel MIRR + @see {@link Irr} +
    + +

    Implementation for Excel Oct2Dec() function.

    +

    + Converts an octal number to decimal. +

    +

    + Syntax:
    Oct2Dec (number ) +

    +

    + Number is the octal number you want to Convert. Number may not contain more than 10 octal characters (30 bits). + The most significant bit of number is the sign bit. The remaining 29 bits are magnitude bits. + Negative numbers are represented using two's-complement notation.. +

    + If number is not a valid octal number, OCT2DEC returns the #NUM! error value. + + @author cedric dot walter @ gmail dot com + + + Compute the interest portion of a payment. + + @author Mike Argyriou micharg@gmail.com + + +

    Implementation for Excel QUOTIENT () function.

    +

    + Syntax:
    QUOTIENT(Numerator,Denominator)
    +

    +

    + Numerator is the dividend. + Denominator is the divisor. + + Returns the integer portion of a division. Use this function when you want to discard the remainder of a division. +

    + + If either enumerator/denominator is non numeric, QUOTIENT returns the #VALUE! error value. + If denominator is Equals to zero, QUOTIENT returns the #DIV/0! error value. + + @author cedric dot walter @ gmail dot com +
    + + * Returns the rank of a number in a list of numbers. The rank of a number is its size relative to other values in a list. + + * Syntax: + * RANK(number,ref,order) + * Number is the number whose rank you want to find. + * Ref is an array of, or a reference to, a list of numbers. Nonnumeric values in ref are ignored. + * Order is a number specifying how to rank number. + + * If order is 0 (zero) or omitted, Microsoft Excel ranks number as if ref were a list sorted in descending order. + * If order is any nonzero value, Microsoft Excel ranks number as if ref were a list sorted in ascending order. + * + * @author Rubin Wang + + + Implements the Excel Rate function + + + Excel does not support infinities and NaNs, rather, it gives a #NUM! error in these cases + + @throws EvaluationException (#NUM!) if result is NaN or Infinity + + + Implementation for Excel REPT () function.

    +

    + Syntax:
    REPT (text,number_times )
    +

    + Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string. + + text : text The text that you want to repeat. + number_times: A positive number specifying the number of times to repeat text. + + If number_times is 0 (zero), REPT returns "" (empty text). + If this argument contains a decimal value, this function ignores the numbers to the right side of the decimal point. + + The result of the REPT function cannot be longer than 32,767 characters, or REPT returns #VALUE!. + + @author cedric dot walter @ gmail dot com + + + Implementation for Excel WeekNum() function.

    +

    + Syntax:
    WeekNum (Serial_num,Return_type)
    +

    + Returns a number that indicates where the week falls numerically within a year. +

    +

    + Serial_num is a date within the week. Dates should be entered by using the DATE function, + or as results of other formulas or functions. For example, use DATE(2008,5,23) + for the 23rd day of May, 2008. Problems can occur if dates are entered as text. + Return_type is a number that determines on which day the week begins. The default is 1. + 1 Week begins on Sunday. Weekdays are numbered 1 through 7. + 2 Week begins on Monday. Weekdays are numbered 1 through 7. + + @author cedric dot walter @ gmail dot com + + + Classic conversion. + + @param number + @return + + + Use conversion rule to factor some parts and make them more concise + + @param result + @param form + @return + + + Implementation of Excel function SLOPE()

    + + Calculates the SLOPE of the linear regression line that is used to predict y values from x values
    + (http://introcs.cs.princeton.edu/java/97data/LinearRegression.java.html) + Syntax:
    + SLOPE(arrayX, arrayY)

    + + + @author Johan Karlsteen + + + Implementation for the Excel function SUMIF

    + + Syntax :
    + AVERAGEIF ( range, criteria, avg_range )
    + + + + +
    rangeThe range over which criteria is applied. Also used for included values when the third parameter is not present
    criteriaThe value or expression used to filter rows from range
    avg_rangeLocates the top-left corner of the corresponding range of addends - values to be included (after being selected by the criteria)

    +

    + @author Josh Micich +
    + + Implementation for the Excel function SUMIFS
    +

    + Syntax :
    + SUMIFS ( sum_range, criteria_range1, criteria1, + [criteria_range2, criteria2], ...)
    +

      +
    • sum_range Required. One or more cells to sum, including numbers or names, ranges, + or cell references that contain numbers. Blank and text values are ignored.
    • +
    • criteria1_range Required. The first range in which + to evaluate the associated criteria.
    • +
    • criteria1 Required. The criteria in the form of a number, expression, + cell reference, or text that define which cells in the criteria_range1 + argument will be added
    • +
    • criteria_range2, criteria2, ... Optional. Additional ranges and their associated criteria. + Up to 127 range/criteria pairs are allowed.
    • +
    +

    + + @author Yegor Kozlov +
    + + Verify that each criteria predicate is valid, i.e. not an error + + @throws EvaluationException if there are criteria which resulted in Errors. + + + Verify that each criteriaRanges argument contains the same number of rows and columns + as the sumRange argument + + @throws EvaluationException if + + + + @param ranges criteria ranges, each range must be of the same dimensions as aeSum + @param predicates array of predicates, a predicate for each value in ranges + @param aeSum the range to sum + + @return the computed value + + + Reads the numeric values from the row/col of the specified area - other values return the indicated missing value. + + + + Implementation of the PROPER function: + Normalizes all words (separated by non-word characters) by + making the first letter upper and the rest lower case. + + + + Implementation for the Excel function WEEKDAY + + @author Thies Wellpott + + + * Perform WEEKDAY(date, returnOption) function. + * Note: Parameter texts are from German EXCEL-2010 help. + * Parameters in args[]: + * args[0] serialDate + * EXCEL-date value + * Standardmaessig ist der 1. Januar 1900 die fortlaufende Zahl 1 und + * der 1. Januar 2008 die fortlaufende Zahl 39.448, da dieser Tag nach 39.448 Tagen + * auf den 01.01.1900 folgt. + * @return Option (optional) + * Bestimmt den Rueckgabewert: + 1 oder nicht angegeben Zahl 1 (Sonntag) bis 7 (Samstag). Verhaelt sich wie fruehere Microsoft Excel-Versionen. + 2 Zahl 1 (Montag) bis 7 (Sonntag). + 3 Zahl 0 (Montag) bis 6 (Sonntag). + 11 Die Zahlen 1 (Montag) bis 7 (Sonntag) + 12 Die Zahlen 1 (Dienstag) bis 7 (Montag) + 13 Die Zahlen 1 (Mittwoch) bis 7 (Dienstag) + 14 Die Zahlen 1 (Donnerstag) bis 7 (Mittwoch) + 15 Die Zahlen 1 (Freitag) bis 7 (Donnerstag) + 16 Die Zahlen 1 (Samstag) bis 7 (Freitag) + 17 Die Zahlen 1 (Sonntag) bis 7 (Samstag) + + + Implementation for Excel WeekNum() function.

    +

    + Syntax:
    WeekNum (Serial_num,Return_type)
    +

    + Returns a number that indicates where the week falls numerically within a year. +

    +

    + Serial_num is a date within the week. Dates should be entered by using the DATE function, + or as results of other formulas or functions. For example, use DATE(2008,5,23) + for the 23rd day of May, 2008. Problems can occur if dates are entered as text. + Return_type is a number that determines on which day the week begins. The default is 1. + 1 Week begins on Sunday. Weekdays are numbered 1 through 7. + 2 Week begins on Monday. Weekdays are numbered 1 through 7. + + @author cedric dot walter @ gmail dot com + + + Implementation of Excel 'Analysis ToolPak' function EDATE()
    + + Adds a specified number of months to the specified date.

    + + Syntax
    + EDATE(date, number) + +

    + + @author Tomas Herceg + + + contribute by Pavel Egorov + https://github.com/xoposhiy/npoi/commit/27b34a2389030c7115a666ace65daafda40d61af + Implementation of Excel ISERR() function.

    + + Syntax:
    + ISERR(value)

    + + value The value to be tested

    + + Returns the logical value TRUE if value refers to any error value except + '#N/A'; otherwise, it returns FALSE. + + + Creates a text reference as text, given specified row and column numbers. + + @author Aniket Banerjee (banerjee@google.com) + + + ignore nested subtotals. + + + Returns the k-th percentile of values in a range. You can use this function to establish a threshold of + acceptance. For example, you can decide to examine candidates who score above the 90th percentile. + + PERCENTILE(array,k) + Array is the array or range of data that defines relative standing. + K is the percentile value in the range 0..1, inclusive. + + Remarks +

      +
    • if array is empty or Contains more than 8,191 data points, PERCENTILE returns the #NUM! error value.
    • +
    • If k is nonnumeric, PERCENTILE returns the #VALUE! error value.
    • +
    • If k is < 0 or if k > 1, PERCENTILE returns the #NUM! error value.
    • +
    • If k is not a multiple of 1/(n - 1), PERCENTILE interpolates to determine the value at the k-th percentile.
    • +
    +
    + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Here are the general rules concerning Boolean functions: +
      +
    1. Blanks are ignored (not either true or false)
    2. +
    3. Strings are ignored if part of an area ref or cell ref, otherwise they must be 'true' or 'false'
    4. +
    5. Numbers: 0 is false. Any other number is TRUE
    6. +
    7. Areas: *all* cells in area are evaluated according to the above rules
    8. +
    + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > +
    + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation of Excel functions Date parsing functions: + Date - DAY, MONTH and YEAR + Time - HOUR, MINUTE and SECOND + + @author Others (not mentioned in code) + @author Thies Wellpott + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Josh Micich + + + Implementation for Excel COLUMNS function. + + @author Josh Micich + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Counts the number of cells that contain numeric data within + the list of arguments. + + Excel Syntax + COUNT(value1,value2,...) + Value1, value2, ... are 1 to 30 arguments representing the values or ranges to be Counted. + + TODO: Check this properly Matches excel on edge cases + like formula cells, error cells etc + + + Create an instance of Count to use in {@link Subtotal} +

    + If there are other subtotals within argument refs (or nested subtotals), + these nested subtotals are ignored to avoid double counting. +

    + + @see Subtotal +
    + + Counts the number of cells that contain data within the list of arguments. + + Excel Syntax + COUNTA(value1,value2,...) + Value1, value2, ... are 1 to 30 arguments representing the values or ranges to be Counted. + + @author Josh Micich + + + don't count cells that are subtotals + + + Implementation for the function COUNTBLANK +

    + Syntax: COUNTBLANK ( range ) + + +
    range is the range of cells to count blanks
    +

    + + @author Mads Mohr Christensen +
    + + Implementation for the function COUNTIF

    + + Syntax: COUNTIF ( range, criteria ) + + + +
    range is the range of cells to be Counted based on the criteria
    criteriais used to determine which cells to Count
    +

    + + @author Josh Micich + + + @return number of characters used to represent this operator + + +

    + Translates Excel countif wildcard strings into .NET regex strings + + Excel wildcard expression + return null if the specified value contains no special wildcard characters. +
    + + @return the number of evaluated cells in the range that match the specified criteria + + + + @return the de-referenced criteria arg (possibly {@link ErrorEval}) + + + When the second argument is a string, many things are possible + + + Creates a criteria predicate object for the supplied criteria arg + @return null if the arg evaluates to blank. + + + bool literals ('TRUE', 'FALSE') treated similarly but NOT same as numbers. + + + Common interface for the matching criteria. + + + Common logic for COUNT, COUNTA and COUNTIF + + @author Josh Micich + + + @return the number of evaluated cells in the range that match the specified criteria + + + @return the number of evaluated cells in the range that match the specified criteria + + + @author Pavel Krupets (pkrupets at palmtreebusiness dot com) + + + * Note - works with Java Calendar months, not Excel months + * Java Calendar month = Excel month + 1 + + +

    Calculates the number of days between two dates based on a 360-day year + (twelve 30-day months), which is used in some accounting calculations. Use + this function to help compute payments if your accounting system is based on + twelve 30-day months.

    + + {@code DAYS360(start_date,end_date,[method])} + +
      +
    • Start_date, end_date (required):
      + The two dates between which you want to know the number of days.
      + If start_date occurs after end_date, the DAYS360 function returns a negative number.
    • + +
    • Method (optional):
      + A logical value that specifies whether to use the U.S. or European method in the calculation
    • + +
    • Method set to false or omitted:
      + the DAYS360 function uses the U.S. (NASD) method. If the starting date is the 31st of a month, + it becomes equal to the 30th of the same month. If the ending date is the 31st of a month and + the starting date is earlier than the 30th of a month, the ending date becomes equal to the + 1st of the next month, otherwise the ending date becomes equal to the 30th of the same month. + The month February and leap years are handled in the following way:
      + On a non-leap year the function {@code =DAYS360("2/28/93", "3/1/93", FALSE)} returns 1 day + because the DAYS360 function ignores the extra days added to February.
      + On a leap year the function {@code =DAYS360("2/29/96","3/1/96", FALSE)} returns 1 day for + the same reason.
    • + +
    • Method Set to true:
      + When you set the method parameter to TRUE, the DAYS360 function uses the European method. + Starting dates or ending dates that occur on the 31st of a month become equal to the 30th of + the same month. The month February and leap years are handled in the following way:
      + On a non-leap year the function {@code =DAYS360("2/28/93", "3/1/93", TRUE)} returns + 3 days because the DAYS360 function is counting the extra days added to February to give + February 30 days.
      + On a leap year the function {@code =DAYS360("2/29/96", "3/1/96", TRUE)} returns + 2 days for the same reason.
    • +
    + + @see DAYS360 Function Produces Different Values Depending on the Version of Excel +
    + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + Super class for all Evals for financial function evaluation. + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + This class Is a functon library for common fiscal functions. + Glossary of terms/abbreviations: +
    +
      +
    • FV: Future Value
    • +
    • PV: Present Value
    • +
    • NPV: Net Present Value
    • +
    • PMT: (Periodic) Payment
    • + +
    + For more info on the terms/abbreviations please use the references below + (hyperlinks are subject to Change): +
    Online References: +
      +
    1. GNU Emacs Calc 2.02 Manual: http://theory.uwinnipeg.ca/gnu/calc/calc_203.html
    2. +
    3. Yahoo Financial Glossary: http://biz.yahoo.com/f/g/nn.html#y
    4. +
    5. MS Excel function reference: http://office.microsoft.com/en-us/assistance/CH062528251033.aspx
    6. +
    +

    Implementation Notes:

    + Symbols used in the formulae that follow:
    +
      +
    • p: present value
    • +
    • f: future value
    • +
    • n: number of periods
    • +
    • y: payment (in each period)
    • +
    • r: rate
    • +
    • ^: the power operator (NOT the java bitwise XOR operator!)
    • +
    + [From MS Excel function reference] Following are some of the key formulas + that are used in this implementation: +
    +            p(1+r)^n + y(1+rt)((1+r)^n-1)/r + f=0   ...{when r!=0}
    +            ny + p + f=0                            ...{when r=0}
    +            
    +
    + + Future value of an amount given the number of payments, rate, amount + of individual payment, present value and bool value indicating whether + payments are due at the beginning of period + (false => payments are due at end of period) + @param r rate + @param n num of periods + @param y pmt per period + @param p future value + @param t type (true=pmt at end of period, false=pmt at begining of period) + + + Present value of an amount given the number of future payments, rate, amount + of individual payment, future value and bool value indicating whether + payments are due at the beginning of period + (false => payments are due at end of period) + @param r + @param n + @param y + @param f + @param t + + + calculates the Net Present Value of a principal amount + given the disCount rate and a sequence of cash flows + (supplied as an array). If the amounts are income the value should + be positive, else if they are payments and not income, the + value should be negative. + @param r + @param cfs cashflow amounts + + + + @param r + @param n + @param p + @param f + @param t + + + + @param r + @param y + @param p + @param f + @param t + + + Convenience base class for functions that only take zero arguments. + + @author Josh Micich + + + Convenience base class for functions that must take exactly one argument. + + @author Josh Micich + + + Convenience base class for functions that must take exactly two arguments. + + @author Josh Micich + + + Convenience base class for functions that must take exactly three arguments. + + @author Josh Micich + + + Convenience base class for functions that must take exactly four arguments. + + @author Josh Micich + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + For most Excel functions, involving references ((cell, area), (2d, 3d)), the references are + passed in as arguments, and the exact location remains fixed. However, a select few Excel + functions have the ability to access cells that were not part of any reference passed as an + argument.
    + Two important functions with this feature are INDIRECT and OFFSet

    + + In POI, the HSSFFormulaEvaluator Evaluates every cell in each reference argument before + calling the function. This means that functions using fixed references do not need access to + the rest of the workbook to execute. Hence the Evaluate() method on the common + interface Function does not take a workbook parameter. + + This interface recognises the requirement of some functions to freely Create and Evaluate + references beyond those passed in as arguments. + + @author Josh Micich + + + @param args the pre-Evaluated arguments for this function. args is never null, + nor are any of its elements. + @param ec primarily used to identify the source cell Containing the formula being Evaluated. + may also be used to dynamically create reference evals. + @return never null. Possibly an instance of ErrorEval in the case of + a specified Excel error (Exceptions are never thrown to represent Excel errors). + + +

    + Function serves as a marker interface. + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > +
    + + + Evaluates the specified args. + + the evaluated function arguments. Empty values are represented with BlankEval or MissingArgEval + row index of the cell containing the formula under evaluation + column index of the cell containing the formula under evaluation + + + + Implemented by all functions that can be called with zero arguments + + @author Josh Micich + + + see {@link Function#Evaluate(ValueEval[], int, int)} + + + Implemented by all functions that can be called with one argument + + @author Josh Micich + + + see {@link Function#Evaluate(ValueEval[], int, int)} + + + Implemented by all functions that can be called with two arguments + + @author Josh Micich + + + see {@link Function#Evaluate(ValueEval[], int, int)} + + + Implemented by all functions that can be called with three arguments + + @author Josh Micich + + + see {@link Function#Evaluate(ValueEval[], int, int)} + + + Implemented by all functions that can be called with four arguments + + @author Josh Micich + + + see {@link Function#Evaluate(ValueEval[], int, int)} + + + Implementation of the HLOOKUP() function.

    + + HLOOKUP Finds a column in a lookup table by the first row value and returns the value from another row.
    + + Syntax:
    + HLOOKUP(lookup_value, table_array, row_index_num, range_lookup)

    + + lookup_value The value to be found in the first column of the table array.
    + table_array An area reference for the lookup data.
    + row_index_num a 1 based index specifying which row value of the lookup data will be returned.
    + range_lookup If TRUE (default), HLOOKUP Finds the largest value less than or equal to + the lookup_value. If FALSE, only exact Matches will be considered
    + + @author Josh Micich + + + Returns one column from an AreaEval + + @(#VALUE!) if colIndex Is negative, (#REF!) if colIndex Is too high + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation for the Excel function INDEX + + Syntax :
    + INDEX ( reference, row_num[, column_num [, area_num]])
    + INDEX ( array, row_num[, column_num]) + + + + + + +
    referencetypically an area reference, possibly a union of areas
    arraya literal array value (currently not supported)
    row_numselects the row within the array or area reference
    column_numselects column within the array or area reference. default Is 1
    area_numused when reference Is a union of areas
    + + @author Josh Micich +
    + + @param colArgWasPassed false if the INDEX argument lIst had just 2 items + (exactly 1 comma). If anything Is passed for the column_num argument + (including {@link BlankEval} or {@link MIssingArgEval}) this parameter will be + true. ThIs parameter is needed because error codes are slightly + different when only 2 args are passed. + + + @param arg a 1-based index. + @return the Resolved 1-based index. Zero if the arg was missing or blank + @throws EvaluationException if the arg Is an error value evaluates to a negative numeric value + + + Implementation for Excel function INDIRECT

    + + INDIRECT() returns the cell or area reference denoted by the text argument.

    + + Syntax:
    + INDIRECT(ref_text,isA1Style)

    + + ref_text a string representation of the desired reference as it would normally be written + in a cell formula.
    + isA1Style (default TRUE) specifies whether the ref_text should be interpreted as A1-style + or R1C1-style. + + + @author Josh Micich + + + @return array of length 2: {workbookName, sheetName,}. Second element will always be + present. First element may be null if sheetName is unqualified. + Returns null if text cannot be parsed. + + + @return null if there is a syntax error in any escape sequence + (the typical syntax error is a single quote character not followed by another). + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Calculates the internal rate of return. + + Syntax is IRR(values) or IRR(values,guess) + + @author Marcel May + @author Yegor Kozlov + + @see Wikipedia on IRR + @see Excel IRR + + + Computes the internal rate of return using an estimated irr of 10 percent. + + @param income the income values. + @return the irr. + + + Calculates IRR using the Newton-Raphson Method. +

    + Starting with the guess, the method cycles through the calculation until the result + is accurate within 0.00001 percent. If IRR can't find a result that works + after 20 tries, the Double.NaN is returned. +

    +

    + The implementation is inspired by the NewtonSolver from the Apache Commons-Math library, + @see http://commons.apache.org +

    + + @param values the income values. + @param guess the initial guess of irr. + @return the irr value. The method returns Double.NaN + if the maximum iteration count is exceeded + + @see + http://en.wikipedia.org/wiki/Internal_rate_of_return#Numerical_solution + @see + http://en.wikipedia.org/wiki/Newton%27s_method +
    + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @param arg any {@link ValueEval}, potentially {@link BlankEval} or {@link ErrorEval}. + + + Implementation of Excel function LOOKUP.

    + + LOOKUP Finds an index row in a lookup table by the first column value and returns the value from another column. + + Syntax:
    + VLOOKUP(lookup_value, lookup_vector, result_vector)

    + + lookup_value The value to be found in the lookup vector.
    + lookup_vector An area reference for the lookup data.
    + result_vector Single row or single column area reference from which the result value Is chosen.
    + + @author Josh Micich + + + Common functionality used by VLOOKUP, HLOOKUP, LOOKUP and MATCH + + @author Josh Micich + + + @return null if the supplied area is neither a single row nor a single colum + + + Processes the third argument to VLOOKUP, or HLOOKUP (col_index_num + or row_index_num respectively).
    + Sample behaviour: + + + + + + + + + + + + + +
    Input ReturnValue Thrown Error
    54
    2.92
    "5"4
    "2.18e1"21
    "-$2"-3*
    FALSE-1*
    TRUE0
    "TRUE" #REF!
    "abc" #REF!
    "" #REF!
    <blank> #VALUE!

    + + * Note - out of range errors (both too high and too low) are handled by the caller. + @return column or row index as a zero-based value + +
    + + The second argument (table_array) should be an area ref, but can actually be a cell ref, in + which case it Is interpreted as a 1x1 area ref. Other scalar values cause #VALUE! error. + + + Resolves the last (optional) parameter (range_lookup) to the VLOOKUP and HLOOKUP functions. + @param rangeLookupArg + @param srcCellRow + @param srcCellCol + @return + @throws EvaluationException + + + Finds first (lowest index) exact occurrence of specified value. + @param lookupComparer the value to be found in column or row vector + @param vector the values to be searched. For VLOOKUP this Is the first column of the + tableArray. For HLOOKUP this Is the first row of the tableArray. + @return zero based index into the vector, -1 if value cannot be found + + + Excel has funny behaviour when the some elements in the search vector are the wrong type. + + + + Excel seems to handle mismatched types initially by just stepping 'mid' ix forward to the + first compatible value. + @param midIx 'mid' index (value which has the wrong type) + @return usually -1, signifying that the BinarySearchIndex has been narrowed to the new mid + index. Zero or greater signifies that an exact match for the lookup value was found + + + Once the binary search has found a single match, (V/H)LOOKUP steps one by one over subsequent + values to choose the last matching item. + + + Enumeration to support 4 valued comparison results.

    + Excel lookup functions have complex behaviour in the case where the lookup array has mixed + types, and/or Is Unordered. Contrary to suggestions in some Excel documentation, there + does not appear to be a Universal ordering across types. The binary search algorithm used + Changes behaviour when the Evaluated 'mid' value has a different type to the lookup value.

    + + A simple int might have done the same job, but there Is risk in confusion with the well + known Comparable.CompareTo() and Comparator.Compare() which both use + a ubiquitous 3 value result encoding. + + + Encapsulates some standard binary search functionality so the Unusual Excel behaviour can + be clearly distinguished. + + + @return -1 if the search range Is empty + + + Represents a single row or column within an AreaEval. + + + @return one of 4 instances or CompareResult: LESS_THAN, EQUAL, + GREATER_THAN or TYPE_MISMATCH + + + used only for debug purposes + + + Implementation for the MATCH() Excel function.

    + + Syntax:
    + MATCH(lookup_value, lookup_array, match_type)

    + + Returns a 1-based index specifying at what position in the lookup_array the specified + lookup_value Is found.

    + + Specific matching behaviour can be modified with the optional match_type parameter. + + + + + + +
    ValueMatching Behaviour
    1(default) Find the largest value that Is less than or equal to lookup_value. + The lookup_array must be in ascending order*.
    0Find the first value that Is exactly equal to lookup_value. + The lookup_array can be in any order.
    -1Find the smallest value that Is greater than or equal to lookup_value. + The lookup_array must be in descending order*.
    + + * Note regarding order - For the match_type cases that require the lookup_array to + be ordered, MATCH() can produce incorrect results if this requirement Is not met. Observed + behaviour in Excel Is to return the lowest index value for which every item after that index + breaks the match rule.
    + The (ascending) sort order expected by MATCH() Is:
    + numbers (low to high), strings (A to Z), bool (FALSE to TRUE)
    + MATCH() ignores all elements in the lookup_array with a different type to the lookup_value. + Type conversion of the lookup_array elements Is never performed. + + + @author Josh Micich + + + @return zero based index + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + This class Is an extension to the standard math library + provided by java.lang.Math class. It follows the Math class + in that it has a private constructor and all static methods. + + + Returns a value rounded to p digits after decimal. + If p Is negative, then the number Is rounded to + places to the left of the decimal point. eg. + 10.23 rounded to -1 will give: 10. If p Is zero, + the returned value Is rounded to the nearest integral + value. + If n Is negative, the resulting value Is obtained + as the round value of absolute value of n multiplied + by the sign value of n (@see MathX.sign(double d)). + Thus, -0.6666666 rounded to p=0 will give -1 not 0. + If n Is NaN, returned value Is NaN. + @param n + @param p + + + Returns a value rounded-up to p digits after decimal. + If p Is negative, then the number Is rounded to + places to the left of the decimal point. eg. + 10.23 rounded to -1 will give: 20. If p Is zero, + the returned value Is rounded to the nearest integral + value. + If n Is negative, the resulting value Is obtained + as the round-up value of absolute value of n multiplied + by the sign value of n (@see MathX.sign(double d)). + Thus, -0.2 rounded-up to p=0 will give -1 not 0. + If n Is NaN, returned value Is NaN. + @param n + @param p + + + Returns a value rounded to p digits after decimal. + If p Is negative, then the number Is rounded to + places to the left of the decimal point. eg. + 10.23 rounded to -1 will give: 10. If p Is zero, + the returned value Is rounded to the nearest integral + value. + If n Is negative, the resulting value Is obtained + as the round-up value of absolute value of n multiplied + by the sign value of n (@see MathX.sign(double d)). + Thus, -0.8 rounded-down to p=0 will give 0 not -1. + If n Is NaN, returned value Is NaN. + @param n + @param p + + + average of all values + @param values + + + sum of all values + @param values + + + sum of squares of all values + @param values + + + product of all values + @param values + + + min of all values. If supplied array Is zero Length, + double.POSITIVE_INFINITY Is returned. + @param values + + + min of all values. If supplied array Is zero Length, + double.NEGATIVE_INFINITY Is returned. + @param values + + + Note: this function Is different from java.lang.Math.floor(..). + + When n and s are "valid" arguments, the returned value Is: Math.floor(n/s) * s; +
    + n and s are invalid if any of following conditions are true: +

      +
    • s Is zero
    • +
    • n Is negative and s Is positive
    • +
    • n Is positive and s Is negative
    • +
    + In all such cases, double.NaN Is returned. + @param n + @param s +
    + + Note: this function Is different from java.lang.Math.ceil(..). + + When n and s are "valid" arguments, the returned value Is: Math.ceiling(n/s) * s; +
    + n and s are invalid if any of following conditions are true: +
      +
    • s Is zero
    • +
    • n Is negative and s Is positive
    • +
    • n Is positive and s Is negative
    • +
    + In all such cases, double.NaN Is returned. + @param n + @param s +
    + +
    for all n >= 1; factorial n = n * (n-1) * (n-2) * ... * 1 +
    else if n == 0; factorial n = 1 +
    else if n < 0; factorial n = double.NaN +
    Loss of precision can occur if n Is large enough. + If n Is large so that the resulting value would be greater + than double.MAX_VALUE; double.POSITIVE_INFINITY Is returned. + If n < 0, double.NaN Is returned. + @param n +
    + + returns the remainder resulting from operation: + n / d. +
    The result has the sign of the divisor. +
    Examples: +
      +
    • mod(3.4, 2) = 1.4
    • +
    • mod(-3.4, 2) = 0.6
    • +
    • mod(-3.4, -2) = -1.4
    • +
    • mod(3.4, -2) = -0.6
    • +
    + If d == 0, result Is NaN + @param n + @param d +
    + + inverse hyperbolic cosine + @param d + + + inverse hyperbolic sine + @param d + + + inverse hyperbolic tangent + @param d + + + hyperbolic cosine + @param d + + + hyperbolic sine + @param d + + + hyperbolic tangent + @param d + + + returns the sum of product of corresponding double value in each + subarray. It Is the responsibility of the caller to Ensure that + all the subarrays are of equal Length. If the subarrays are + not of equal Length, the return value can be Unpredictable. + @param arrays + + + returns the sum of difference of squares of corresponding double + value in each subarray: ie. sigma (xarr[i]^2-yarr[i]^2) +
    + It Is the responsibility of the caller + to Ensure that the two subarrays are of equal Length. If the + subarrays are not of equal Length, the return value can be + Unpredictable. + @param xarr + @param yarr +
    + + returns the sum of sum of squares of corresponding double + value in each subarray: ie. sigma (xarr[i]^2 + yarr[i]^2) +
    + It Is the responsibility of the caller + to Ensure that the two subarrays are of equal Length. If the + subarrays are not of equal Length, the return value can be + Unpredictable. + @param xarr + @param yarr +
    + + returns the sum of squares of difference of corresponding double + value in each subarray: ie. sigma ( (xarr[i]-yarr[i])^2 ) +
    + It Is the responsibility of the caller + to Ensure that the two subarrays are of equal Length. If the + subarrays are not of equal Length, the return value can be + Unpredictable. + @param xarr + @param yarr +
    + + returns the total number of combinations possible when + k items are chosen out of total of n items. If the number + Is too large, loss of precision may occur (since returned + value Is double). If the returned value Is larger than + double.MAX_VALUE, double.POSITIVE_INFINITY Is returned. + If either of the parameters Is negative, double.NaN Is returned. + @param n + @param k + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + if v is zero length or contains no duplicates, return value is + Double.NaN. Else returns the value that occurs most times and if there is + a tie, returns the first such value. + + @param v + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + This Is the base class for all excel function evaluator + classes that take variable number of operands, and + where the order of operands does not matter + + + Maximum number of operands accepted by this function. + Subclasses may override to Change default value. + + + Whether to count nested subtotals. + + + Collects values from a single argument + + + Returns a double array that contains values for the numeric cells + from among the list of operands. Blanks and Blank equivalent cells + are ignored. Error operands or cells containing operands of type + that are considered invalid and would result in #VALUE! error in + excel cause this function to return null. + + @return never null + + + Ensures that a two dimensional array has all sub-arrays present and the same Length + @return false if any sub-array Is missing, or Is of different Length + + + Implementation of Excel function NA() + + @author Josh Micich + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + This Is the default implementation of a Function class. + The default behaviour Is to return a non-standard ErrorEval + "ErrorEval.FUNCTION_NOT_IMPLEMENTED". This error should alert + the user that the formula contained a function that Is not + yet implemented. + + + Implementation of Excel NOW() Function + + @author Frank Taffelt + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + Support for hyperbolic trig functions was Added as a part of + Java distribution only in JDK1.5. This class uses custom + naive implementation based on formulas at: + http://www.math2.org/math/trig/hyperbolics.htm + These formulas seem to agree with excel's implementation. + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + Support for hyperbolic trig functions was Added as a part of + Java distribution only in JDK1.5. This class uses custom + naive implementation based on formulas at: + http://www.math2.org/math/trig/hyperbolics.htm + These formulas seem to agree with excel's implementation. + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + Support for hyperbolic trig functions was Added as a part of + Java distribution only in JDK1.5. This class uses custom + naive implementation based on formulas at: + http://www.math2.org/math/trig/hyperbolics.htm + These formulas seem to agree with excel's implementation. + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + Log: LOG(number,[base]) + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at yahoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + This checks is x = 0 and the mean = 0. + Excel currently returns the value 1 where as the + maths common implementation will error. + @param x The number. + @param mean The mean. + @return If a default value should be returned. + + + All long-representable factorials + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation for Excel function OFFSet()

    + + OFFSet returns an area reference that Is a specified number of rows and columns from a + reference cell or area.

    + + Syntax:
    + OFFSet(reference, rows, cols, height, width)

    + reference Is the base reference.
    + rows Is the number of rows up or down from the base reference.
    + cols Is the number of columns left or right from the base reference.
    + height (default same height as base reference) Is the row Count for the returned area reference.
    + width (default same width as base reference) Is the column Count for the returned area reference.
    + + @author Josh Micich + + + Exceptions are used within this class to help simplify flow control when error conditions + are enCountered + + + A one dimensional base + offset. Represents either a row range or a column range. + Two instances of this class toGether specify an area range. + + + Moves the range by the specified translation amount.

    + + This method also 'normalises' the range: Excel specifies that the width and height + parameters (Length field here) cannot be negative. However, OFFSet() does produce + sensible results in these cases. That behavior Is replicated here.

    + + @param translationAmount may be zero negative or positive + + @return the equivalent LinearOffsetRange with a positive Length, moved by the + specified translationAmount. + + + Encapsulates either an area or cell reference which may be 2d or 3d. + + + OFFSet's numeric arguments (2..5) have similar Processing rules + + + Fractional values are silently truncated by Excel. + Truncation Is toward negative infinity. + + + Implementation for the PMT() Excel function.

    + + Syntax:
    + PMT(rate, nper, pv, fv, type)

    + + Returns the constant repayment amount required for a loan assuming a constant interest rate.

    + + rate the loan interest rate.
    + nper the number of loan repayments.
    + pv the present value of the future payments (or principle).
    + fv the future value (default zero) surplus cash at the end of the loan lifetime.
    + type whether payments are due at the beginning(1) or end(0 - default) of each payment period.
    + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation for Excel ROWS function. + + @author Josh Micich + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + Library for common statistics functions + + + returns the mean of deviations from mean. + @param v + + + if v Is zero Length or Contains no duplicates, return value + Is double.NaN. Else returns the value that occurs most times + and if there Is a tie, returns the first such value. + @param v + + + Implementation for the Excel function SUBTOTAL

    + + Syntax :
    + SUBTOTAL ( functionCode, ref1, ref2 ... )
    + + + +
    functionCode(1-11) Selects the underlying aggregate function to be used (see table below)
    ref1, ref2 ...Arguments to be passed to the underlying aggregate function

    +

    + + + + + + + + + + + + + + + +
    functionCodeAggregate Function
    1AVERAGE
    2COUNT
    3COUNTA
    4MAX
    5MIN
    6PRODUCT
    7STDEV
    8STDEVP *
    9SUM
    10VAR *
    11VARP *
    101-111*

    + * Not implemented in POI yet. Functions 101-111 are the same as functions 1-11 but with + the option 'ignore hidden values'. +

    + + @author Paul Tomlin < pault at bulk sms dot com > + + + Implementation for the Excel function SUMIF

    + + Syntax :
    + SUMIF ( range, criteria, sum_range )
    + + + + +
    rangeThe range over which criteria is applied. Also used for addend values when the third parameter is not present
    criteriaThe value or expression used to filter rows from range
    sum_rangeLocates the top-left corner of the corresponding range of addends - values to be added (after being selected by the criteria)

    +

    + @author Josh Micich +
    + + @return a range of the same dimensions as aeRange using eval to define the top left corner. + @throws EvaluationException if eval is not a reference + + + Determines a double value for the specified ValueEval. + @param IsScalarProduct false for SUMPRODUCTs over area refs. + @throws EvalEx if ve represents an error value. +

    + Note - string values and empty cells are interpreted differently depending on + isScalarProduct. For scalar products, if any term Is blank or a string, the + error (#VALUE!) Is raised. For area (sum)products, if any term Is blank or a string, the + result Is zero. + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + +

    + An implementation of the MID function + MID returns a specific number of + Chars from a text string, starting at the specified position. + @author Manda Wilson < wilson at c bio dot msk cc dot org; + +
    + + An implementation of the Replace function: + Replaces part of a text string based on the number of Chars + you specify, with another text string. + @author Manda Wilson < wilson at c bio dot msk cc dot org > + + + Replaces part of a text string based on the number of Chars + you specify, with another text string. + + @see org.apache.poi.hssf.record.formula.eval.Eval + + + An implementation of the SUBSTITUTE function: + Substitutes text in a text string with new text, some number of times. + @author Manda Wilson < wilson at c bio dot msk cc dot org > + + + Substitutes text in a text string with new text, some number of times. + + @see org.apache.poi.hssf.record.formula.eval.Eval + + + An implementation of the TEXT function + TEXT returns a number value formatted with the given number formatting string. + This function is not a complete implementation of the Excel function, but + handles most of the common cases. All work is passed down to + {@link DataFormatter} to be done, as this works much the same as the + display focused work that that does. + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + @author Manda Wilson < wilson at c bio dot msk cc dot org > + + An implementation of the TRIM function: + + Removes leading and trailing spaces from value if evaluated operand value is string. + + + + + + An implementation of the MID function + + MID returns a specific number of + characters from a text string, starting at the specified position. + + Syntax: MID(text, start_num, num_chars) + + + + @author Torstein Tauno Svendsen (torstei@officenet.no) + + Implementation of the FIND() function. + + Syntax: FIND(Find_text, within_text, start_num) + + FIND returns the character position of the first (case sensitive) occurrence of + Find_text inside within_text. The third parameter, + start_num, is optional (default=1) and specifies where to start searching + from. Character positions are 1-based. + + + + + Implementation of the FIND() function. SEARCH is a case-insensitive version of FIND() + + Syntax: SEARCH(Find_text, within_text, start_num) + + + + + An implementation of the TRIM function: + Removes leading and trailing spaces from value if Evaluated operand + value Is string. + @author Manda Wilson < wilson at c bio dot msk cc dot org > + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Implementation for the Excel function TIME + + @author Steven Butler (sebutler @ gmail dot com) + + Based on POI {@link DateFunc} + + + Converts the supplied hours, minutes and seconds to an Excel time value. + + + @param ds array of 3 doubles Containing hours, minutes and seconds. + Non-integer inputs are tRuncated to an integer before further calculation + of the time value. + @return An Excel representation of a time of day. + If the time value represents more than a day, the days are Removed from + the result, leaving only the time of day component. + @throws NPOI.SS.Formula.Eval.EvaluationException + If any of the arguments are greater than 32767 or the hours + minutes and seconds when combined form a time value less than 0, the function + Evaluates to an error. + + + "1,0000" is valid, "1,00" is not + + + TODO see if the same functionality is needed in {@link OperandResolver#parseDouble(String)} + + @return null if there is any problem converting the text + + + Convenience base class for any function which must take two or three + arguments + + @author Josh Micich + + + Convenience base class for any function which must take two or three + arguments + + @author Josh Micich + + + Convenience base class for any function which must take three or four + arguments + + @author Josh Micich + + + Implementation of the VLOOKUP() function.

    + + VLOOKUP Finds a row in a lookup table by the first column value and returns the value from another column.
    + + Syntax:
    + VLOOKUP(lookup_value, table_array, col_index_num, range_lookup)

    + + lookup_value The value to be found in the first column of the table array.
    + table_array An area reference for the lookup data.
    + col_index_num a 1 based index specifying which column value of the lookup data will be returned.
    + range_lookup If TRUE (default), VLOOKUP Finds the largest value less than or equal to + the lookup_value. If FALSE, only exact Matches will be considered
    + + @author Josh Micich + + + Returns one column from an AreaEval + + @(#VALUE!) if colIndex Is negative, (#REF!) if colIndex Is too high + + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + + Constructs a new instance of the Accumulator used to calculated this function + + +

    Title: XSSF Area 3D Reference (Sheet + Area)

    +

    Description: Defined an area in an external or different sheet.

    +

    REFERENCE:

    + +

    This is XSSF only, as it stores the sheet / book references + in String form. The HSSF equivalent using indexes is {@link Area3DPtg}

    +
    + + An XSSF only representation of a reference to a deleted area + + + A Name, be that a Named Range or a Function / User Defined + Function, Addressed in the HSSF External Sheet style. + +

    This is XSSF only, as it stores the sheet / book references + in String form. The HSSF equivalent using indexes is {@link NameXPtg}

    +
    + + An XSSF only special kind of Ptg, which stores the sheet / book + reference in string form. + + + An XSSF only special kind of Ptg, which stores a range of + sheet / book references in string form. + + +

    Title: XSSF 3D Reference

    +

    Description: Defines a cell in an external or different sheet.

    +

    REFERENCE:

    + +

    This is XSSF only, as it stores the sheet / book references + in String form. The HSSF equivalent using indexes is {@link Ref3DPtg}

    +
    + + Encapsulates logic to convert shared formulaa into non shared equivalent + + + Creates a non shared formula from the shared formula counterpart, i.e. + Converts the shared formula into the equivalent {@link org.apache.poi.ss.formula.ptg.Ptg} array that it would have, + were it not shared. + + @param ptgs parsed tokens of the shared formula + @param formulaRow + @param formulaColumn + + + This class provides the base functionality for Excel sheet functions + There are two kinds of function Ptgs - tFunc and tFuncVar + Therefore, this class will have ONLY two subclasses + @author Avik Sengupta + @author Andrew C. Oliver (acoliver at apache dot org) + + + The name of the IF function (i.e. "IF"). Extracted as a constant for clarity. + + + All external functions have function index 255 + + + external functions Get some special Processing + @return true if this is an external function + + + Used to detect whether a function name found in a formula is one of the standard excel functions + + The name matching is case insensitive. + @return true if the name specifies a standard worksheet function, + false if the name should be assumed to be an external function. + + + Resolves internal function names into function indexes. + + The name matching is case insensitive. + @return the standard worksheet function index if found, otherwise FUNCTION_INDEX_EXTERNAL + + + Addition operator PTG the "+" binomial operator. If you need more + explanation than that then well...We really can't help you here. + @author Andrew C. Oliver (acoliver@apache.org) + @author Jason Height (jheight at chariot dot net dot au) + + + implementation of method from OperationsPtg + + + Common superclass of 2-D area refs + + +

    Title: Area 3D Ptg - 3D reference (Sheet + Area)

    +

    Description: Defined an area in Extern Sheet.

    +

    REFERENCE:

    + + This is HSSF only, as it matches the HSSF file format way of + referring to the sheet by an extern index. The XSSF equivalent + is {@link Area3DPxg} +
    + + @return text representation of this area reference that can be used in text + formulas. The sheet name will get properly delimited if required. + + + AreaErr - handles deleted cell area references. + + @author Daniel Noll (daniel at nuix dot com dot au) + + + Common interface for AreaPtg and Area3DPtg, and their + child classes. + + + @return the first row in the area + + + @return last row in the range (x2 in x1,y1-x2,y2) + + + @return the first column number in the area. + + + @return lastcolumn in the area + + + Specifies a rectangular area of cells A1:A4 for instance. + @author Jason Height (jheight at chariot dot net dot au) + + + Specifies a rectangular area of cells A1:A4 for instance. + @author Jason Height (jheight at chariot dot net dot au) + + + Specifies a rectangular area of cells A1:A4 for instance. + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + TODO - (May-2008) fix subclasses of AreaPtg 'AreaN~' which are used in shared formulas. + see similar comment in ReferencePtg + + + zero based, Unsigned 16 bit + + + zero based, Unsigned 16 bit + + + zero based, Unsigned 8 bit + + + zero based, Unsigned 8 bit + + + Sort the first and last row and columns in-place to the preferred (top left:bottom right) order + Note: Sort only occurs when an instance is constructed or when this method is called. + +

    For example, $E5:B$10 becomes B5:$E$10

    +
    + + @return the first row in the area + + + @return last row in the range (x2 in x1,y1-x2,y2) + + + @return the first column number in the area. + + + @return whether or not the first row is a relative reference or not. + + + @return Isrelative first column to relative or not + + + @return lastcolumn in the area + + + @return last column and bitmask (the raw field) + + + @return last row relative or not + + + @return lastcol relative or not + + + Set the last column irrespective of the bitmasks + + + ArrayPtg - handles arrays + + The ArrayPtg is a little weird, the size of the Ptg when parsing initially only + includes the Ptg sid and the reserved bytes. The next Ptg in the expression then follows. + It is only after the "size" of all the Ptgs is met, that the ArrayPtg data is actually + held after this. So Ptg.CreateParsedExpression keeps track of the number of + ArrayPtg elements and need to Parse the data upto the FORMULA record size. + + @author Jason Height (jheight at chariot dot net dot au) + + + The size of the plain tArray token written within the standard formula tokens + (not including the data which comes after all formula tokens) + + + @param values2d array values arranged in rows + + + Note - (2D) array elements are stored column by column + @return the index into the internal 1D array for the specified column and row + + + This size includes the size of the array Ptg plus the Array Ptg Token value size + + + Represents the initial plain tArray token (without the constant data that trails the whole + formula). Objects of this class are only temporary and cannot be used as {@link Ptg}s. + These temporary objects get converted to {@link ArrayPtg} by the + {@link #finishReading(LittleEndianInput)} method. + + + Read in the actual token (array) values. This occurs + AFTER the last Ptg in the expression. + See page 304-305 of Excel97-2007BinaryFileFormat(xls)Specification.pdf + + + "Special Attributes" + This seems to be a Misc Stuff and Junk record. One function it serves Is + in SUM functions (i.e. SUM(A1:A3) causes an area PTG then an ATTR with the SUM option Set) + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + only used for tAttrChoose: table of offsets to starts of args + + + only used for tAttrChoose: offset to the tFuncVar for CHOOSE() + + + 00H = Spaces before the next token (not allowed before tParen token) + + + 01H = Carriage returns before the next token (not allowed before tParen token) + + + 02H = Spaces before opening parenthesis (only allowed before tParen token) + + + 03H = Carriage returns before opening parenthesis (only allowed before tParen token) + + + 04H = Spaces before closing parenthesis (only allowed before tParen, tFunc, and tFuncVar tokens) + + + 05H = Carriage returns before closing parenthesis (only allowed before tParen, tFunc, and tFuncVar tokens) + + + 06H = Spaces following the equality sign (only in macro sheets) + + + + Creates the space. + + a constant from SpaceType + The count. + + + + Creates if. + + distance (in bytes) to start of either + tFuncVar(IF) token (when false parameter is not present). + + + + Creates the skip. + + distance (in bytes) to position behind tFuncVar(IF) token (minus 1). + + + bool (bool) + Stores a (java) bool value in a formula. + @author Paul Krause (pkrause at soundbite dot com) + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + Common baseclass for + tExp + tTbl + tParen + tNlr + tAttr + tSheet + tEndSheet + + + Title: Deleted Area 3D Ptg - 3D referecnce (Sheet + Area) + Description: Defined a area in Extern Sheet. + REFERENCE: + @author Patrick Luby + @version 1.0-pre + + + Title: Deleted Reference 3D Ptg + Description: Defined a cell in extern sheet. + REFERENCE: + @author Patrick Luby + @version 1.0-pre + + + Creates new DeletedRef3DPtg + + + This PTG implements the standard binomial divide "/" + @author Andrew C. Oliver acoliver at apache dot org + @author Jason Height (jheight at chariot dot net dot au) + + + + @author andy + + + @author Daniel Noll (daniel at nuix dot com dot au) + + + #NULL! - Intersection of two cell ranges is empty + + + #DIV/0! - Division by zero + + + #VALUE! - Wrong type of operand + + + #REF! - Illegal or deleted cell reference + + + #NAME? - Wrong function or range name + + + #NUM! - Value range overflow + + + #N/A - Argument or function not available + + + Creates new ErrPtg + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + @author dmui (save existing implementation) + + + @author aviks + @author Jason Height (jheight at chariot dot net dot au) + @author Danny Mui (dmui at apache dot org) (Leftover handling) + + + + @author Jason Height (jheight at chariot dot net dot au) + + + Single instance of this token for 'sum() taking a single argument' + + + Creates new function pointer from a byte array + usually called while reading an excel file. + + + Create a function ptg from a string tokenised by the parser + + + PTG class to implement greater or equal to + + @author fred at stsci dot edu + + + Greater than operator PTG ">" + @author Cameron Riley (criley at ekmail.com) + + + Get the number of operands for the Less than operator + @return int the number of operands + + + Implementation of method from OperationsPtg + @param operands a String array of operands + @return String the Formula as a String + + + @author Daniel Noll (daniel at nuix dot com dot au) + + + Implementation of method from Ptg + + + implementation of method from OperationsPtg + + + Integer (unsigned short integer) + Stores an Unsigned short value (java int) in a formula + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + + + Excel represents integers 0..65535 with the tInt token. + @return true if the specified value is within the range of values + IntPtg can represent. + + + Ptg class to implement less than or equal + + @author fred at stsci dot edu + + + Less than operator PTG "<". The SID is taken from the + Openoffice.orgs Documentation of the Excel File Format, + Table 3.5.7 + @author Cameron Riley (criley at ekmail.com) + + + the sid for the less than operator as hex + + + identifier for LESS THAN char + + + Get the number of operands for the Less than operator + @return int the number of operands + + + Implementation of method from OperationsPtg + @param operands a String array of operands + @return String the Formula as a String + + + @author Daniel Noll (daniel at nuix dot com dot au) + + + Creates new MemAreaPtg + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + @author Daniel Noll (daniel at nuix dot com dot au) + + + Creates new MemErrPtg + + + @author Glen Stampoultzis (glens at apache.org) + + + Creates new function pointer from a byte array + usually called while Reading an excel file. + + + Missing Function Arguments + + Avik Sengupta <avik at apache.org> + @author Jason Height (jheight at chariot dot net dot au) + + + Implements the standard mathmatical multiplication - * + @author Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + one-based index to defined name record + + + @param nameIndex zero-based index to name within workbook + + + Creates new NamePtg + + + @return zero based index to a defined name record in the LinkTable + + + A Name, be that a Named Range or a Function / User Defined + Function, addressed in the HSSF External Sheet style. + + This is HSSF only, as it matches the HSSF file format way of + referring to the sheet by an extern index. The XSSF equivalent + is {@link NameXPxg} + + + index to REF entry in externsheet record + + + index to defined name or externname table(1 based) + + + reserved must be 0 + + + @param sheetRefIndex index to REF entry in externsheet record + @param nameIndex index to defined name or externname table + + + Ptg class to implement not equal + + @author fred at stsci dot edu + + + Number + Stores a floating point value in a formula + value stored in a 8 byte field using IEEE notation + @author Avik Sengupta + @author Jason Height (jheight at chariot dot net dot au) + + + Create a NumberPtg from a byte array Read from disk + + + Create a NumberPtg from a string representation of the number + Number format is not checked, it is expected to be validated in the parser + that calls this method. + @param value : String representation of a floating point number + + + @author Josh Micich + + + All Operand Ptgs are classifed ('relative', 'value', 'array') + + + defines a Ptg that is an operation instead of an operand + @author andy + + + returns a string representation of the operations + the Length of the input array should equal the number returned by + @see #GetNumberOfOperands + + + + The number of operands expected by the operations + + + While formula tokens are stored in RPN order and thus do not need parenthesis for + precedence reasons, Parenthesis tokens ARE written to Ensure that user entered + parenthesis are Displayed as-is on Reading back + + Avik Sengupta <lists@aviksengupta.com> + Andrew C. Oliver (acoliver at apache dot org) + @author Jason Height (jheight at chariot dot net dot au) + + + Percent PTG. + + @author Daniel Noll (daniel at nuix.com.au) + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + Ptg represents a syntactic token in a formula. 'PTG' is an acronym for + 'parse thing'. Originally, the name referred to the single + byte identifier at the start of the token, but in POI, Ptg encapsulates + the whole formula token (initial byte + value data). + + + Ptgs are logically arranged in a tree representing the structure of the + Parsed formula. However, in BIFF files Ptgs are written/Read in + Reverse-Polish Notation order. The RPN ordering also simplifies formula + evaluation logic, so POI mostly accesses Ptgs in the same way. + + @author andy + @author avik + @author Jason Height (jheight at chariot dot net dot au) + + + Reads size bytes of the input stream, to Create an array of Ptgs. + Extra data (beyond size) may be Read if and ArrayPtgs are present. + + + @return a distinct copy of this Ptg if the class is mutable, or the same instance + if the class is immutable. + + + This method will return the same result as {@link #getEncodedSizeWithoutArrayData(Ptg[])} + if there are no array tokens present. + @return the full size taken to encode the specified Ptgs + + + Used to calculate value that should be encoded at the start of the encoded Ptg token array; + @return the size of the encoded Ptg tokens not including any trailing array data. + + + Writes the ptgs to the data buffer, starting at the specified offset. + +
    + The 2 byte encode Length field is not written by this method. + @return number of bytes written +
    + + @return the encoded Length of this Ptg, including the initial Ptg type identifier byte. + + + @return false if this token is classified as 'reference', 'value', or 'array' + + + Write this Ptg to a byte array + + + return a string representation of this token alone + + + Overridden toString method to Ensure object hash is not printed. + This helps Get rid of gratuitous diffs when comparing two dumps + Subclasses may output more relevant information by overriding this method + + + + @return the 'operand class' (REF/VALUE/ARRAY) for this Ptg + + + Debug / diagnostic method to get this token's 'operand class' type. + @return 'R' for 'reference', 'V' for 'value', 'A' for 'array' and '.' for base tokens + + + @author Daniel Noll (daniel at nuix dot com dot au) + + + implementation of method from OperationsPtg + + + @author Josh Micich + + + Takes in a String representation of a cell reference and fills out the + numeric fields. + + + Title: Reference 3D Ptg + Description: Defined a cell in extern sheet. + REFERENCE: + @author Libin Roman (Vista Portal LDT. Developer) + @author Jason Height (jheight at chariot dot net dot au) + @version 1.0-pre + + + Field 2 + - lower 8 bits is the zero based Unsigned byte column index + - bit 16 - IsRowRelative + - bit 15 - IsColumnRelative + + + Creates new AreaPtg + + + @return text representation of this cell reference that can be used in text + formulas. The sheet name will Get properly delimited if required. + + + RefError - handles deleted cell reference + @author Jason Height (jheight at chariot dot net dot au) + + + RefNPtg + @author Jason Height (jheight at apache dot com) + + + Creates new ValueReferencePtg + + + ReferencePtg - handles references (such as A1, A2, IA4) + @author Andrew C. Oliver (acoliver@apache.org) + @author Jason Height (jheight at chariot dot net dot au) + + + Takes in a String representation of a cell reference and Fills out the + numeric fields. + + + ReferencePtgBase - handles references (such as A1, A2, IA4) + @author Andrew C. Oliver (acoliver@apache.org) + @author Jason Height (jheight at chariot dot net dot au) + + + The row index - zero based Unsigned 16 bit value + + + Field 2 + - lower 8 bits is the zero based Unsigned byte column index + - bit 16 - IsRowRelative + - bit 15 - IsColumnRelative + + + Takes in a String representation of a cell reference and Fills out the + numeric fields. + + + Returns the row number as a short, which will be + wrapped (negative) for values between 32769 and 65535 + + + Returns the row number as an int, between 0 and 65535 + + + @author Josh Micich + + + String Stores a String value in a formula value stored in the format + <Length 2 bytes>char[] + + @author Werner Froidevaux + @author Jason Height (jheight at chariot dot net dot au) + @author Bernard Chesnoy + + + the Char (")used in formulas to delimit string literals + + + NOTE: OO doc says 16bit Length, but BiffViewer says 8 Book says something + totally different, so don't look there! + + + Create a StringPtg from a stream + + + Create a StringPtg from a string representation of the number Number + format Is not Checked, it Is expected to be Validated in the Parser that + calls this method. + + @param value : + String representation of a floating point number + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + This ptg indicates a data table. + It only occurs in a FORMULA record, never in an + ARRAY or NAME record. When ptgTbl occurs in a + formula, it is the only token in the formula. + + This indicates that the cell containing the + formula is an interior cell in a data table; + the table description is found in a TABLE + record. Rows and columns which contain input + values to be substituted in the table do + not contain ptgTbl. + See page 811 of the june 08 binary docs. + + + The row number of the upper left corner + + + The column number of the upper left corner + + + Unary Plus operator + does not have any effect on the operand + @author Avik Sengupta + + + implementation of method from OperationsPtg + + + Unary Plus operator + does not have any effect on the operand + @author Avik Sengupta + + + implementation of method from OperationsPtg + + + @author Glen Stampoultzis (glens at apache.org) + + + implementation of method from OperationsPtg + + + + @author andy + @author Jason Height (jheight at chariot dot net dot au) + + + Creates new UnknownPtg + + + Common baseclass of all value operators. + Subclasses include all Unary and binary operators except for the reference operators (IntersectionPtg, RangePtg, UnionPtg) + + @author Josh Micich + + + All Operator Ptgs are base tokens (i.e. are not RVA classified) + + + Evaluator for returning cells or sheets for a range of sheets + + + Optional Extension to the likes of {@link AreaEval} and + {@link NPOI.SS.Formula.Eval.AreaEvalBase}, + which allows for looking up 3D (sheet+row+column) Evaluations + + + @param sheetIndex sheet index (zero based) + @param rowIndex relative row index (zero based) + @param columnIndex relative column index (zero based) + @return element at the specified row and column position + + + Common interface of {@link AreaEval} and {@link org.apache.poi.ss.formula.eval.AreaEvalBase}, + for 2D (row+column) evaluations + + + @param rowIndex relative row index (zero based) + @param columnIndex relative column index (zero based) + @return element at the specified row and column position + + + @return true if the area has just a single row, this also includes + the trivial case when the area has just a single cell. + + + @return true if the area has just a single column, this also includes + the trivial case when the area has just a single cell. + + + @param rowIndex relative row index (zero based) + @return a single row {@link TwoDEval} + + + @param columnIndex relative column index (zero based) + @return a single column {@link TwoDEval} + + + @return true if the cell at row and col is a subtotal + + + A UDFFinder that can retrieve functions both by name and by fake index. + + @author Yegor Kozlov + + + Collects Add-in libraries and VB macro functions toGether into one UDF Finder + + @author PUdalau + + + + Returns executor by specified name. + + Name of function. + Function executor. null if not found + + + + Add a new toolpack + + + + + Default UDF Finder - for Adding your own user defined functions. + + @author PUdalau + + + Common interface for "Add-in" libraries and user defined function libraries. + + @author PUdalau + + + Returns executor by specified name. Returns null if the function name is unknown. + + @param name Name of function. + @return Function executor. + + + Provides access to a {@link WorkbookEvaluator}, eg for use with + {@link CollaboratingWorkbooksEnvironment} + + For POI internal use only + + + Provide the underlying WorkbookEvaluator + + + To support Constant Values (2.5.7) as required by the CRN record. + This class is also used for two dimensional arrays which are encoded by + EXTERNALNAME (5.39) records and Array tokens.

    + + @author Josh Micich + + + @return encoded size without the 'type' code byte + + +

    + Represents a constant error code value as encoded in a constant values array. + This class is a type-safe wrapper for a 16-bit int value performing a similar job to + ErrorEval + + @author Josh Micich +
    + + + Initializes a new instance of the class. + + The error code. + + + + Gets the error code. + + The error code. + + + + Gets the text. + + The text. + + + + Values the of. + + The error code. + + + + + Returns a that represents the current . + + + A that represents the current . + + + + Stores the parameters that identify the evaluation of one cell.
    +
    + + Calls formulaCell.SetFormulaResult(null, null) recursively all the way up the tree of + dependencies. Calls usedCell.ClearConsumingCell(fc) for each child of a cell that Is + Cleared along the way. + @param formulaCells + + + Identical To {@link #RecurseClearCachedFormulaResults()} except for the listener call-backs + + + Stores details about the current evaluation of a cell.
    +
    + + @param inputCell a cell directly used by the formula of this evaluation frame + + + @return never null, (possibly empty) array of all cells directly used while + evaluating the formula of this frame. + + + Manages a collection of {@link WorkbookEvaluator}s, in order To support evaluation of formulas + across spreadsheets.

    + + For POI internal use only + + @author Josh Micich + + + + + + Performance optimisation for {@link HSSFFormulaEvaluator}. This class stores previously + calculated values of already visited cells, To avoid unnecessary re-calculation when the + same cells are referenced multiple times + + + @author Josh Micich + + + only used for testing. null otherwise + + + Should be called whenever there are Changes To input cells in the evaluated workbook. + + + Abstracts a cell for the purpose of formula evaluation. This interface represents both formula + and non-formula cells.
    + + Implementors of this class must implement {@link #HashCode()} and {@link #Equals(Object)} + To provide an identity relationship based on the underlying HSSF or XSSF cell

    + + For POI internal use only + + @author Josh Micich + + + Abstracts a name record for formula evaluation.
    + + For POI internal use only + + @author Josh Micich +
    + + Abstracts a sheet for the purpose of formula evaluation.
    + + For POI internal use only + + @author Josh Micich +
    + + @return null if there is no cell at the specified coordinates + + + Propagated from {@link EvaluationWorkbook#clearAllCachedResultValues()} to clear locally cached data. + + @see WorkbookEvaluator#clearAllCachedResultValues() + @see EvaluationWorkbook#clearAllCachedResultValues() + + +

    + Instances of this class keep track of multiple dependent cell evaluations due + To recursive calls To + The main purpose of this class is To detect an attempt To evaluate a cell + that is already being evaluated. In other words, it detects circular + references in spreadsheet formulas. + + + @author Josh Micich + +
    + + Notifies this evaluation tracker that evaluation of the specified cell Is + about To start.
    + + In the case of a true return code, the caller should + continue evaluation of the specified cell, and also be sure To call + endEvaluate() when complete.
    + + In the case of a null return code, the caller should + return an evaluation result of + ErrorEval.CIRCULAR_REF_ERROR, and not call endEvaluate(). +
    + @return false if the specified cell is already being evaluated +
    + + Notifies this evaluation tracker that the evaluation of the specified cell is complete.

    + + Every successful call To startEvaluate must be followed by a call To endEvaluate (recommended in a finally block) To enable + proper tracking of which cells are being evaluated at any point in time.

    + + Assuming a well behaved client, parameters To this method would not be + required. However, they have been included To assert correct behaviour, + and form more meaningful error messages. + + + Abstracts a workbook for the purpose of formula evaluation.
    + + For POI internal use only + + @author Josh Micich +
    + + @return -1 if the specified sheet is from a different book + + + HSSF Only - fetch the external-style sheet details +

    Return will have no workbook set if it's actually in our own workbook

    +
    + + XSSF Only - fetch the external-style sheet details +

    Return will have no workbook set if it's actually in our own workbook

    +
    + + HSSF Only - convert an external sheet index to an internal sheet index, + for an external-style reference to one of this workbook's own sheets + + + HSSF Only - fetch the external-style name details + + + XSSF Only - fetch the external-style name details + + + Propagated from {@link WorkbookEvaluator#clearAllCachedResultValues()} to clear locally cached data. + Implementations must call the same method on all referenced {@link EvaluationSheet} instances, as well as clearing local caches. + @see WorkbookEvaluator#clearAllCachedResultValues() + + + Should be implemented by any {@link Ptg} subclass that needs Has an extern sheet index
    + + For POI internal use only + + @author Josh Micich +
    + + Encapsulates an encoded formula token array. + + @author Josh Micich + + + immutable + + + Convenience method for {@link #read(int, LittleEndianInput, int)} + + + When there are no array constants present, encodedTokenLen==totalEncodedLen + @param encodedTokenLen number of bytes in the stream taken by the plain formula tokens + @param totalEncodedLen the total number of bytes in the formula (includes trailing encoding + for array constants, but does not include 2 bytes for initial ushort encodedTokenLen field. + @return A new formula object as read from the stream. Possibly empty, never null. + + + Writes The formula encoding is includes: +
      +
    • ushort tokenDataLen
    • +
    • tokenData
    • +
    • arrayConstantData (if present)
    • +
    +
    + + @return total formula encoding length. The formula encoding includes: +
      +
    • ushort tokenDataLen
    • +
    • tokenData
    • +
    • arrayConstantData (optional)
    • +
    + Note - this value is different to tokenDataLength +
    + + This method is often used when the formula length does not appear immediately before + the encoded token data. + + @return the encoded length of the plain formula tokens. This does not include + the leading ushort field, nor any trailing array constant data. + + + Creates a {@link Formula} object from a supplied {@link Ptg} array. + Handles nulls OK. + @param ptgs may be null + @return Never null (Possibly empty if the supplied ptgs is null) + + + Gets the {@link Ptg} array from the supplied {@link Formula}. + Handles nulls OK. + + @param formula may be null + @return possibly null (if the supplied formula is null) + + + Gets the locator for the corresponding {@link SharedFormulaRecord}, {@link ArrayRecord} or + {@link TableRecord} if this formula belongs to such a grouping. The {@link CellReference} + returned by this method will match the top left corner of the range of that grouping. + The return value is usually not the same as the location of the cell containing this formula. + + @return the firstRow & firstColumn of an array formula or shared formula that this formula + belongs to. null if this formula is not part of an array or shared formula. + + + + @author Josh Micich + + + @return null if not found + + + Stores the cached result of a formula evaluation, along with the Set of sensititive input cells + + + Cells 'used' in the current evaluation of the formula corresponding To this cache entry + + If any of the following cells Change, this cache entry needs To be Cleared + + + A custom implementation of {@link java.util.HashSet} in order To reduce memory consumption. + + Profiling tests (Oct 2008) have shown that each element {@link FormulaCellCacheEntry} takes + around 32 bytes To store in a HashSet, but around 6 bytes To store here. For Spreadsheets with + thousands of formula cells with multiple interdependencies, the savings can be very significant. + + @author Josh Micich + + + + Specific exception thrown when a supplied formula does not Parse properly. + Primarily used by test cases when testing for specific parsing exceptions. + + + + + This class was given package scope until it would become Clear that it is useful to general client code. + + + + + Lookahead Character. + Gets value '\0' when the input string is exhausted + + + Tracks whether the run of whitespace preceeding "look" could be an + intersection operator. See GetChar. + + + Create the formula Parser, with the string that is To be + Parsed against the supplied workbook. + A later call the Parse() method To return ptg list in + rpn order, then call the GetRPNPtg() To retrive the + Parse results. + This class is recommended only for single threaded use. + + If you only have a usermodel.HSSFWorkbook, and not a + model.Workbook, then use the convenience method on + usermodel.HSSFFormulaEvaluator + + + * Parse a formula into a array of tokens + * Side effect: creates name (Workbook.createName) if formula contains unrecognized names (names are likely UDFs) + * + * @param formula the formula to parse + * @param workbook the parent workbook + * @param formulaType the type of the formula, see {@link FormulaType} + * @param sheetIndex the 0-based index of the sheet this formula belongs to. + * @param rowIndex - the related cell's row index in 0-based form (-1 if the formula is not cell related) + * used to handle structured references that have the "#This Row" quantifier. + * The sheet index is required to resolve sheet-level names. -1 means that + * the scope of the name will be ignored and the parser will match names only by name + * + * @return array of parsed tokens + * @throws FormulaParseException if the formula is unparsable + + + Parse a structured reference. Converts the structured + reference to the area that represent it. + + @param tableText - The structured reference text + @param workbook - the parent workbook + @param rowIndex - the 0-based cell's row index ( used to handle "#This Row" quantifiers ) + @return the area that being represented by the structured reference. + + + Read New Character From Input Stream + + + Report What Was Expected + + + Recognize an Alpha Character + + + Recognize a Decimal Digit + + + Recognize an Alphanumeric + + + Recognize White Space + + + Skip Over Leading White Space + + + Consumes the next input character if it is equal To the one specified otherwise throws an + unchecked exception. This method does not consume whitespace (before or after the + matched character). + + + Get a Number + + + From OOO doc: "Whenever one operand of the reference subexpression is a function, + a defined name, a 3D reference, or an external reference (and no error occurs), + a tMemFunc token is used" + + + + + @return true if the specified character may be used in a defined name + + + @param currentParsePosition used to format a potential error message + + + @return false if sub-expression represented the specified ParseNode definitely + cannot appear on either side of the range (':') operator + + + Parses area refs (things which could be the operand of ':') and simple factors + Examples +
    +               A$1
    +               $A$1 :  $B1
    +               A1 .......	C2
    +               Sheet1 !$A1
    +               a..b!A1
    +               'my sheet'!A1
    +               .my.sheet!A1
    +               'my sheet':'my alt sheet'!A1
    +               .my.sheet1:.my.sheet2!$B$2
    +               my.named..range.
    +               'my sheet'!my.named.range
    +               .my.sheet!my.named.range
    +               foo.bar(123.456, "abc")
    +               123.456
    +               "abc"
    +               true
    +               [Foo.xls]!$A$1
    +               [Foo.xls]'my sheet'!$A$1
    +               [Foo.xls]!my.named.range
    +             
    + +
    + + Parses a structured reference, returns it as area reference. + Examples: +
    +            Table1[col]
    +            Table1[[#Totals],[col]]
    +            Table1[#Totals]
    +            Table1[#All]
    +            Table1[#Data]
    +            Table1[#Headers]
    +            Table1[#Totals]
    +            Table1[#This Row]
    +            Table1[[#All],[col]]
    +            Table1[[#Headers],[col]]
    +            Table1[[#Totals],[col]]
    +            Table1[[#All],[col1]:[col2]]
    +            Table1[[#Data],[col1]:[col2]]
    +            Table1[[#Headers],[col1]:[col2]]
    +            Table1[[#Totals],[col1]:[col2]]
    +            Table1[[#Headers],[#Data],[col2]]
    +            Table1[[#This Row], [col1]]
    +            Table1[ [col1]:[col2] ]
    +            
    + @param tableName + @return +
    + + Tries to parse the next as column - can contain whitespace + Caller should save pointer. + @return + + + Tries to parse the next as special quantifier + Caller should save pointer. + @return + + + Parses simple factors that are not primitive ranges or range components + i.e. '!', ':'(and equiv '...') do not appear + Examples +
    +              my.named...range.
    +              foo.bar(123.456, "abc")
    +              123.456
    +              "abc"
    +              true
    +            
    +
    + + + @param sheetIden may be null + @param part1 + @param part2 may be null + + + Parses out a potential LHS or RHS of a ':' intended to produce a plain AreaRef. Normally these are + proper cell references but they could also be row or column refs like "$AC" or "10" + @return null (and leaves {@link #_pointer} unchanged if a proper range part does not parse out + + + + "A1", "B3" -> "A1:B3" + "sheet1!A1", "B3" -> "sheet1!A1:B3" + + @return null if the range expression cannot / shouldn't be reduced. + + + A1, $A1, A$1, $A$1, A, 1 + + + @return true if the two range parts can be combined in an + {@link AreaPtg} ( Note - the explicit range operator (:) may still be valid + when this method returns false ) + + + Note - caller should reset {@link #_pointer} upon null result + @return The sheet name as an identifier null if '!' is not found in the right place + + + If we have something that looks like [book]Sheet1: or + Sheet1, see if it's actually a range eg Sheet1:Sheet2! + + + very similar to {@link SheetNameFormatter#isSpecialChar(char)} + + + @return true if the specified name is a valid cell reference + + + Note - Excel Function names are 'case aware but not case sensitive'. This method may end + up creating a defined name record in the workbook if the specified name is not an internal + Excel Function, and Has not been encountered before. + + Side effect: creates workbook name if name is not recognized (name is probably a UDF) + + @param name case preserved Function name (as it was entered/appeared in the formula). + + + Adds a name (named range or user defined function) to underlying workbook's names table + @param functionName + + + * Generates the variable Function ptg for the formula. + * + * For IF Formulas, Additional PTGs are Added To the Tokens + * @param name a {@link NamePtg} or {@link NameXPtg} or null + * @return Ptg a null is returned if we're in an IF formula, it needs extreme manipulation and is handled in this Function + + + Get arguments To a Function + + + Parse and Translate a Math Factor + + + factors (without ^ or % ) + + + Get a PTG for an integer from its string representation. + return Int or Number Ptg based on size of input + + + Parse and Translate a Math Term + + + Parse and Translate an Expression + + + API call To execute the parsing of the formula + + + + Abstracts a workbook for the purpose of formula parsing.
    + + For POI internal use only + + @author Josh Micich +
    + + + named range name matching is case insensitive + + The name. + Index of the sheet. + + + + + Return the underlying workbook + + + + + + XSSF Only - gets a table that exists in the worksheet + + + + + + + Return an external name (named range, function, user-defined function) Ptg + + The name. + + + + + + Produce the appropriate Ptg for a 3d cell reference + + + + + + + + Produce the appropriate Ptg for a 3d area reference + + + + + + + + Gets the externSheet index for a sheet from this workbook + + Name of the sheet. + + + + + Gets the externSheet index for a sheet from an external workbook + + Name of the workbook, e.g. "BudGet.xls" + a name of a sheet in that workbook + + + + + Returns an enum holding spReadhseet properties specific to an Excel version ( + max column and row numbers, max arguments to a function, etc.) + + + + + Common logic for rendering formulas.
    + + For POI internal use only + + @author Josh Micich +
    + + Static method To convert an array of {@link Ptg}s in RPN order + To a human readable string format in infix mode. + @param book used for defined names and 3D references + @param ptgs must not be null + @return a human readable String + + + Abstracts a workbook for the purpose of converting formula To text.
    + + For POI internal use only + + @author Josh Micich +
    + + @return null if externSheetIndex refers To a sheet inside the current workbook + + + @return the name of the (first) sheet referred to by the given external sheet index + + + @return the name of the (last) sheet referred to by the given external sheet index + + + Enumeration of various formula types.
    + + For POI internal use only + + @author Josh Micich +
    + + Optimisation - compacts many blank cell references used by a single formula. + + @author Josh Micich + + + Temporarily collects FunctionMetadata instances for creation of a + FunctionMetadataRegistry. + + @author Josh Micich + + + stores indexes of all functions with footnotes (i.e. whose definitions might Change) + + + Holds information about Excel built-in functions. + + @author Josh Micich + + + Converts the text meta-data file into a FunctionMetadataRegistry + + @author Josh Micich + + + plain ASCII text metadata file uses three dots for ellipsis + + + Makes sure that footnote digits from the original OOO document have not been accidentally + left behind + + + Allows clients to Get FunctionMetadata instances for any built-in function of Excel. + + @author Josh Micich + + + The name of the IF function (i.e. "IF"). Extracted as a constant for clarity. + + + Resolves a built-in function index. + @param name uppercase function name + @return a negative value if the function name is not found. + This typically occurs for external functions. + + + A (mostly) opaque interface To allow test clients To trace cache values + Each spreadsheet cell Gets one unique cache entry instance. These objects + are safe To use as keys in {@link java.util.HashMap}s + + + Tests can implement this class To track the internal working of the {@link WorkbookEvaluator}.
    + + For POI internal testing use only + + @author Josh Micich +
    + + Internally, formula {@link ICacheEntry}s are stored in Sets which may Change ordering due + To seemingly trivial Changes. This method is provided To make the order of call-backs To + {@link #onClearDependentCachedValue(ICacheEntry, int)} more deterministic. + + + Used to help optimise cell evaluation result caching by allowing applications to specify which + parts of a workbook are final.
    + The term final is introduced here to denote immutability or 'having constant definition'. + This classification refers to potential actions (on the evaluated workbook) by the evaluating + application. It does not refer to operations performed by the evaluator ({@link + WorkbookEvaluator}).
    +
    + General guidelines: +
      +
    • a plain value cell can be marked as 'final' if it will not be changed after the first call + to {@link WorkbookEvaluator#evaluate(EvaluationCell)}. +
    • +
    • a formula cell can be marked as 'final' if its formula will not be changed after the first + call to {@link WorkbookEvaluator#evaluate(EvaluationCell)}. This remains true even if changes + in dependent values may cause the evaluated value to change.
    • +
    • plain value cells should be marked as 'not final' if their plain value value may change. +
    • +
    • formula cells should be marked as 'not final' if their formula definition may change.
    • +
    • cells which may switch between plain value and formula should also be marked as 'not final'. +
    • +
    + Notes: +
      +
    • If none of the spreadsheet cells is expected to have its definition changed after evaluation + begins, every cell can be marked as 'final'. This is the most efficient / least resource + intensive option.
    • +
    • To retain freedom to change any cell definition at any time, an application may classify all + cells as 'not final'. This freedom comes at the expense of greater memory consumption.
    • +
    • For the purpose of these classifications, setting the cached formula result of a cell (for + example in {@link HSSFFormulaEvaluator#evaluateFormulaCell(org.apache.poi.ss.usermodel.Cell)}) + does not constitute changing the definition of the cell.
    • +
    • Updating cells which have been classified as 'final' will cause the evaluator to behave + unpredictably (typically ignoring the update).
    • +
    + + @author Josh Micich +
    + + Convenience implementation for situations where all cell definitions remain fixed after + evaluation begins. + + + Checks if a cell's value(/formula) is fixed - in other words - not expected to be modified + between calls to the evaluator. (Note - this is an independent concept from whether a + formula cell's evaluated value may change during successive calls to the evaluator). + + @param sheetIndex zero based index into workbook sheet list + @param rowIndex zero based row index of cell + @param columnIndex zero based column index of cell + @return false if the evaluating application may need to modify the specified + cell between calls to the evaluator. + + + Provides Lazy Evaluation to 3D Ranges + + + @return whether cell at rowIndex and columnIndex is a subtotal + + + Provides Lazy Evaluation to a 3D Reference + + TODO Provide access to multiple sheets where present + + + This class performs 'operand class' transformation. Non-base Tokens are classified into three + operand classes: +
      +
    • reference
    • +
    • value
    • +
    • array
    • +
    +

    + + The operand class chosen for each Token depends on the formula type and the Token's place + in the formula. If POI Gets the operand class wrong, Excel may interpret the formula + incorrectly. This condition is typically manifested as a formula cell that displays as '#VALUE!', + but resolves correctly when the user presses F2, enter.

    + + The logic implemented here was partially inspired by the description in + "OpenOffice.org's Documentation of the Microsoft Excel File Format". The model presented there + seems To be inconsistent with observed Excel behaviour (These differences have not been fully + investigated). The implementation in this class Has been heavily modified in order To satisfy + concrete examples of how Excel performs the same logic (see TestRVA).

    + + Hopefully, as Additional important test cases are identified and Added To the test suite, + patterns might become more obvious in this code and allow for simplification. + + @author Josh Micich + + + Traverses the supplied formula parse tree, calling Ptg.SetClass() for each non-base + Token To Set its operand class. + + + @param callerForceArrayFlag true if one of the current node's parents is a + function Ptg which Has been Changed from default 'V' To 'A' type (due To requirements on + the function return value). + + + Contains all the contextual information required to Evaluate an operation + within a formula + + For POI internal use only + + @author Josh Micich + + + @return null if either workbook or sheet is not found + + + Resolves a cell or area reference dynamically. + @param workbookName the name of the workbook Containing the reference. If null + the current workbook is assumed. Note - to Evaluate formulas which use multiple workbooks, + a {@link CollaboratingWorkbooksEnvironment} must be set up. + @param sheetName the name of the sheet Containing the reference. May be null + (when workbookName is also null) in which case the current workbook and sheet is + assumed. + @param refStrPart1 the single cell reference or first part of the area reference. Must not + be null. + @param refStrPart2 the second part of the area reference. For single cell references this + parameter must be null + @param isA1Style specifies the format for refStrPart1 and refStrPart2. + Pass true for 'A1' style and false for 'R1C1' style. + TODO - currently POI only supports 'A1' reference style + @return a {@link RefEval} or {@link AreaEval} + + + This class Creates OperationEval instances To help evaluate OperationPtg + formula Tokens. + + @author Josh Micich + + + returns the OperationEval concrete impl instance corresponding + to the supplied operationPtg + + + Represents a syntactic element from a formula by encapsulating the corresponding Ptg + Token. Each ParseNode may have child ParseNodes in the case when the wrapped + Ptg is non-atomic. + + + Collects the array of Ptg Tokens for the specified tree. + + + The IF() function Gets marked up with two or three tAttr Tokens. + Similar logic will be required for CHOOSE() when it is supported + + See excelfileformat.pdf sec 3.10.5 "tAttr (19H) + + + + @author Josh Micich + + + Used for non-formula cells, primarily To keep track of the referencing (formula) cells. + + @author Josh Micich + + + @author Josh Micich + + + Extern sheet index of sheet where moving is occurring + + + Sheet name of the sheet where moving is occurring, + used for updating XSSF style 3D references on row shifts. + + + Create an instance for Shifting row. + + For example, this will be called on {@link NPOI.HSSF.UserModel.HSSFSheet#ShiftRows(int, int, int)} } + + + Create an instance for shifting sheets. + + For example, this will be called on {@link org.apache.poi.hssf.usermodel.HSSFWorkbook#setSheetOrder(String, int)} + + + @param ptgs - if necessary, will get modified by this method + @param currentExternSheetIx - the extern sheet index of the sheet that contains the formula being adjusted + @return true if a change was made to the formula tokens + + +

    + + + + + in-place modified ptg (if row move would cause Ptg to change), + deleted ref ptg (if row move causes an error), + or null (if no Ptg change is needed) +
    + + Call this on any ptg reference contained in a row of cells that was copied. + If the ptg reference is relative, the references will be shifted by the distance + that the rows were copied. + In the future similar functions could be written due to column copying or + individual cell copying. Just make sure to only call adjustPtgDueToRowCopy on + formula cells that are copied (unless row shifting, where references outside + of the shifted region need to be updated to reflect the shift, a copy is self-contained). + + @param ptg the ptg to shift + @return deleted ref ptg, in-place modified ptg, or null + If Ptg would be shifted off the first or last row of a sheet, return deleted ref + If Ptg needs to be changed, modifies Ptg in-place + If Ptg doesn't need to be changed, returns null + + + Modifies rptg in-place and return a reference to rptg if the cell reference + would move due to a row copy operation + Returns null or {@link #RefErrorPtg} if no change was made + + @param aptg + @return + + + Modifies aptg in-place and return a reference to aptg if the first or last row of + of the Area reference would move due to a row copy operation + Returns null or {@link #AreaErrPtg} if no change was made + + @param aptg + @return null, AreaErrPtg, or modified aptg + + + Formats sheet names for use in formula expressions. + + @author Josh Micich + + + Used to format sheet names as they would appear in cell formula expressions. + @return the sheet name UnChanged if there is no need for delimiting. Otherwise the sheet + name is enclosed in single quotes ('). Any single quotes which were already present in the + sheet name will be converted to double single quotes (''). + + + Convenience method for when a StringBuilder is already available + + @param out - sheet name will be Appended here possibly with delimiting quotes + + + @return true if the presence of the specified Char in a sheet name would + require the sheet name to be delimited in formulas. This includes every non-alphanumeric + Char besides Underscore '_'. + + + Used to decide whether sheet names like 'AB123' need delimiting due to the fact that they + look like cell references. +

    + This code is currently being used for translating formulas represented with Ptg + tokens into human readable text form. In formula expressions, a sheet name always has a + trailing '!' so there is little chance for ambiguity. It doesn't matter too much what this + method returns but it is worth noting the likely consumers of these formula text strings: +

      +
    1. POI's own formula parser
    2. +
    3. Visual reading by human
    4. +
    5. VBA automation entry into Excel cell contents e.g. ActiveCell.Formula = "=c64!A1"
    6. +
    7. Manual entry into Excel cell contents
    8. +
    9. Some third party formula parser
    10. +
    + + At the time of writing, POI's formula parser tolerates cell-like sheet names in formulas + with or without delimiters. The same goes for Excel(2007), both manual and automated entry. +

    + For better or worse this implementation attempts to replicate Excel's formula renderer. + Excel uses range checking on the apparent 'row' and 'column' components. Note however that + the maximum sheet size varies across versions. + @see org.apache.poi.hssf.util.CellReference + + + Note - this method assumes the specified rawSheetName has only letters and digits. It + cannot be used to match absolute or range references (using the dollar or colon char). + + Some notable cases: +

    + + + + + + + + + + +
    Input Result Comments
    "A1" true
    "a111" true
    "AA" false
    "aa1" true
    "A1A" false
    "A1A1" false
    "A$1:$C$20" falseNot a plain cell reference
    "SALES20080101" trueStill needs delimiting even though well out of range
    + + @return true if there is any possible ambiguity that the specified rawSheetName + could be interpreted as a valid cell name. +
    + + + + @author Josh Micich + + + @return whether cell at rowIndex and columnIndex is a subtotal + @see org.apache.poi.ss.formula.functions.Subtotal + + + Should be implemented by any {@link Ptg} subclass that needs a workbook To render its formula. +
    + + For POI internal use only + + @author Josh Micich +
    + + Evaluates formula cells.

    + + For performance reasons, this class keeps a cache of all previously calculated intermediate + cell values. Be sure To call {@link #ClearCache()} if any workbook cells are Changed between + calls To evaluate~ methods on this class.
    + + For POI internal use only + + @author Josh Micich + + + also for debug use. Used in ToString methods + + + Should be called whenever there are Changes To input cells in the evaluated workbook. + Failure To call this method after changing cell values will cause incorrect behaviour + of the evaluate~ methods of this class + + + Should be called To tell the cell value cache that the specified (value or formula) cell + Has Changed. + + + Should be called To tell the cell value cache that the specified cell Has just been + deleted. + + + Case-insensitive. + @return -1 if sheet with specified name does not exist + + + @return never null, never {@link BlankEval} + + + Adds the current cell reference to the exception for easier debugging. + Would be nice to get the formula text as well, but that seems to require + too much digging around and casting to get the FormulaRenderingWorkbook. + + + Gets the value from a non-formula cell. + @param cell may be null + @return {@link BlankEval} if cell is null or blank, never null + + + whether print detailed messages about the next formula evaluation + + + Calculates the number of tokens that the evaluator should skip upon reaching a tAttrSkip. + + @return the number of tokens (starting from startIndex+1) that need to be skipped + to achieve the specified distInBytes skip distance. + + + Dereferences a single value from any AreaEval or RefEval evaluation result. + If the supplied evaluationResult is just a plain value, it is returned as-is. + @return a NumberEval, StringEval, BoolEval, + BlankEval or ErrorEval. Never null. + + + returns an appropriate Eval impl instance for the Ptg. The Ptg must be + one of: Area3DPtg, AreaPtg, ReferencePtg, Ref3DPtg, IntPtg, NumberPtg, + StringPtg, BoolPtg
    special Note: OperationPtg subtypes cannot be + passed here! +
    + + Used by the lazy ref evals whenever they need To Get the value of a contained cell. + + + Whether to ignore missing references to external workbooks and + use cached formula results in the main workbook instead. +

    + In some cases exetrnal workbooks referenced by formulas in the main workbook are not avaiable. + With this method you can control how POI handles such missing references: +

      +
    • by default ignoreMissingWorkbooks=false and POI throws {@link WorkbookNotFoundException} + if an external reference cannot be resolved
    • +
    • if ignoreMissingWorkbooks=true then POI uses cached formula result + that already exists in the main workbook
    • +
    +

    + @param ignore whether to ignore missing references to external workbooks + @see Bug 52575 for details +
    + + Return a collection of functions that POI can evaluate + + @return names of functions supported by POI + + + Return a collection of functions that POI does not support + + @return names of functions NOT supported by POI + + + Register a ATP function in runtime. + + @param name the function name + @param func the functoin to register + @throws IllegalArgumentException if the function is unknown or already registered. + @since 3.8 beta6 + + + Register a function in runtime. + + @param name the function name + @param func the functoin to register + @throws IllegalArgumentException if the function is unknown or already registered. + @since 3.8 beta6 + + + Helper for Shifting rows up or down + + This abstract class exists to consolidate duplicated code between XSSFRowShifter and HSSFRowShifter (currently methods sprinkled throughout HSSFSheet) + + + Shifts, grows, or shrinks the merged regions due to a row Shift. + Merged regions that are completely overlaid by Shifting will be deleted. + + @param startRow the row to start Shifting + @param endRow the row to end Shifting + @param n the number of rows to shift + @return an array of affected merged regions, doesn't contain deleted ones + + + Updated named ranges + + + Update formulas. + + + Update the formulas in specified row using the formula Shifting policy specified by Shifter + + @param row the row to update the formulas on + @param Shifter the formula Shifting policy + + + Shift the Hyperlink anchors (not the hyperlink text, even if the hyperlink + is of type LINK_DOCUMENT and refers to a cell that was Shifted). Hyperlinks + do not track the content they point to. + + @param Shifter the formula Shifting policy + + + + No diagional border + + + + + Backward diagional border, from left-top to right-bottom + + + + + Forward diagional border, from right-top to left-bottom + + + + + Both forward and backward diagional border + + + + Default CellCopyPolicy, uses default policy + For custom CellCopyPolicy, use {@link Builder} class + + + Copy constructor + + @param other policy to copy + + + Builder class for CellCopyPolicy + + + @return the copyCellValue + + + @return the copyCellStyle + + + @return the copyCellFormula + + + @return the copyHyperlink + + + @return the mergeHyperlink + + + @return the copyRowHeight + + + If condenseRows is true, a discontinuities in srcRows will be Removed when copied to destination + For example: + Sheet.CopyRows({Row(1), Row(2), Row(5)}, 11, policy) results in rows 1, 2, and 5 + being copied to rows 11, 12, and 13 if condenseRows is True, or rows 11, 11, 15 if condenseRows is false + @return the condenseRows + + + @return the copyMergedRegions + + + + Data for a Bar Chart + + + + + + @return list of all series. + + + @return data source used for category axis data. + + + @return data source used for value axis. + + + Return number of points contained by data source. + + @return number of points contained by data source + + + Returns point value at specified index. + + @param index index to value from + @return point value at specified index. + @throws {@code IndexOutOfBoundsException} if index + parameter not in range {@code 0 <= index <= pointCount} + + + Returns {@code true} if charts data source is valid cell range. + + @return {@code true} if charts data source is valid cell range + + + Returns {@code true} if data source points should be treated as numbers. + + @return {@code true} if data source points should be treated as numbers + + + Returns formula representation of the data source. It is only applicable + for data source that is valid cell range. + + @return formula representation of the data source + @throws {@code UnsupportedOperationException} if the data source is not a + reference. + + + Sets the title of the series as a string literal. + + @param title + + + Sets the title of the series as a cell reference. + + @param titleReference + + + @return title as string literal. + + + @return title as cell reference. + + + @return title type. + + + + Data for a Line Chart + + + + + + @return list of all series. + + + @return data source used for category axis data. + + + @return data source used for value axis. + + + Specifies the possible crossing states of an axis. + + @author Roman Kashitsyn + + + Specifies the value axis shall cross the category axis + between data markers. + + + Specifies the value axis shall cross the category axis at + the midpoint of a category. + + + Specifies the possible crossing points for an axis. + + @author Roman Kashitsyn + + + The category axis crosses at the zero point of the value axis (if + possible), or the minimum value (if the minimum is greater than zero) or + the maximum (if the maximum is less than zero). + + + The axis crosses at the maximum value. + + + Axis crosses at the minimum value of the chart. + + + Specifies the possible ways to place a picture on a data point, series, wall, or floor. + + @author Roman Kashitsyn + + + Specifies that the values on the axis shall be reversed + so they go from maximum to minimum. + + + Specifies that the axis values shall be in the usual + order, minimum to maximum. + + + Enumeration of all possible axis positions. + + @author Roman Kashitsyn + + + High level representation of chart axis. + + @author Roman Kashitsyn + + + @return axis id + + + get or set axis position + + + get or set axis number format + + + @return true if log base is defined, false otherwise + + + @param logBase a number between 2 and 1000 (inclusive) + @return axis log base or 0.0 if not Set + @throws ArgumentException if log base not within allowed range + + + @return true if minimum value is defined, false otherwise + + + get or set axis minimum + 0.0 if not Set + + + @return true if maximum value is defined, false otherwise + + + get or set axis maximum + 0.0 if not Set + + + get or set axis orientation + + + get or set axis cross type + + + Declare this axis cross another axis. + @param axis that this axis should cross + + + @return visibility of the axis. + + + @return major tick mark. + + + @return minor tick mark. + + + + A factory for different chart axis. + + @author Roman Kashitsyn + + + + returns new value axis + + + + + + + A base for all chart data types. + + + @author Roman Kashitsyn + + + + + Fills a chart with data specified by implementation. + + a chart to fill in + chart axis to use + + + + A factory for different chart data types. + + + @author Roman Kashitsyn + + + + + returns an appropriate ScatterChartData instance + + + + + + High level representation of chart legend. + + @author Roman Kashitsyn + + + + legend position + + + + + + If true the legend is positioned over the chart area otherwise + the legend is displayed next to it. + Default is no overlay. + + + + + Specifies the possible ways to store a chart element's position. + + + @author Roman Kashitsyn + + + + + Specifies that the Width or Height shall be interpreted as the Right or Bottom of the chart element. + + + + + Specifies that the Width or Height shall be interpreted as the width or Height of the chart element. + + + + + Specifies whether to layout the plot area by its inside (not including axis + and axis labels) or outside (including axis and axis labels). + + + @author Roman Kashitsyn + + + + + Specifies that the plot area size shall determine the size of the plot area, not including the tick marks and axis labels. + + + + + Specifies that the plot area size shall determine the + size of the plot area, the tick marks, and the axis + labels. + + + + + Enumeration of all possible chart legend positions. + + + @author Roman Kashitsyn + + + + High level representation of chart element manual layout. + + @author Roman Kashitsyn + + + Sets the layout target. + @param target new layout target. + + + Returns current layout target. + @return current layout target + + + Sets the x-coordinate layout mode. + @param mode new x-coordinate layout mode. + + + Returns current x-coordinnate layout mode. + @return current x-coordinate layout mode. + + + Sets the y-coordinate layout mode. + @param mode new y-coordinate layout mode. + + + Returns current y-coordinate layout mode. + @return current y-coordinate layout mode. + + + Returns the x location of the chart element. + @return the x location (left) of the chart element or 0.0 if + not Set. + + + Specifies the x location (left) of the chart element as a + fraction of the width of the chart. If Left Mode is Factor, + then the position is relative to the default position for the + chart element. + + + Returns current y location of the chart element. + @return the y location (top) of the chart element or 0.0 if not + Set. + + + Specifies the y location (top) of the chart element as a + fraction of the height of the chart. If Top Mode is Factor, + then the position is relative to the default position for the + chart element. + + + Specifies how to interpret the Width element for this manual + layout. + @param mode new width layout mode of this manual layout. + + + Returns current width mode of this manual layout. + @return width mode of this manual layout. + + + Specifies how to interpret the Height element for this manual + layout. + @param mode new height mode of this manual layout. + + + Returns current height mode of this + @return height mode of this manual layout. + + + Specifies the width (if Width Mode is Factor) or right (if + Width Mode is Edge) of the chart element as a fraction of the + width of the chart. + @param ratio a fraction of the width of the chart. + + + Returns current fraction of the width of the chart. + @return fraction of the width of the chart or 0.0 if not Set. + + + Specifies the height (if Height Mode is Factor) or bottom (if + Height Mode is edge) of the chart element as a fraction of the + height of the chart. + @param ratio a fraction of the height of the chart. + + + Returns current fraction of the height of the chart. + @return fraction of the height of the chart or 0.0 if not Set. + + + Abstraction of chart element that can be positioned with manual + layout. + + @author Roman Kashitsyn + + + Returns manual layout for the chart element. + @return manual layout for the chart element. + + + Data for a Scatter Chart + + + @param xs data source to be used for X axis values + @param ys data source to be used for Y axis values + @return a new scatter charts series + + + @return list of all series + + + Represents scatter charts serie. + @author Roman Kashitsyn + + + @return data source used for X axis values + + + @return data source used for Y axis values + + + @author Roman Kashitsyn + + + @return cross between type + + + @param crossBetween cross between type + + + High level representation for the Color Scale / Colour Scale / + Color Gradient Formatting component of Conditional Formatting Settings + + + + get or sets the list of colours that are interpolated + between.The number must match {@link #getNumControlPoints()} + + + Gets the list of thresholds + + + Creates a new, empty Threshold + + + The Threshold / CFVO / Conditional Formatting Value Object. +

    This defines how to calculate the ranges for a conditional + formatting rule, eg which values Get a Green Traffic Light + icon and which Yellow or Red.

    +
    + + Get the Range Type used + + + Changes the Range Type used + +

    If you change the range type, you need to + ensure that the Formula and Value parameters + are compatible with it before saving

    + Formula to use to calculate the threshold, + or null if no formula +
    + + Sets the formula used to calculate the threshold, + or unsets it if null is given. + Gets the value used for the threshold, or + null if there isn't one. + + + Number / Parameter + + + The minimum value from the range + + + The maximum value from the range + + + Percent of the way from the mi to the max value in the range + + + The minimum value of the cell that is in X percentile of the range + + + Formula result + + + Numeric ID of the type + + + Name (system) of the type + + + Represents a type of a conditional formatting rule + + + This conditional formatting rule compares a cell value + to a formula calculated result, using an operator + + + This conditional formatting rule contains a formula to evaluate. + When the formula result is true, the cell is highlighted. + + + This conditional formatting rule contains a color scale, + with the cell background set according to a gradient. + + + This conditional formatting rule sets a data bar, with the + cell populated with bars based on their values + + + This conditional formatting rule that files the values + + + This conditional formatting rule sets a data bar, with the + cell populated with bars based on their values + + + High level representation for the DataBar Formatting + component of Conditional Formatting Settings + + + Is the bar Drawn from Left-to-Right, or from + Right-to-Left + + + Should Icon + Value be displayed, or only the Icon? + + + How much of the cell width, in %, should be given to + the min value? + + + How much of the cell width, in %, should be given to + the max value? + + + The threshold that defines "everything from here down is minimum" + + + The threshold that defines "everything from here up is maximum" + + + Enum mapping the values of STDataConsolidateFunction + + + A format that formats a double as Excel would, ignoring FieldPosition. + All other operations are unsupported. + + + + Represents a XSSF-style color (based on either a + {@link NPOI.XSSF.UserModel.XSSFColor} or a + {@link NPOI.HSSF.Record.Common.ExtendedColor} + + + A bool value indicating the color is automatic + + + A bool value indicating the color is indexed + + + A bool value indicating the color is RGB / ARGB + + + A bool value indicating the color is from a Theme + + + Indexed Color value, if {@link #isIndexed()} is true + + + Index of Theme color, if {@link #isThemed()} is true + + + Standard Red Green Blue ctColor value (RGB). + If there was an A (Alpha) value, it will be stripped. + + + Standard Alpha Red Green Blue ctColor value (ARGB). + + + RGB or ARGB or null + + + Standard Red Green Blue ctColor value (RGB) with applied tint. + Alpha values are ignored. + + + Return the ARGB value in hex format, eg FF00FF00. + Works for both regular and indexed colours. + Sets the ARGB value from hex format, eg FF0077FF. + Only works for regular (non-indexed) colours + + + Specifies the tint value applied to the ctColor. + +

    + If tint is supplied, then it is applied to the RGB value of the ctColor to determine the final + ctColor applied. +

    +

    + The tint value is stored as a double from -1.0 .. 1.0, where -1.0 means 100% darken and + 1.0 means 100% lighten. Also, 0.0 means no Change. +

    +

    + In loading the RGB value, it is Converted to HLS where HLS values are (0..HLSMAX), where + HLSMAX is currently 255. +

    + Here are some examples of how to apply tint to ctColor: +
    +
    +             If (tint < 0)
    +             Lum' = Lum * (1.0 + tint)
    +            
    +             For example: Lum = 200; tint = -0.5; Darken 50%
    +             Lum' = 200 * (0.5) => 100
    +             For example: Lum = 200; tint = -1.0; Darken 100% (make black)
    +             Lum' = 200 * (1.0-1.0) => 0
    +             If (tint > 0)
    +             Lum' = Lum * (1.0-tint) + (HLSMAX - HLSMAX * (1.0-tint))
    +             For example: Lum = 100; tint = 0.75; Lighten 75%
    +            
    +             Lum' = 100 * (1-.75) + (HLSMAX - HLSMAX*(1-.75))
    +             = 100 * .25 + (255 - 255 * .25)
    +             = 25 + (255 - 63) = 25 + 192 = 217
    +             For example: Lum = 100; tint = 1.0; Lighten 100% (make white)
    +             Lum' = 100 * (1-1) + (HLSMAX - HLSMAX*(1-1))
    +             = 100 * 0 + (255 - 255 * 0)
    +             = 0 + (255 - 0) = 255
    +             
    +
    + + @return the tint value +
    + + the different types of possible underline formatting + + @author Gisella Bronzetti + + + Single-line underlining under each character in the cell. + The underline is drawn through the descenders of + characters such as g and p.. + + + Double-line underlining under each character in the + cell. underlines are drawn through the descenders of + characters such as g and p. + + + Single-line accounting underlining under each + character in the cell. The underline is drawn under the + descenders of characters such as g and p. + + + Double-line accounting underlining under each + character in the cell. The underlines are drawn under + the descenders of characters such as g and p. + + + No underline. + + +

    Format class that handles Excel style fractions, such as "# #/#" and "#/###"

    + +

    As of this writing, this is still not 100% accurate, but it does a reasonable job + of trying to mimic Excel's fraction calculations. It does not currently + maintain Excel's spacing.

    + +

    This class relies on a method lifted nearly verbatim from org.apache.math.fraction. + If further uses for Commons Math are found, we will consider Adding it as a dependency. + For now, we have in-lined the one method to keep things simple.

    +
    + + Single parameter ctor + @param denomFormatString The format string for the denominator + + + + Get or set the Icon Set used + + + + Changes the Icon Set used + +

    If the new Icon Set has a different number of + icons to the old one, you must update the + thresholds before saving!

    + Should Icon + Value be displayed, or only the Icon? +
    + + Gets the list of thresholds + Sets the of thresholds. The number must match + {@link IconSet#num} for the current {@link #getIconSet()} + + + Creates a new, empty Threshold + + + Green Up / Yellow Side / Red Down arrows + + + Grey Up / Side / Down arrows + + + Green / Yellow / Red flags + + + Green / Yellow / Red traffic lights (no background). Default + + + Green / Yellow / Red traffic lights on a black square background. + Note, MS-XLS docs v20141018 say this is id=5 but seems to be id=4 + + + Green Circle / Yellow Triangle / Red Diamond. + Note, MS-XLS docs v20141018 say this is id=4 but seems to be id=5 + + + Green Tick / Yellow ! / Red Cross on a circle background + + + Green Tick / Yellow ! / Red Cross (no background) + + + Green Up / Yellow NE / Yellow SE / Red Down arrows + + + Grey Up / NE / SE / Down arrows + + + Red / Light Red / Grey / Black traffic lights + + + Green / Yellow / Red / Black traffic lights + + + Numeric ID of the icon set + + + How many icons in the set + + + Name (system) of the set + + + Types of ignored workbook and worksheet error. + + TODO Implement these for HSSF too, using FeatFormulaErr2, + see bugzilla bug #46136 for details + + + ????. Probably XSSF-only. + + + Whether to check for references to empty cells. + HSSF + XSSF. + + + Whether to check for calculation/Evaluation errors. + HSSF + XSSF. + + + Whether to check formulas in the range of the shared feature + that are inconsistent with formulas in neighbouring cells. + HSSF + XSSF. + + + Whether to check formulas in the range of the shared feature + with references to less than the entirety of a range Containing + continuous data. + HSSF + XSSF. + + + ????. Is this XSSF-specific the same as performDataValidation + in HSSF? + + + Whether to check the format of string values and warn + if they look to actually be numeric values. + HSSF + XSSF. + + + ????. Is this XSSF-specific the same as CheckDateTimeFormats + in HSSF? + + + Whether to check for unprotected formulas. + HSSF + XSSF. + + + A deprecated indexing scheme for colours that is still required for some records, and for backwards + compatibility with OLE2 formats. + +

    + Each element corresponds to a color index (zero-based). When using the default indexed color palette, + the values are not written out, but instead are implied. When the color palette has been modified from default, + then the entire color palette is used. +

    + + @author Yegor Kozlov +
    + + + + @param index the index of the color + @return the corresponding IndexedColors enum + @throws IllegalArgumentException if index is not a valid IndexedColors + @since 3.15-beta2 + + + Returns index of this color + + @return index of this color + + + Regular expression matching a Structured Reference (Table syntax) for XSSF table expressions. + Public for unit tests + @see + Excel Structured Reference Syntax + + + + XSSF Only! + High level abstraction of table in a workbook. + + + Get the top-left column index relative to the sheet + @return table start column index on sheet + + + Get the top-left row index on the sheet + @return table start row index on sheet + + + Get the bottom-right column index on the sheet + @return table end column index on sheet + + + Get the bottom-right row index + @return table end row index on sheet + + + Get the name of the table. + @return table name + + + Returns the index of a given named column in the table (names are case insensitive in XSSF). + Note this list is lazily loaded and cached for performance. + Changes to the underlying table structure are not reflected in later calls + unless XSSFTable.UpdateHeaders() is called to reset the cache. + @param columnHeader the column header name to Get the table column index of + @return column index corresponding to columnHeader + + + Returns the sheet name that the table belongs to. + + + Returns true iff the table has a 'Totals' row + + + Represents autofiltering for the specified worksheet. + +

    + Filtering data is a quick and easy way to find and work with a subset of data in a range of cells or table. + For example, you can filter to see only the values that you specify, filter to see the top or bottom values, + or filter to quickly see duplicate values. +

    + + TODO YK: For now (Aug 2010) POI only supports Setting a basic autofilter on a range of cells. + In future, when we support more auto-filter functions like custom criteria, sort, etc. we will add + corresponding methods to this interface. +
    + + + High level representation for Border Formatting component + of Conditional Formatting settings + + + + + The enumeration value indicating the line style of a border in a cell + + + + + No border + + + + + Thin border + + + + + Medium border + + + + + dash border + + + + + dot border + + + + + Thick border + + + + + double-line border + + + + + hair-line border + + + + + Medium dashed border + + + + + dash-dot border + + + + + medium dash-dot border + + + + + dash-dot-dot border + + + + + medium dash-dot-dot border + + + + + slanted dash-dot border + + + + Utility to identify built-in formats. The following is a list of the formats as + returned by this class.

    +

    + 0, "General"
    + 1, "0"
    + 2, "0.00"
    + 3, "#,##0"
    + 4, "#,##0.00"
    + 5, "$#,##0_);($#,##0)"
    + 6, "$#,##0_);[Red]($#,##0)"
    + 7, "$#,##0.00);($#,##0.00)"
    + 8, "$#,##0.00_);[Red]($#,##0.00)"
    + 9, "0%"
    + 0xa, "0.00%"
    + 0xb, "0.00E+00"
    + 0xc, "# ?/?"
    + 0xd, "# ??/??"
    + 0xe, "m/d/yy"
    + 0xf, "d-mmm-yy"
    + 0x10, "d-mmm"
    + 0x11, "mmm-yy"
    + 0x12, "h:mm AM/PM"
    + 0x13, "h:mm:ss AM/PM"
    + 0x14, "h:mm"
    + 0x15, "h:mm:ss"
    + 0x16, "m/d/yy h:mm"
    +

    + // 0x17 - 0x24 reserved for international and undocumented + 0x25, "#,##0_);(#,##0)"
    + 0x26, "#,##0_);[Red](#,##0)"
    + 0x27, "#,##0.00_);(#,##0.00)"
    + 0x28, "#,##0.00_);[Red](#,##0.00)"
    + 0x29, "_(*#,##0_);_(*(#,##0);_(* \"-\"_);_(@_)"
    + 0x2a, "_($*#,##0_);_($*(#,##0);_($* \"-\"_);_(@_)"
    + 0x2b, "_(*#,##0.00_);_(*(#,##0.00);_(*\"-\"??_);_(@_)"
    + 0x2c, "_($*#,##0.00_);_($*(#,##0.00);_($*\"-\"??_);_(@_)"
    + 0x2d, "mm:ss"
    + 0x2e, "[h]:mm:ss"
    + 0x2f, "mm:ss.0"
    + 0x30, "##0.0E+0"
    + 0x31, "@" - This is text format.
    + 0x31 "text" - Alias for "@"
    +

    + + @author Yegor Kozlov + + Modified 6/17/09 by Stanislav Shor - positive formats don't need starting '(' + + + + The first user-defined number format starts at 164. + + + @return array of built-in data formats + + + Get the format string that matches the given format index + + @param index of a built in format + @return string represented at index of format or null if there is not a built-in format at that index + + + Get the format index that matches the given format string. + +

    + Automatically converts "text" to excel's format string to represent text. +

    + @param pFmt string matching a built-in format + @return index of format or -1 if undefined. +
    + + High level representation of a cell in a row of a spreadsheet. +

    + Cells can be numeric, formula-based or string-based (text). The cell type + specifies this. String cells cannot conatin numbers and numeric cells cannot + contain strings (at least according to our model). Client apps should do the + conversions themselves. Formula cells have the formula string, as well as + the formula result, which can be numeric or string. +

    +

    + Cells should have their number (0 based) before being Added to a row. +

    +
    + + + zero-based column index of a column in a sheet. + + + + + zero-based row index of a row in the sheet that contains this cell + + + + + the sheet this cell belongs to + + + + + the row this cell belongs to + + + + + Set the cells type (numeric, formula or string) + +

    If the cell currently contains a value, the value will + be converted to match the new type, if possible. Formatting + is generally lost in the process however.

    +

    If what you want to do is get a String value for your + numeric cell, stop!. This is not the way to do it. + Instead, for fetching the string value of a numeric or boolean + or date cell, use {@link DataFormatter} instead.

    +
    + + + Set the cells type (numeric, formula or string) + + + + + + Only valid for formula cells + + + + + Set a numeric value for the cell + + the numeric value to set this cell to. For formulas we'll set the + precalculated value, for numerics we'll set its value. For other types we will change + the cell to a numeric cell and set its value. + + + + + Set a error value for the cell + + the error value to set this cell to. For formulas we'll set the + precalculated value , for errors we'll set its value. For other types we will change + the cell to an error cell and set its value. + + + + + Converts the supplied date to its equivalent Excel numeric value and Sets that into the cell. + + the numeric value to set this cell to. For formulas we'll set the + precalculated value, for numerics we'll set its value. For other types we will change + the cell to a numerics cell and set its value. + + + + + Set a rich string value for the cell. + + value to set the cell to. For formulas we'll set the formula + string, for String cells we'll set its value. For other types we will + change the cell to a string cell and set its value. + If value is null then we will change the cell to a Blank cell. + + + + + Set a string value for the cell. + + value to set the cell to. For formulas we'll set the formula + string, for String cells we'll set its value. For other types we will + change the cell to a string cell and set its value. + If value is null then we will change the cell to a blank cell. + + + + + Copy the cell to the target index. If the target cell exists, a new cell will be inserted before the existing cell. + + target index + the new copied cell object + + + + Return a formula for the cell + + if the cell type returned by GetCellType() is not CELL_TYPE_FORMULA + + + + Sets formula for this cell. + + the formula to Set, e.g. "SUM(C4:E4)". + + + + Get the value of the cell as a number. + + if the cell type returned by GetCellType() is CELL_TYPE_STRING + if the cell value isn't a parsable double + + + + Get the value of the cell as a date. + + if the cell type returned by GetCellType() is CELL_TYPE_STRING + if the cell value isn't a parsable double + + + + Get the value of the cell RichTextString + + + + + Get the value of the cell as an error code. + + + + + Get the value of the cell as a string + + + + + Set a bool value for the cell + + + + + + Get the value of the cell as a bool. + + + + + get or set the cell's style. + If set the style for the cell. The style should be an CellStyle created/retreived from the Workbook. + To change the style of a cell without affecting other cells that use the same style, + use CellUtil#setCellStyleProperties + + + + + Sets this cell as the active cell for the worksheet + + + + Gets the address of this cell + + @return A1 style address of this cell + @since 3.14beta2 + + + + comment associated with this cell + + + + + Removes the comment for this cell, if there is one. + + + + + hyperlink associated with this cell + + + + + Removes the hyperlink for this cell, if there is one. + + + + + Only valid for array formula cells + + range of the array formula group that the cell belongs to. + + + + if this cell is part of group of cells having a common array formula. + + + + Gets the number of cells in this range. + @return height * width + + + @return the text format of this range. Single cell ranges are formatted + like single cell references (e.g. 'A1' instead of 'A1:A1'). + + + @return the cell at relative coordinates (0,0). Never null. + + + @param relativeRowIndex must be between 0 and height-1 + @param relativeColumnIndex must be between 0 and width-1 + @return the cell at the specified coordinates. Never null. + + + @return a flattened array of all the cells in this {@link CellRange} + + + @return a 2-D array of all the cells in this {@link CellRange}. The first + array dimension is the row index (values 0...height-1) + and the second dimension is the column index (values 0...width-1) + + + + the Cell should be auto-sized to shrink to fit if the text is too long + + + + get the index within the Workbook (sequence within the collection of ExtnededFormat objects) + @return unique index number of the underlying record this style represents (probably you don't care + unless you're comparing which one is which) + + + get the index of the format + @see DataFormat + + + Get the format string + + + set the font for this style + @param font a font object Created or retreived from the Workbook object + @see Workbook#CreateFont() + @see Workbook#GetFontAt(short) + + + Gets the index of the font for this style + @see Workbook#GetFontAt(short) + + + get whether the cell's using this style are to be hidden + @return hidden - whether the cell using this style should be hidden + + + get whether the cell's using this style are to be locked + @return hidden - whether the cell using this style should be locked + + + get the type of horizontal alignment for the cell + @return align - the type of alignment + @see #ALIGN_GENERAL + @see #ALIGN_LEFT + @see #ALIGN_CENTER + @see #ALIGN_RIGHT + @see #ALIGN_FILL + @see #ALIGN_JUSTIFY + @see #ALIGN_CENTER_SELECTION + + + get whether the text should be wrapped + @return wrap text or not + + + get the type of vertical alignment for the cell + @return align the type of alignment + @see #VERTICAL_TOP + @see #VERTICAL_CENTER + @see #VERTICAL_BOTTOM + @see #VERTICAL_JUSTIFY + + + get the degree of rotation for the text in the cell + + Note: HSSF uses values from -90 to 90 degrees, whereas XSSF + uses values from 0 to 180 degrees. The implementations of this method will map between these two value-ranges + accordingly, however the corresponding getter is returning values in the range mandated by the current type + of Excel file-format that this CellStyle is applied to. + + + @return rotation degrees (between -90 and 90 degrees) + + + get the number of spaces to indent the text in the cell + @return indent - number of spaces + + + get the type of border to use for the left border of the cell + @return border type + @see #BORDER_NONE + @see #BORDER_THIN + @see #BORDER_MEDIUM + @see #BORDER_DASHED + @see #BORDER_DOTTED + @see #BORDER_THICK + @see #BORDER_DOUBLE + @see #BORDER_HAIR + @see #BORDER_MEDIUM_DASHED + @see #BORDER_DASH_DOT + @see #BORDER_MEDIUM_DASH_DOT + @see #BORDER_DASH_DOT_DOT + @see #BORDER_MEDIUM_DASH_DOT_DOT + @see #BORDER_SLANTED_DASH_DOT + + + get the type of border to use for the right border of the cell + @return border type + @see #BORDER_NONE + @see #BORDER_THIN + @see #BORDER_MEDIUM + @see #BORDER_DASHED + @see #BORDER_DOTTED + @see #BORDER_THICK + @see #BORDER_DOUBLE + @see #BORDER_HAIR + @see #BORDER_MEDIUM_DASHED + @see #BORDER_DASH_DOT + @see #BORDER_MEDIUM_DASH_DOT + @see #BORDER_DASH_DOT_DOT + @see #BORDER_MEDIUM_DASH_DOT_DOT + @see #BORDER_SLANTED_DASH_DOT + + + get the type of border to use for the top border of the cell + @return border type + @see #BORDER_NONE + @see #BORDER_THIN + @see #BORDER_MEDIUM + @see #BORDER_DASHED + @see #BORDER_DOTTED + @see #BORDER_THICK + @see #BORDER_DOUBLE + @see #BORDER_HAIR + @see #BORDER_MEDIUM_DASHED + @see #BORDER_DASH_DOT + @see #BORDER_MEDIUM_DASH_DOT + @see #BORDER_DASH_DOT_DOT + @see #BORDER_MEDIUM_DASH_DOT_DOT + @see #BORDER_SLANTED_DASH_DOT + + + get the type of border to use for the bottom border of the cell + @return border type + @see #BORDER_NONE + @see #BORDER_THIN + @see #BORDER_MEDIUM + @see #BORDER_DASHED + @see #BORDER_DOTTED + @see #BORDER_THICK + @see #BORDER_DOUBLE + @see #BORDER_HAIR + @see #BORDER_MEDIUM_DASHED + @see #BORDER_DASH_DOT + @see #BORDER_MEDIUM_DASH_DOT + @see #BORDER_DASH_DOT_DOT + @see #BORDER_MEDIUM_DASH_DOT_DOT + @see #BORDER_SLANTED_DASH_DOT + + + get the color to use for the left border + + + get the color to use for the left border + @return the index of the color defInition + + + get the color to use for the top border + @return hhe index of the color defInition + + + get the color to use for the left border + @return the index of the color defInition + + + get the fill pattern (??) - set to 1 to fill with foreground color + @return fill pattern + + + get the background fill color + @return fill color + + + get the foreground fill color + @return fill color + + + Clones all the style information from another + CellStyle, onto this one. This + CellStyle will then have all the same + properties as the source, but the two may + be edited independently. + Any stylings on this CellStyle will be lost! + + The source CellStyle could be from another + Workbook if you like. This allows you to + copy styles from one Workbook to another. + + However, both of the CellStyles will need + to be of the same type (HSSFCellStyle or + XSSFCellStyle) + + + + Gets or sets the color to use for the diagional border + + The index of the color definition. + + + + Gets or sets the line type to use for the diagional border + + The line type. + + + + Gets or sets the type of diagional border + . + The border diagional type. + + + Gets the color object representing the current + background fill, resolving indexes using + the supplied workbook. + This will work for both indexed and rgb + defined colors. + + + Gets the color object representing the current + foreground fill, resolving indexes using + the supplied workbook. + This will work for both indexed and rgb + defined colors. + + + Mimics the 'data view' of a cell. This allows formula Evaluator + to return a CellValue instead of precasting the value to String + or Number or bool type. + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + + + @return Returns the boolValue. + + + @return Returns the numberValue. + + + @return Returns the stringValue. + + + @return Returns the cellType. + + + @return Returns the errorValue. + + + High level representation of a chart. + + @author Roman Kashitsyn + + + @return an appropriate ChartDataFactory implementation + + + @return an appropriate ChartAxisFactory implementation + + + @return chart legend instance + + + Delete current chart legend. + + + @return list of all chart axis + + + Plots specified data on the chart. + + @param data a data to plot + + + Move and Resize With Anchor Cells +

    + Specifies that the current drawing shall move and + resize to maintain its row and column anchors (i.e. the + object is anchored to the actual from and to row and column) +

    +
    + + Move With Cells but Do Not Resize +

    + Specifies that the current drawing shall move with its + row and column (i.e. the object is anchored to the + actual from row and column), but that the size shall remain absolute. +

    +

    + If Additional rows/columns are Added between the from and to locations of the drawing, + the drawing shall move its to anchors as needed to maintain this same absolute size. +

    +
    + + Do Not Move or Resize With Underlying Rows/Columns +

    + Specifies that the current start and end positions shall + be maintained with respect to the distances from the + absolute start point of the worksheet. +

    +

    + If Additional rows/columns are Added before the + drawing, the drawing shall move its anchors as needed + to maintain this same absolute position. +

    +
    + + A client anchor is attached to an excel worksheet. It anchors against a + top-left and bottom-right cell. + + @author Yegor Kozlov + + + Returns the column (0 based) of the first cell. + + @return 0-based column of the first cell. + + + Returns the column (0 based) of the second cell. + + @return 0-based column of the second cell. + + + Returns the row (0 based) of the first cell. + + @return 0-based row of the first cell. + + + Returns the row (0 based) of the second cell. + + @return 0-based row of the second cell. + + + Returns the x coordinate within the first cell + + @return the x coordinate within the first cell + + + Returns the y coordinate within the first cell + + @return the y coordinate within the first cell + + + Sets the y coordinate within the second cell + + @return the y coordinate within the second cell + + + Returns the x coordinate within the second cell + + @return the x coordinate within the second cell + + + s the anchor type +

    + 0 = Move and size with Cells, 2 = Move but don't size with cells, 3 = Don't move or size with cells. +

    + @return the anchor type + @see #MOVE_AND_RESIZE + @see #MOVE_DONT_RESIZE + @see #DONT_MOVE_AND_RESIZE +
    + + Sets whether this comment is visible. + + @return true if the comment is visible, false otherwise + + + + Get or set the address of the cell that this comment is attached to + + + + Set the address of the cell that this comment is attached to + + @param row + @param col + + + Return the row of the cell that Contains the comment + + @return the 0-based row of the cell that Contains the comment + + + Return the column of the cell that Contains the comment + + @return the 0-based column of the cell that Contains the comment + + + Name of the original comment author + + @return the name of the original author of the comment + + + Fetches the rich text string of the comment + + + Return defines position of this anchor in the sheet. + + The anchor is the yellow box/balloon that is rendered on top of the sheets + when the comment is visible. + + To associate a comment with a different cell, use {@link #setAddress}. + @return defines position of this anchor in the sheet + + + The conditional format operators used for "Highlight Cells That Contain..." rules. +

    + For example, "highlight cells that begin with "M2" and contain "Mountain Gear". +

    + + @author Dmitriy Kumshayev + @author Yegor Kozlov +
    + + 'Between' operator + + + 'Not between' operator + + + 'Equal to' operator + + + 'Not equal to' operator + + + 'Greater than' operator + + + 'Less than' operator + + + 'Greater than or equal to' operator + + + 'Less than or equal to' operator + + + The ConditionalFormatting class encapsulates all Settings of Conditional Formatting. + + The class can be used + +
      +
    • + to make a copy ConditionalFormatting Settings. +
    • + + + For example: +
      +             ConditionalFormatting cf = sheet.GetConditionalFormattingAt(index);
      +             newSheet.AddConditionalFormatting(cf);
      +             
      + +
    • + or to modify existing Conditional Formatting Settings (formatting regions and/or rules). +
    • +
    + + Use {@link NPOI.HSSF.UserModel.Sheet#getSheetConditionalFormatting()} to Get access to an instance of this class. + + To create a new Conditional Formatting Set use the following approach: + +
    +            
    +             // Define a Conditional Formatting rule, which triggers formatting
    +             // when cell's value is greater or equal than 100.0 and
    +             // applies patternFormatting defined below.
    +             ConditionalFormattingRule rule = sheet.CreateConditionalFormattingRule(
    +                 ComparisonOperator.GE,
    +                 "100.0", // 1st formula
    +                 null     // 2nd formula is not used for comparison operator GE
    +             );
    +            
    +             // Create pattern with red background
    +             PatternFormatting patternFmt = rule.CretePatternFormatting();
    +             patternFormatting.FillBackgroundColor(IndexedColor.RED.Index);
    +            
    +             // Define a region Containing first column
    +             Region [] regions =
    +             {
    +                 new Region(1,(short)1,-1,(short)1)
    +             };
    +            
    +             // Apply Conditional Formatting rule defined above to the regions
    +             sheet.AddConditionalFormatting(regions, rule);
    +             
    + + @author Dmitriy Kumshayev + @author Yegor Kozlov +
    + + @return array of CellRangeAddresss. Never null + + + Replaces an existing Conditional Formatting rule at position idx. + Excel allows to create up to 3 Conditional Formatting rules. + This method can be useful to modify existing Conditional Formatting rules. + + @param idx position of the rule. Should be between 0 and 2. + @param cfRule - Conditional Formatting rule + + + Add a Conditional Formatting rule. + Excel allows to create up to 3 Conditional Formatting rules. + + @param cfRule - Conditional Formatting rule + + + @return the Conditional Formatting rule at position idx. + + + @return number of Conditional Formatting rules. + + + Represents a description of a conditional formatting rule + + @author Dmitriy Kumshayev + @author Yegor Kozlov + + + Create a new border formatting structure if it does not exist, + otherwise just return existing object. + + @return - border formatting object, never returns null. + + + @return - border formatting object if defined, null otherwise + + + Create a new font formatting structure if it does not exist, + otherwise just return existing object. + + @return - font formatting object, never returns null. + + + @return - font formatting object if defined, null otherwise + + + Create a new pattern formatting structure if it does not exist, + otherwise just return existing object. + + @return - pattern formatting object, never returns null. + + + @return - pattern formatting object if defined, null otherwise + + + @return - databar / data-bar formatting object if defined, null otherwise + + + @return - icon / multi-state formatting object if defined, null otherwise + + + @return color scale / color grate formatting object if defined, null otherwise + + + Type of conditional formatting rule. +

    + MUST be either {@link #CONDITION_TYPE_CELL_VALUE_IS} or {@link #CONDITION_TYPE_FORMULA} +

    + + @return the type of condition +
    + + The comparison function used when the type of conditional formatting is Set to + {@link #CONDITION_TYPE_CELL_VALUE_IS} +

    + MUST be a constant from {@link ComparisonOperator} +

    + + @return the conditional format operator +
    + + The formula used to Evaluate the first operand for the conditional formatting rule. +

    + If the condition type is {@link #CONDITION_TYPE_CELL_VALUE_IS}, + this field is the first operand of the comparison. + If type is {@link #CONDITION_TYPE_FORMULA}, this formula is used + to determine if the conditional formatting is applied. +

    +

    + If comparison type is {@link #CONDITION_TYPE_FORMULA} the formula MUST be a Boolean function +

    + + @return the first formula +
    + + The formula used to Evaluate the second operand of the comparison when + comparison type is {@link #CONDITION_TYPE_CELL_VALUE_IS} and operator + is either {@link ComparisonOperator#BETWEEN} or {@link ComparisonOperator#NOT_BETWEEN} + + @return the second formula + + + An object that handles instantiating concrete + classes of the various instances one needs for + HSSF and XSSF. + Works around a major shortcoming in Java, where we + can't have static methods on interfaces or abstract + classes. + This allows you to get the appropriate class for + a given interface, without you having to worry + about if you're dealing with HSSF or XSSF, despite + Java being quite rubbish. + + + Creates a new RichTextString instance + @param text The text to Initialise the RichTextString with + + + Creates a new DataFormat instance + + + Creates a new Hyperlink, of the given type + + + Creates FormulaEvaluator - an object that Evaluates formula cells. + + @return a FormulaEvaluator instance + + + Creates a XSSF-style Color object, used for extended sheet + formattings and conditional formattings + + + get the format index that matches the given format string. + Creates a new format if one is not found. Aliases text to the proper format. + @param format string matching a built in format + @return index of format. + + + get the format string that matches the given format index + @param index of a format + @return string represented at index of format or null if there is not a format at that index + + + + Pattern to find a number FormatBase: "0" or "#" + + + Pattern to find "AM/PM" marker + + + A regex to find patterns like [$$-1009] and [$�-452]. + Note that we don't currently process these into locales + + + A regex to identify a fraction pattern. + This requires that replaceAll("\\?", "#") has already been called + + + A regex to strip junk out of fraction formats + + + A regex to detect if an alternate grouping character is used + in a numeric format + + + Cells formatted with a date or time format and which contain invalid date or time values + show 255 pound signs ("#"). + + + The decimal symbols of the locale used for formatting values. + + + The date symbols of the locale used for formatting values. + + + A default date format, if no date format was given + + + General FormatBase for whole numbers. + + + A default FormatBase to use when a number pattern cannot be Parsed. + + + For logging any problems we find + + + stores if the locale should change according to {@link LocaleUtil#getUserLocale()} + + + Creates a formatter using the {@link Locale#getDefault() default locale}. + + @param emulateCSV whether to emulate CSV output. + + + Creates a formatter using the given locale. + + + Creates a formatter using the given locale. + + @param emulateCSV whether to emulate CSV output. + + + Constructor + + + Return a FormatBase for the given cell if one exists, otherwise try to + Create one. This method will return null if the any of the + following is true: +
      +
    • the cell's style is null
    • +
    • the style's data FormatBase string is null or empty
    • +
    • the FormatBase string cannot be recognized as either a number or date
    • +
    + + @param cell The cell to retrieve a FormatBase for + @return A FormatBase for the FormatBase String +
    + + Create and return a FormatBase based on the FormatBase string from a cell's + style. If the pattern cannot be Parsed, return a default pattern. + + @param cell The Excel cell + @return A FormatBase representing the excel FormatBase. May return null. + + + Returns a default FormatBase for a cell. + @param cell The cell + @return a default FormatBase + + + Returns the Formatted value of an Excel date as a String based + on the cell's DataFormat. i.e. "Thursday, January 02, 2003" + , "01/02/2003" , "02-Jan" , etc. + + @param cell The cell + @return a Formatted date string + + + Returns the Formatted value of an Excel number as a String + based on the cell's DataFormat. Supported Formats include + currency, percents, decimals, phone number, SSN, etc.: + "61.54%", "$100.00", "(800) 555-1234". + + @param cell The cell + @return a Formatted number string + + + Formats the given raw cell value, based on the supplied + FormatBase index and string, according to excel style rules. + @see #FormatCellValue(Cell) + + + Performs Excel-style date formatting, using the + supplied Date and format + + + Formats the given raw cell value, based on the supplied + format index and string, according to excel style rules. + @see #formatCellValue(Cell) + + + + Returns the Formatted value of a cell as a String regardless + of the cell type. If the Excel FormatBase pattern cannot be Parsed then the + cell value will be Formatted using a default FormatBase. + + When passed a null or blank cell, this method will return an empty + String (""). Formulas in formula type cells will not be evaluated. + + + @param cell The cell + @return the Formatted cell value as a String + + + + Returns the Formatted value of a cell as a String regardless + of the cell type. If the Excel FormatBase pattern cannot be Parsed then the + cell value will be Formatted using a default FormatBase. + + When passed a null or blank cell, this method will return an empty + String (""). Formula cells will be evaluated using the given + {@link HSSFFormulaEvaluator} if the evaluator is non-null. If the + evaluator is null, then the formula String will be returned. The caller + is responsible for setting the currentRow on the evaluator + + + @param cell The cell (can be null) + @param evaluator The HSSFFormulaEvaluator (can be null) + @return a string value of the cell + + + + Sets a default number FormatBase to be used when the Excel FormatBase cannot be + Parsed successfully. Note: This is a fall back for when an error + occurs while parsing an Excel number FormatBase pattern. This will not + affect cells with the General FormatBase. + + + The value that will be passed to the FormatBase's FormatBase method (specified + by java.text.FormatBase#FormatBase) will be a double value from a + numeric cell. Therefore the code in the FormatBase method should expect a + Number value. + + + @param FormatBase A FormatBase instance to be used as a default + @see java.text.FormatBase#FormatBase + + + Adds a new FormatBase to the available formats. + + The value that will be passed to the FormatBase's FormatBase method (specified + by java.text.FormatBase#FormatBase) will be a double value from a + numeric cell. Therefore the code in the FormatBase method should expect a + Number value. + + @param excelformatStr The data FormatBase string + @param FormatBase A FormatBase instance + + + Update formats when locale has been changed + + @param observable usually this is our own Observable instance + @param localeObj only reacts on Locale objects + + + Workaround until we merge {@link DataFormatter} with {@link CellFormat}. + Constant, non-cachable wrapper around a {@link CellFormatResult} + + + Error style constants for error box + + + STOP style + + + WARNING style + + + INFO style + + + + get or set the error style for error box + + + + + Setting this allows an empty object as a valid value. Retrieve the settings for empty cells allowed. + @return True if this object should treats empty as valid value , false otherwise + + true if this object should treats empty as valid value, false otherwise + + + + Useful for list validation objects . + Useful only list validation objects . This method always returns false if the object isn't a list validation object + + + + Sets the behaviour when a cell which belongs to this object is selected + + true if an prompt box should be displayed , false otherwise + + + Sets the behaviour when an invalid value is entered + + true if an error box should be displayed , false otherwise + + + Sets the title and text for the prompt box . Prompt box is displayed when + the user selects a cell which belongs to this validation object . In + order for a prompt box to be displayed you should also use method + SetShowPromptBox( bool show ) + + @param title The prompt box's title + @param text The prompt box's text + + + @return Prompt box's title or null + + + @return Prompt box's text or null + + + Sets the title and text for the error box . Error box is displayed when + the user enters an invalid value int o a cell which belongs to this + validation object . In order for an error box to be displayed you should + also use method SetShowErrorBox( bool show ) + + @param title The error box's title + @param text The error box's text + + + @return Error box's title or null + + + @return Error box's text or null + + + + return data validation type of this constraint + + + + + + get or set then comparison operator for this constraint + + + + + If validation type is {@link ValidationType#LIST} + and formula1 was comma-separated literal values rather than a range or named range, + returns list of literal values. + Otherwise returns null. + + + + + get or set the formula for expression 1. May be null + + + + + get or set the formula for expression 2. May be null + + + + ValidationType enum + + + 'Any value' type - value not restricted + + + int ('Whole number') type + + + Decimal type + + + List type ( combo box type ) + + + Date type + + + Time type + + + String length type + + + Formula ( 'Custom' ) type + + + Condition operator enum + + + default value to supply when the operator type is not used + + + @author Radhakrishnan J + + + + + Contains methods for dealing with Excel dates. + @author Michael Harhen + @author Glen Stampoultzis (glens at apache.org) + @author Dan Sherman (dsherman at Isisph.com) + @author Hack Kampbjorn (hak at 2mba.dk) + @author Alex Jacoby (ajacoby at gmail.com) + @author Pavel Krupets (pkrupets at palmtreebusiness dot com) + @author Thies Wellpott + + + + The following patterns are used in {@link #isADateFormat(int, String)} + + + + Given a Calendar, return the number of days since 1899/12/31. + + the date + if set to true [use1904windowing]. + number of days since 1899/12/31 + + + + Return the number of days in prior years since 1900 + + a year (1900 < yr > 4000). + + number of days in years prior to yr + + + + Given a Date, Converts it into a double representing its internal Excel representation, + which Is the number of days since 1/1/1900. Fractional days represent hours, minutes, and seconds. + + Excel representation of Date (-1 if error - test for error by Checking for less than 0.1) + the Date + + + + Gets the excel date. + + The year. + The month. + The day. + The hour. + The minute. + The second. + Should 1900 or 1904 date windowing be used? + + + + + Given a Date, Converts it into a double representing its internal Excel representation, + which Is the number of days since 1/1/1900. Fractional days represent hours, minutes, and seconds. + + The date. + Should 1900 or 1904 date windowing be used? + Excel representation of Date (-1 if error - test for error by Checking for less than 0.1) + + + + Given an Excel date with using 1900 date windowing, and converts it to a java.util.Date. + Excel Dates and Times are stored without any timezone + information. If you know (through other means) that your file + uses a different TimeZone to the system default, you can use + this version of the getJavaDate() method to handle it. + + The Excel date. + null if date is not a valid Excel date + + + Given an Excel date with either 1900 or 1904 date windowing, + Converts it to a Date. + + NOTE: If the default TimeZone in Java uses Daylight + Saving Time then the conversion back to an Excel date may not give + the same value, that Is the comparison + excelDate == GetExcelDate(GetJavaDate(excelDate,false)) + Is not always true. For example if default timezone Is + Europe/Copenhagen, on 2004-03-28 the minute after + 01:59 CET Is 03:00 CEST, if the excel date represents a time between + 02:00 and 03:00 then it Is Converted to past 03:00 summer time + + @param date The Excel date. + @param use1904windowing true if date uses 1904 windowing, + or false if using 1900 date windowing. + @return Java representation of the date, or null if date Is not a valid Excel date + @see TimeZone + + + Given an Excel date with either 1900 or 1904 date windowing, + converts it to a java.util.Date. + + Excel Dates and Times are stored without any timezone + information. If you know (through other means) that your file + uses a different TimeZone to the system default, you can use + this version of the getJavaDate() method to handle it. + + @param date The Excel date. + @param tz The TimeZone to evaluate the date in + @param use1904windowing true if date uses 1904 windowing, + or false if using 1900 date windowing. + @return Java representation of the date, or null if date is not a valid Excel date + + + Given an Excel date with either 1900 or 1904 date windowing, + converts it to a java.util.Date. + + Excel Dates and Times are stored without any timezone + information. If you know (through other means) that your file + uses a different TimeZone to the system default, you can use + this version of the getJavaDate() method to handle it. + + @param date The Excel date. + @param tz The TimeZone to evaluate the date in + @param use1904windowing true if date uses 1904 windowing, + or false if using 1900 date windowing. + @return Java representation of the date, or null if date is not a valid Excel date + + + Given an Excel date with either 1900 or 1904 date windowing, + converts it to a java.util.Date. + + Excel Dates and Times are stored without any timezone + information. If you know (through other means) that your file + uses a different TimeZone to the system default, you can use + this version of the getJavaDate() method to handle it. + + @param date The Excel date. + @param tz The TimeZone to evaluate the date in + @param use1904windowing true if date uses 1904 windowing, + or false if using 1900 date windowing. + @param roundSeconds round to closest second + @return Java representation of the date, or null if date is not a valid Excel date + + + Given an Excel date with either 1900 or 1904 date windowing, + converts it to a java.util.Date. + + Excel Dates and Times are stored without any timezone + information. If you know (through other means) that your file + uses a different TimeZone to the system default, you can use + this version of the getJavaDate() method to handle it. + + @param date The Excel date. + @param tz The TimeZone to evaluate the date in + @param use1904windowing true if date uses 1904 windowing, + or false if using 1900 date windowing. + @param roundSeconds round to closest second + @return Java representation of the date, or null if date is not a valid Excel date + + + Get EXCEL date as Java Calendar with given time zone. + @param date The Excel date. + @param use1904windowing true if date uses 1904 windowing, + or false if using 1900 date windowing. + @param timeZone The TimeZone to evaluate the date in + @return Java representation of the date, or null if date is not a valid Excel date + + + + Get EXCEL date as Java Calendar (with default time zone). This is like GetJavaDate(double, boolean) but returns a Calendar object. + + The Excel date. + true if date uses 1904 windowing, or false if using 1900 date windowing. + + + null if date is not a valid Excel date + + + + Get EXCEL date as Java Calendar (with default time zone). This is like GetJavaDate(double, boolean) but returns a Calendar object. + + The Excel date. + true if date uses 1904 windowing, or false if using 1900 date windowing. + + + null if date is not a valid Excel date + + + + Converts a string of format "HH:MM" or "HH:MM:SS" to its (Excel) numeric equivalent + + The time STR. + a double between 0 and 1 representing the fraction of the day + + + + Converts the time internal. + + The time STR. + + + + + Given a format ID and its format String, will Check to see if the + format represents a date format or not. + Firstly, it will Check to see if the format ID corresponds to an + internal excel date format (eg most US date formats) + If not, it will Check to see if the format string only Contains + date formatting Chars (ymd-/), which covers most + non US date formats. + + The index of the format, eg from ExtendedFormatRecord.GetFormatIndex + The format string, eg from FormatRecord.GetFormatString + + true if [is A date format] [the specified format index]; otherwise, false. + + + + + Converts a string of format "YYYY/MM/DD" to its (Excel) numeric equivalent + + The date STR. + a double representing the (integer) number of days since the start of the Excel epoch + + + + Parses the YYYYMMDD date internal. + + The time string. + + + + + Parses the int. + + The string value. + Name of the field. + The range max. + + + + + Parses the int. + + The STR val. + Name of the field. + The lower limit. + The upper limit. + + + + + Given a format ID this will Check whether the format represents an internal excel date format or not. + + The format. + + + + Check if a cell Contains a date + Since dates are stored internally in Excel as double values + we infer it Is a date if it Is formatted as such. + + The cell. + + + + Check if a cell contains a date, Checking only for internal excel date formats. + As Excel stores a great many of its dates in "non-internal" date formats, you will not normally want to use this method. + + The cell. + + + + Given a double, Checks if it Is a valid Excel date. + + the double value. + + true if [is valid excel date] [the specified value]; otherwise, false. + + + + @author Yegor Kozlov + + + Creates a picture. + @param anchor the client anchor describes how this picture is + attached to the sheet. + @param pictureIndex the index of the picture in the workbook collection + of pictures. + + @return the newly created picture. + + + Creates a comment. + @param anchor the client anchor describes how this comment is attached + to the sheet. + @return the newly created comment. + + + Creates a chart. + @param anchor the client anchor describes how this chart is attached to + the sheet. + @return the newly created chart + + + Creates a new client anchor and sets the top-left and bottom-right + coordinates of the anchor. + + @param dx1 the x coordinate in EMU within the first cell. + @param dy1 the y coordinate in EMU within the first cell. + @param dx2 the x coordinate in EMU within the second cell. + @param dy2 the y coordinate in EMU within the second cell. + @param col1 the column (0 based) of the first cell. + @param row1 the row (0 based) of the first cell. + @param col2 the column (0 based) of the second cell. + @param row2 the row (0 based) of the second cell. + @return the newly created client anchor + + + A wrapper around a {@link SimpleDateFormat} instance, + which handles a few Excel-style extensions that + are not supported by {@link SimpleDateFormat}. + Currently, the extensions are around the handling + of elapsed time, eg rendering 1 day 2 hours + as 26 hours. + + + Takes a format String, and Replaces Excel specific bits + with our detection sequences + + + Used to let us know what the date being + formatted is, in Excel terms, which we + may wish to use when handling elapsed + times. + + + not underlined + + + single (normal) underline + + + double underlined + + + accounting style single underline + + + accounting style double underline + + + no type Offsetting (not super or subscript) + + + superscript + + + subscript + + + + Allow accessing the Initial value. + + + + normal type of black color. + + + Dark Red color + + + + Allow accessing the Initial value. + + + + Normal boldness (not bold) + + + Bold boldness (bold) + + + + get the name for the font (i.e. Arial) + + + + + Get the font height in unit's of 1/20th of a point. + + + Maybe you might want to use the GetFontHeightInPoints which matches to the familiar 10, 12, 14 etc.. + + + + + + Get the font height in points. + + + This will return the same font height that is shown in Excel, such as 10 or 14 or 28. + + + + + + get whether to use italics or not + + + + + get whether to use a strikeout horizontal line through the text or not + + + + get the color for the font + @return color to use + @see #COLOR_NORMAL + @see #COLOR_RED + @see NPOI.HSSF.usermodel.HSSFPalette#GetColor(short) + + + + get type of text underlining to use + + + + + get type of text underlining to use + + + + + get character-set to use. + + ANSI_CHARSET,DEFAULT_CHARSET,SYMBOL_CHARSET + + + + get the index within the Workbook (sequence within the collection of Font objects) + + + + + Copies the style from another font into this one + + + + Charset represents the basic set of characters associated with a font (that it can display), and + corresponds to the ANSI codepage (8-bit or DBCS) of that character set used by a given language. + + @author Gisella Bronzetti + + + Returns value of this charset + + @return value of this charset + + + The font family this font belongs to. A font family is a set of fonts having common stroke width and serif + characteristics. The font name overrides when there are conflicting values. + + @author Gisella Bronzetti + + + Returns index of this font family + + @return index of this font family + + + High level representation for Font Formatting component + of Conditional Formatting Settings + + @author Dmitriy Kumshayev + @author Yegor Kozlov + + + + get or set the type of super or subscript for the font + + + + + get or set font color index + + + + + get or set the colour of the font, or null if no colour applied + + + + + get or set the height of the font in 1/20th point units + + + + + get or set the type of underlining for the font + + + + Get whether the font weight is Set to bold or not + + @return bold - whether the font is bold or not + + + @return true if font style was Set to italic + + + Set font style options. + + @param italic - if true, Set posture style to italic, otherwise to normal + @param bold if true, Set font weight to bold, otherwise to normal + + + Set font style options to default values (non-italic, non-bold) + + + Defines the font scheme to which this font belongs. + When a font defInition is part of a theme defInition, then the font is categorized as either a major or minor font scheme component. + When a new theme is chosen, every font that is part of a theme defInition is updated to use the new major or minor font defInition for that + theme. + Usually major fonts are used for styles like headings, and minor fonts are used for body and paragraph text. + + @author Gisella Bronzetti + + + + Common defInition of a HSSF or XSSF page footer. + For a list of all the different fields that can be + placed into a footer, such as page number, + bold, underline etc, see + + + + Enumerates error values in SpreadsheetML formula calculations. + + See also OOO's excelfileformat.pdf (2.5.6) + + + Intended to indicate when two areas are required to intersect, but do not. +

    Example: + In the case of SUM(B1 C1), the space between B1 and C1 is treated as the binary + intersection operator, when a comma was intended. end example] +

    +
    + + Intended to indicate when any number, including zero, is divided by zero. + Note: However, any error code divided by zero results in that error code. + + + Intended to indicate when an incompatible type argument is passed to a function, or + an incompatible type operand is used with an operator. +

    Example: + In the case of a function argument, text was expected, but a number was provided +

    +
    + + Intended to indicate when a cell reference is invalid. +

    Example: + If a formula Contains a reference to a cell, and then the row or column Containing that cell is deleted, + a #REF! error results. If a worksheet does not support 20,001 columns, + OFFSET(A1,0,20000) will result in a #REF! error. +

    +
    + + Intended to indicate when an argument to a function has a compatible type, but has a + value that is outside the domain over which that function is defined. (This is known as + a domain error.) +

    Example: + Certain calls to ASIN, ATANH, FACT, and SQRT might result in domain errors. +

    + Intended to indicate that the result of a function cannot be represented in a value of + the specified type, typically due to extreme magnitude. (This is known as a range + error.) +

    Example: FACT(1000) might result in a range error.

    +
    + + Intended to indicate when a designated value is not available. +

    Example: + Some functions, such as SUMX2MY2, perform a series of operations on corresponding + elements in two arrays. If those arrays do not have the same number of elements, then + for some elements in the longer array, there are no corresponding elements in the + shorter one; that is, one or more values in the shorter array are not available. +

    + This error value can be produced by calling the function NA +
    + + POI specific code to indicate that there is a circular reference + in the formula + + + POI specific code to indicate that the funcition required is + not implemented in POI + + + @return numeric code of the error + + + @return long (internal) numeric code of the error + + + @return string representation of the error + + + Evaluates formula cells.

    + + For performance reasons, this class keeps a cache of all previously calculated intermediate + cell values. Be sure to call {@link #ClearAllCachedResultValues()} if any workbook cells are Changed between + calls to Evaluate~ methods on this class. + + @author Amol S. Deshmukh < amolweb at ya hoo dot com > + @author Josh Micich + + + Should be called whenever there are Changes to input cells in the Evaluated workbook. + Failure to call this method after changing cell values will cause incorrect behaviour + of the Evaluate~ methods of this class + + + Should be called to tell the cell value cache that the specified (value or formula) cell + has Changed. + Failure to call this method after changing cell values will cause incorrect behaviour + of the Evaluate~ methods of this class + + + Should be called to tell the cell value cache that the specified cell has just become a + formula cell, or the formula text has Changed + + + Should be called to tell the cell value cache that the specified (value or formula) cell + has changed. + Failure to call this method after changing cell values will cause incorrect behaviour + of the evaluate~ methods of this class + + + If cell Contains a formula, the formula is Evaluated and returned, + else the CellValue simply copies the appropriate cell value from + the cell and also its cell type. This method should be preferred over + EvaluateInCell() when the call should not modify the contents of the + original cell. + @param cell + + + Loops over all cells in all sheets of the associated workbook. + For cells that contain formulas, their formulas are evaluated, + and the results are saved. These cells remain as formula cells. + For cells that do not contain formulas, no changes are made. + This is a helpful wrapper around looping over all cells, and + calling evaluateFormulaCell on each one. + + + If cell Contains formula, it Evaluates the formula, + and saves the result of the formula. The cell + remains as a formula cell. + Else if cell does not contain formula, this method leaves + the cell unChanged. + Note that the type of the formula result is returned, + so you know what kind of value is also stored with + the formula. +

    +            int EvaluatedCellType = Evaluator.evaluateFormulaCell(cell);
    +            
    + Be aware that your cell will hold both the formula, + and the result. If you want the cell Replaced with + the result of the formula, use {@link #EvaluateInCell(Cell)} + @param cell The cell to Evaluate + @return The type of the formula result, i.e. -1 if the cell is not a formula, + or one of Cell.CELL_TYPE_NUMERIC, Cell.CELL_TYPE_STRING, Cell.CELL_TYPE_BOOLEAN, Cell.CELL_TYPE_ERROR + Note: the cell's type remains as Cell.CELL_TYPE_FORMULA however. +
    + + If cell Contains formula, it Evaluates the formula, and + Puts the formula result back into the cell, in place + of the old formula. + Else if cell does not contain formula, this method leaves + the cell unChanged. + Note that the same instance of Cell is returned to + allow chained calls like: +
    +            int EvaluatedCellType = Evaluator.evaluateInCell(cell).getCellType();
    +            
    + Be aware that your cell value will be Changed to hold the + result of the formula. If you simply want the formula + value comPuted for you, use {@link #EvaluateFormulaCell(Cell)} + @param cell +
    + + Sets up the Formula Evaluator to be able to reference and resolve + links to other workbooks, eg [Test.xls]Sheet1!A1. + For a workbook referenced as [Test.xls]Sheet1!A1, you should + supply a map containing the key Test.xls (no square brackets), + and an open FormulaEvaluator onto that Workbook. + @param otherWorkbooks Map of workbook names (no square brackets) to an evaluator on that workbook + + + Whether to ignore missing references to external workbooks and + use cached formula results in the main workbook instead. +
    + In some cases external workbooks referenced by formulas in the main workbook are not available. + With this method you can control how POI handles such missing references: +
      +
    • by default ignoreMissingWorkbooks=false and POI throws + {@link org.apache.poi.ss.formula.CollaboratingWorkbooksEnvironment.WorkbookNotFoundException} + if an external reference cannot be resolved
    • +
    • if ignoreMissingWorkbooks=true then POI uses cached formula result + that already exists in the main workbook
    • +
    + + @param ignore whether to ignore missing references to external workbooks +
    + + * Perform detailed output of formula evaluation for next evaluation only? + * Is for developer use only (also developers using POI for their XLS files). + * Log-Level WARN is for basic info, INFO for detailed information. These quite + * high levels are used because you have to explicitly enable this specific logging. + + * @param value whether to perform detailed output + + + + Common defInition of a HSSF or XSSF page header. + For a list of all the different fields that can be + placed into a header, such as page number, + bold, underline etc, see + + + + + Common interface for NPOI.SS.UserModel.Header and NPOI.SS.UserModel.Footer + + + + + Gets or sets the left side of the header or footer. + + The string representing the left side. + + + + Gets or sets the center of the header or footer. + + The string representing the center. + + + + Gets or sets the right side of the header or footer. + + The string representing the right side. + + + The enumeration value indicating horizontal alignment of a cell, + i.e., whether it is aligned general, left, right, horizontally centered, Filled (replicated), + justified, centered across multiple cells, or distributed. + + + The horizontal alignment is general-aligned. Text data is left-aligned. + Numbers, dates, and times are rightaligned. Boolean types are centered. + Changing the alignment does not change the type of data. + + + The horizontal alignment is left-aligned, even in Rightto-Left mode. + Aligns contents at the left edge of the cell. If an indent amount is specified, the contents of + the cell is indented from the left by the specified number of character spaces. The character spaces are + based on the default font and font size for the workbook. + + + The horizontal alignment is centered, meaning the text is centered across the cell. + + + The horizontal alignment is right-aligned, meaning that cell contents are aligned at the right edge of the cell, + even in Right-to-Left mode. + + + The horizontal alignment is justified (flush left and right). + For each line of text, aligns each line of the wrapped text in a cell to the right and left + (except the last line). If no single line of text wraps in the cell, then the text is not justified. + + + Indicates that the value of the cell should be Filled + across the entire width of the cell. If blank cells to the right also have the fill alignment, + they are also Filled with the value, using a convention similar to centerContinuous. +

    + Additional rules: +

      +
    1. Only whole values can be Appended, not partial values.
    2. +
    3. The column will not be widened to 'best fit' the Filled value
    4. +
    5. If Appending an Additional occurrence of the value exceeds the boundary of the cell + left/right edge, don't append the Additional occurrence of the value.
    6. +
    7. The display value of the cell is Filled, not the underlying raw number.
    8. +
    +

    +
    + + The horizontal alignment is centered across multiple cells. + The information about how many cells to span is expressed in the Sheet Part, + in the row of the cell in question. For each cell that is spanned in the alignment, + a cell element needs to be written out, with the same style Id which references the centerContinuous alignment. + + + Indicates that each 'word' in each line of text inside the cell is evenly distributed + across the width of the cell, with flush right and left margins. +

    + When there is also an indent value to apply, both the left and right side of the cell + are pAdded by the indent value. +

    +

    A 'word' is a set of characters with no space character in them.

    +

    Two lines inside a cell are Separated by a carriage return.

    +
    + + + Link to an existing file or web page + + + + + Link to a place in this document + + + + + Link to an E-mail Address + + + + + Link to a file + + + + + Represents an Excel hyperlink. + + + + + Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc. + + + + + text label for this hyperlink + + + + + the type of this hyperlink + + + + + the row of the first cell that Contains the hyperlink + + + + + the row of the last cell that Contains the hyperlink + + + + + the column of the first cell that Contains the hyperlink + + + + + the column of the last cell that Contains the hyperlink + + + + Represents a defined name for a range of cells. + A name is a meaningful shorthand that makes it easier to understand the purpose of a + cell reference, constant or a formula. + + + Get the sheets name which this named range is referenced to + + @return sheet name, which this named range refered to + + + Gets the name of the named range + + @return named range name + + + Returns the formula that the name is defined to refer to. + + @return the reference for this name, null if it has not been set yet. Never empty string + @see #SetRefersToFormula(String) + + + Checks if this name is a function name + + @return true if this name is a function name + + + Checks if this name points to a cell that no longer exists + + @return true if the name refers to a deleted cell, false otherwise + + + Returns the sheet index this name applies to. + + @return the sheet index this name applies to, -1 if this name applies to the entire workbook + + + Returns the comment the user provided when the name was Created. + + @return the user comment for this named range + + + Indicates that the defined name refers to a user-defined function. + This attribute is used when there is an add-in or other code project associated with the file. + + @param value true indicates the name refers to a function. + + + Specifies printed page order. + + @author Gisella Bronzetti + + + Order pages vertically first, then move horizontally. + + + Order pages horizontally first, then move vertically + + + The enumeration value indicating the possible paper size for a sheet + + @author Daniele Montagni + + + + Allow accessing the Initial value. + + + + + A4 Transverse - 210x297 mm + + + + + A4 Plus - 210x330 mm + + + + + US Letter Rotated 11 x 8 1/2 in + + + + + A4 Rotated - 297x210 mm */ + + + + @author Yegor Kozlov + + + + Allow accessing the Initial value. + + + + + Extended windows meta file + + + Windows Meta File + + + Mac PICT format + + + JPEG format + + + PNG format + + + Device independent bitmap + + + GIF image format + + + Tag Image File (.tiff) + + + Encapsulated Postscript (.eps) + + + Windows Bitmap (.bmp) + + + WordPerfect graphics (.wpg) + + + Repersents a picture in a SpreadsheetML document + + @author Yegor Kozlov + + + Reset the image to the dimension of the embedded image + + @see #resize(double, double) + + + Resize the image proportionally. + + + + Resize the image. +

    + Please note, that this method works correctly only for workbooks + with the default font size (Arial 10pt for .xls and Calibri 11pt for .xlsx). + If the default font is changed the resized image can be streched vertically or horizontally. +

    +

    + resize(1.0,1.0) keeps the original size,
    + resize(0.5,0.5) resize to 50% of the original,
    + resize(2.0,2.0) resizes to 200% of the original.
    + resize({@link Double#MAX_VALUE},{@link Double#MAX_VALUE}) resizes to the dimension of the embedded image. +

    + + @param scaleX the amount by which the image width is multiplied relative to the original width. + @param scaleY the amount by which the image height is multiplied relative to the original height. +
    + + Calculate the preferred size for this picture. + + @return XSSFClientAnchor with the preferred size for this image + + + Calculate the preferred size for this picture. + + @param scaleX the amount by which image width is multiplied relative to the original width. + @param scaleY the amount by which image height is multiplied relative to the original height. + @return ClientAnchor with the preferred size for this image + + + Return the dimension of the embedded image in pixel + + @return image dimension in pixels + + + Return picture data for this picture + + @return picture data for this picture + + + @return the anchor that is used by this picture + + + Gets the picture data. + + @return the picture data. + + + Suggests a file extension for this image. + + @return the file extension. + + + Returns the mime type for the image + + + @return the POI internal image type, 0 if unknown image type + + @see Workbook#PICTURE_TYPE_DIB + @see Workbook#PICTURE_TYPE_EMF + @see Workbook#PICTURE_TYPE_JPEG + @see Workbook#PICTURE_TYPE_PICT + @see Workbook#PICTURE_TYPE_PNG + @see Workbook#PICTURE_TYPE_WMF + + + These enumerations specify how cell comments shall be displayed for paper printing purposes. + + @author Gisella Bronzetti + + + Do not print cell comments. + + + Print cell comments as displayed. + + + Print cell comments at end of document. + + + The enumeration value indicating the print orientation for a sheet. + + @author Gisella Bronzetti + + + orientation not specified + + + portrait orientation + + + landscape orientations + + + + Used by HSSFPrintSetup.CellError property + + + + Returns the paper size. + @return paper size + + + Returns the scale. + @return scale + + + Returns the page start. + @return page start + + + Returns the number of pages wide to fit sheet in. + @return number of pages wide to fit sheet in + + + Returns the number of pages high to fit the sheet in. + @return number of pages high to fit the sheet in + + + Returns the left to right print order. + @return left to right print order + + + Returns the landscape mode. + @return landscape mode + + + Returns the valid Settings. + @return valid Settings + + + Returns the black and white Setting. + @return black and white Setting + + + Returns the draft mode. + @return draft mode + + + Returns the print notes. + @return print notes + + + Returns the no orientation. + @return no orientation + + + Returns the use page numbers. + @return use page numbers + + + Returns the horizontal resolution. + @return horizontal resolution + + + Returns the vertical resolution. + @return vertical resolution + + + Returns the header margin. + @return header margin + + + Returns the footer margin. + @return footer margin + + + Returns the number of copies. + @return number of copies + + + Rich text unicode string. These strings can have fonts + applied to arbitary parts of the string. + + @author Glen Stampoultzis (glens at apache.org) + @author Jason Height (jheight at apache.org) + + + Applies a font to the specified characters of a string. + + @param startIndex The start index to apply the font to (inclusive) + @param endIndex The end index to apply the font to (exclusive) + @param fontIndex The font to use. + + + Applies a font to the specified characters of a string. + + @param startIndex The start index to apply the font to (inclusive) + @param endIndex The end index to apply to font to (exclusive) + @param font The index of the font to use. + + + Sets the font of the entire string. + @param font The font to use. + + + Removes any formatting that may have been applied to the string. + + + Returns the plain string representation. + + + @return the number of characters in the font. + + + @return The number of formatting Runs used. + + + + The index within the string to which the specified formatting run applies. + @param index the index of the formatting run + @return the index within the string. + + + Applies the specified font to the entire string. + + @param fontIndex the font to apply. + + + Used to specify the different possible policies + if for the case of null and blank cells + + + + High level representation of a row of a spreadsheet. + + + + + Use this to create new cells within the row and return it. + + The cell that is returned is a /. + The type can be changed either through calling SetCellValue or SetCellType. + + the column number this cell represents + Cell a high level representation of the created cell. + + ArgumentException if columnIndex < 0 or greater than the maximum number of supported columns + (255 for *.xls, 1048576 for *.xlsx) + + + + + Use this to create new cells within the row and return it. + + The cell that is returned is a /. The type can be changed + either through calling SetCellValue or SetCellType. + + the column number this cell represents + + Cell a high level representation of the created cell. + ArgumentException if columnIndex < 0 or greater than the maximum number of supported columns + (255 for *.xls, 1048576 for *.xlsx) + + + + + Remove the Cell from this row. + + the cell to remove + + + + Get row number this row represents + + the row number (0 based) + + + + Get the cell representing a given column (logical cell) 0-based. If you + ask for a cell that is not defined....you get a null. + + 0 based column number + Cell representing that column or null if undefined. + + + + + Returns the cell at the given (0 based) index, with the specified {@link NPOI.SS.usermodel.Row.MissingCellPolicy} + + the cell at the given (0 based) index + ArgumentException if cellnum < 0 or the specified MissingCellPolicy is invalid + + + + + + + Get the number of the first cell Contained in this row. + + + short representing the first logical cell in the row, + or -1 if the row does not contain any cells. + + + + + Gets the index of the last cell Contained in this row PLUS ONE. The result also + happens to be the 1-based column number of the last cell. This value can be used as a + standard upper bound when iterating over cells: +
    +            short minColIx = row.GetFirstCellNum();
    +            short maxColIx = row.GetLastCellNum();
    +            for(short colIx=minColIx; colIx<maxColIx; colIx++) {
    +            Cell cell = row.GetCell(colIx);
    +            if(cell == null) {
    +            continue;
    +            }
    +            //... do something with cell
    +            }
    +            
    +
    + + short representing the last logical cell in the row PLUS ONE, + or -1 if the row does not contain any cells. + +
    + + + Gets the number of defined cells (NOT number of cells in the actual row!). + That is to say if only columns 0,4,5 have values then there would be 3. + + int representing the number of defined cells in the row. + + + + Get whether or not to display this row with 0 height + + zHeight height is zero or not. + + + + Get the row's height measured in twips (1/20th of a point). + If the height is not set, the default worksheet value is returned, + + + row height measured in twips (1/20th of a point) + + + + Returns row height measured in point size. + If the height is not set, the default worksheet value is returned, + + + row height measured in point size + + + + + + Is this row formatted? Most aren't, but some rows + do have whole-row styles. For those that do, you + can get the formatting from + + + + + Returns the Sheet this row belongs to + + the Sheet that owns this row + + + + Returns the whole-row cell styles. Most rows won't + have one of these, so will return null. Call IsFormmated to check first + + The row style. + + + + Moves the supplied cell to a new column, which + must not already have a cell there! + + The cell to move + The new column number (0 based) + + + + Copy the current row to the target row + + row index of the target row + the new copied row object + + + + Copy the source cell to the target cell. If the target cell exists, the new copied cell will be inserted before the existing one + + index of the source cell + index of the target cell + the new copied cell object + + + + Get cells in the row + + + + + Returns the rows outline level. Increased as you + put it into more groups (outlines), reduced as + you take it out of them. + + + + All known types of automatic shapes in DrawingML + + @author Yegor Kozlov + + + + Allow accessing the Initial value. + + + + + Indicate the position of the margin. One of left, right, top and bottom. + + + + + referes to the left margin + + + + + referes to the right margin + + + + + referes to the top margin + + + + + referes to the bottom margin + + + + + Define the position of the pane. One of lower/right, upper/right, lower/left and upper/left. + + + + + referes to the lower/right corner + + + + + referes to the upper/right corner + + + + + referes to the lower/left corner + + + + + referes to the upper/left corner + + + + + High level representation of a Excel worksheet. + + + Sheets are the central structures within a workbook, and are where a user does most of his spreadsheet work. + The most common type of sheet is the worksheet, which is represented as a grid of cells. Worksheet cells can + contain text, numbers, dates, and formulas. Cells can also be formatted. + + + + + Create a new row within the sheet and return the high level representation + + The row number. + high level Row object representing a row in the sheet + RemoveRow(Row) + + + + Remove a row from this sheet. All cells Contained in the row are Removed as well + + a row to Remove. + + + + Returns the logical row (not physical) 0-based. If you ask for a row that is not + defined you get a null. This is to say row 4 represents the fifth row on a sheet. + + row to get (0-based). + the rownumber or null if its not defined on the sheet + + + + Returns the number of physically defined rows (NOT the number of rows in the sheet) + + the number of physically defined rows in this sheet. + + + + Gets the first row on the sheet + + the number of the first logical row on the sheet (0-based). + + + + Gets the last row on the sheet + + last row contained n this sheet (0-based) + + + + whether force formula recalculation. + + + + + Get the visibility state for a given column + + the column to get (0-based) + the visiblity state of the column + + + + Get the hidden state for a given column + + the column to set (0-based) + hidden - false if the column is visible + + + + Copy the source row to the target row. If the target row exists, the new copied row will be inserted before the existing one + + source index + target index + the new copied row object + + + + Set the width (in units of 1/256th of a character width) + + the column to set (0-based) + the width in units of 1/256th of a character width + + The maximum column width for an individual cell is 255 characters. + This value represents the number of characters that can be displayed + in a cell that is formatted with the standard font. + + + + + get the width (in units of 1/256th of a character width ) + + the column to get (0-based) + the width in units of 1/256th of a character width + + + + get the width in pixel + + + + + Please note, that this method works correctly only for workbooks + with the default font size (Arial 10pt for .xls and Calibri 11pt for .xlsx). + If the default font is changed the column width can be streched + + + + + Get the default column width for the sheet (if the columns do not define their own width) + in characters + + default column width measured in characters. + + + + Get the default row height for the sheet (if the rows do not define their own height) in + twips (1/20 of a point) + + default row height measured in twips (1/20 of a point) + + + + Get the default row height for the sheet (if the rows do not define their own height) in + points. + + The default row height in points. + + + + Returns the CellStyle that applies to the given + (0 based) column, or null if no style has been + set for that column + + The column. + + + + Adds a merged region of cells (hence those cells form one) + + (rowfrom/colfrom-rowto/colto) to merge. + index of this region + + + + Adds a merged region of cells (hence those cells form one). + Skips validation. It is possible to create overlapping merged regions + or create a merged region that intersects a multi-cell array formula + with this formula, which may result in a corrupt workbook. + + To check for merged regions overlapping array formulas or other merged regions + after addMergedRegionUnsafe has been called, call {@link #validateMergedRegions()}, which runs in O(n^2) time. + + region to merge + index of this region + if region contains fewer than 2 cells + + + + Verify that merged regions do not intersect multi-cell array formulas and + no merged regions intersect another merged region in this sheet. + + if region intersects with a multi-cell array formula + if at least one region intersects with another merged region in this sheet + + + + Determine whether printed output for this sheet will be horizontally centered. + + + + + Determine whether printed output for this sheet will be vertically centered. + + + + + Removes a merged region of cells (hence letting them free) + + index of the region to unmerge + + + + Removes a number of merged regions of cells (hence letting them free) + + A set of the regions to unmerge + + + + Returns the number of merged regions + + + + + Returns the merged region at the specified index + + The index. + + + + Returns the list of merged regions. + + + + + Gets the row enumerator. + + + an iterator of the PHYSICAL rows. Meaning the 3rd element may not + be the third row if say for instance the second row is undefined. + Call on each row + if you care which one it is. + + + + + Get the row enumerator + + + + + + Gets the flag indicating whether the window should show 0 (zero) in cells Containing zero value. + When false, cells with zero value appear blank instead of showing the number zero. + + whether all zero values on the worksheet are displayed. + + + + Gets or sets a value indicating whether the sheet displays Automatic Page Breaks. + + + + + Get whether to display the guts or not, + + default value is true + + + + Flag indicating whether the Fit to Page print option is enabled. + + + + + Flag indicating whether summary rows appear below detail in an outline, when applying an outline. + + + When true a summary row is inserted below the detailed data being summarized and a + new outline level is established on that row. + + + When false a summary row is inserted above the detailed data being summarized and a new outline level + is established on that row. + + + true if row summaries appear below detail in the outline + + + + Flag indicating whether summary columns appear to the right of detail in an outline, when applying an outline. + + + When true a summary column is inserted to the right of the detailed data being summarized + and a new outline level is established on that column. + + + When false a summary column is inserted to the left of the detailed data being + summarized and a new outline level is established on that column. + + + true if col summaries appear right of the detail in the outline + + + + Gets the flag indicating whether this sheet displays the lines + between rows and columns to make editing and reading easier. + + true if this sheet displays gridlines. + + + + Get or set the flag indicating whether this sheet prints the + row and column headings when printing. + + return true if this sheet prints row and column headings. + + + + + Gets the print Setup object. + + The user model for the print Setup object. + + + + Gets the user model for the default document header. +

    + Note that XSSF offers more kinds of document headers than HSSF does + +

    + the document header. Never null +
    + + + Gets the user model for the default document footer. +

    + Note that XSSF offers more kinds of document footers than HSSF does. +

    + the document footer. Never null +
    + + + Gets the size of the margin in inches. + + which margin to get + the size of the margin + + + + Sets the size of the margin in inches. + + which margin to get + the size of the margin + + + + Answer whether protection is enabled or disabled + + true => protection enabled; false => protection disabled + + + + Sets the protection enabled as well as the password + + to set for protection. Pass null to remove protection + + + + Answer whether scenario protection is enabled or disabled + + true => protection enabled; false => protection disabled + + + + Gets or sets the tab color of the _sheet + + + + + Returns the top-level drawing patriach, if there is one. + This will hold any graphics or charts for the _sheet. + WARNING - calling this will trigger a parsing of the + associated escher records. Any that aren't supported + (such as charts and complex drawing types) will almost + certainly be lost or corrupted when written out. Only + use this with simple drawings, otherwise call + HSSFSheet#CreateDrawingPatriarch() and + start from scratch! + + The drawing patriarch. + + + + Sets the zoom magnication for the sheet. The zoom is expressed as a + fraction. For example to express a zoom of 75% use 3 for the numerator + and 4 for the denominator. + + The numerator for the zoom magnification. + denominator for the zoom magnification. + + + + + The top row in the visible view when the sheet is + first viewed after opening it in a viewer + + the rownum (0 based) of the top row. + + + + The left col in the visible view when the sheet is + first viewed after opening it in a viewer + + the rownum (0 based) of the top row + + + + Sets desktop window pane display area, when the file is first opened in a viewer. + + the top row to show in desktop window pane + the left column to show in desktop window pane + + + + Shifts rows between startRow and endRow n number of rows. + If you use a negative number, it will shift rows up. + Code ensures that rows don't wrap around. + + Calls shiftRows(startRow, endRow, n, false, false); + + + Additionally shifts merged regions that are completely defined in these + rows (ie. merged 2 cells on a row to be shifted). + + the row to start shifting + the row to end shifting + the number of rows to shift + + + + Shifts rows between startRow and endRow n number of rows. + If you use a negative number, it will shift rows up. + Code ensures that rows don't wrap around + + Additionally shifts merged regions that are completely defined in these + rows (ie. merged 2 cells on a row to be shifted). + + the row to start shifting + the row to end shifting + the number of rows to shift + whether to copy the row height during the shift + whether to set the original row's height to the default + + + + Creates a split (freezepane). Any existing freezepane or split pane is overwritten. + + Horizonatal position of split + Vertical position of split + Top row visible in bottom pane + Left column visible in right pane + + + + Creates a split (freezepane). Any existing freezepane or split pane is overwritten. + + Horizonatal position of split. + Vertical position of split. + + + + Creates a split pane. Any existing freezepane or split pane is overwritten. + + Horizonatal position of split (in 1/20th of a point) + Vertical position of split (in 1/20th of a point) + Left column visible in right pane + Top row visible in bottom pane + Active pane. One of: PANE_LOWER_RIGHT, PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT + @see #PANE_LOWER_LEFT + @see #PANE_LOWER_RIGHT + @see #PANE_UPPER_LEFT + @see #PANE_UPPER_RIGHT + + + + Returns the information regarding the currently configured pane (split or freeze) + + if no pane configured returns null else return the pane information. + + + + Returns if gridlines are displayed + + + + + Returns if formulas are displayed + + + + + Returns if RowColHeadings are displayed. + + + + + Returns if RowColHeadings are displayed. + + + + + Determines if there is a page break at the indicated row + + The row. + + + + Removes the page break at the indicated row + + The row index. + + + + Retrieves all the horizontal page breaks + + all the horizontal page breaks, or null if there are no row page breaks + + + + Retrieves all the vertical page breaks + + all the vertical page breaks, or null if there are no column page breaks. + + + + Sets the active cell range. + + The firstrow. + The lastrow. + The firstcolumn. + The lastcolumn. + + + + Sets the active cell range. + + The cellranges. + The index of the active range. + The active row in the active range + The active column in the active range + + + + Sets a page break at the indicated column + + The column. + + + + Sets the row break. + + The row. + + + + Determines if there is a page break at the indicated column + + The column index. + + + + Removes a page break at the indicated column + + The column. + + + + Expands or collapses a column group. + + One of the columns in the group. + if set to truecollapse group.falseexpand group. + + + + Create an outline for the provided column range. + + beginning of the column range. + end of the column range. + + + + Ungroup a range of columns that were previously groupped + + start column (0-based). + end column (0-based). + + + + Tie a range of rows toGether so that they can be collapsed or expanded + + start row (0-based) + end row (0-based) + + + + Ungroup a range of rows that were previously groupped + + start row (0-based) + end row (0-based) + + + + Set view state of a groupped range of rows + + start row of a groupped range of rows (0-based). + whether to expand/collapse the detail rows. + + + + Sets the default column style for a given column. POI will only apply this style to new cells Added to the sheet. + + the column index + the style to set + + + + Adjusts the column width to fit the contents. + + the column index + + This process can be relatively slow on large sheets, so this should + normally only be called once per column, at the end of your + processing. + + + + + Adjusts the column width to fit the contents. + + the column index. + whether to use the contents of merged cells when + calculating the width of the column. Default is to ignore merged cells. + + This process can be relatively slow on large sheets, so this should + normally only be called once per column, at the end of your + processing. + + + + + Returns cell comment for the specified row and column + + The row. + The column. + + + + Returns cell comment for the specified location + + cell location + return cell comment or null if not found + + + + Returns all cell comments on this sheet. + + return A Dictionary of each Comment in the sheet, keyed on the cell address where the comment is located. + + + + Creates the top-level drawing patriarch. + + + + + Gets the parent workbook. + + + + + Gets the name of the sheet. + + + + + Gets or sets a value indicating whether this sheet is currently selected. + + + + + Sets whether sheet is selected. + + Whether to select the sheet or deselect the sheet. + + + + Sets array formula to specified region for result. + + text representation of the formula + Region of array formula for result + the of cells affected by this change + + + + Remove a Array Formula from this sheet. All cells contained in the Array Formula range are removed as well + + any cell within Array Formula range + the of cells affected by this change + + + + Checks if the provided region is part of the merged regions. + + Region searched in the merged regions + true, when the region is contained in at least one of the merged regions + + + + Create an instance of a DataValidationHelper. + + Instance of a DataValidationHelper + + + + Returns the list of DataValidation in the sheet. + + list of DataValidation in the sheet + + + + Creates a data validation object + + The data validation object settings + + + + Enable filtering for a range of cells + + the range of cells to filter + + + + The 'Conditional Formatting' facet for this Sheet + + conditional formatting rule for this sheet + + + + Whether the text is displayed in right-to-left mode in the window + + + + + Get or set the repeating rows used when printing the sheet, as found in File->PageSetup->Sheet. +

    + Repeating rows cover a range of contiguous rows, e.g.: +

    +            Sheet1!$1:$1
    +            Sheet2!$5:$8
    +            
    + The {@link CellRangeAddress} returned contains a column part which spans + all columns, and a row part which specifies the contiguous range of + repeating rows. +

    + If the Sheet does not have any repeating rows defined, null is returned. +

    +
    + + + Gets or set the repeating columns used when printing the sheet, as found in File->PageSetup->Sheet. +

    + Repeating columns cover a range of contiguous columns, e.g.: +

    +            Sheet1!$A:$A
    +            Sheet2!$C:$F
    +            
    + The {@link CellRangeAddress} returned contains a row part which spans all + rows, and a column part which specifies the contiguous range of + repeating columns. +

    + If the Sheet does not have any repeating columns defined, null is + returned. +

    +
    + + + Copy sheet with a new name + + new sheet name + cloned sheet + + + + Copy sheet with a new name + + new sheet name + whether to copy styles + cloned sheet + + + + Returns the column outline level. Increased as you + put it into more groups (outlines), reduced as + you take it out of them. + + + + + + + Get a Hyperlink in this sheet anchored at row, column + + + + return hyperlink if there is a hyperlink anchored at row, column; otherwise returns null + + + + Get a Hyperlink in this sheet located in a cell specified by {code addr} + + The address of the cell containing the hyperlink + return hyperlink if there is a hyperlink anchored at {@code addr}; otherwise returns {@code null} + + + + Get a list of Hyperlinks in this sheet + + return Hyperlinks for the sheet + + + + get or set location of the active cell, e.g. A1. + + + + The 'Conditional Formatting' facet of Sheet + + @author Dmitriy Kumshayev + @author Yegor Kozlov + @since 3.8 + + + + Add a new Conditional Formatting to the sheet. + + list of rectangular regions to apply conditional formatting rules + the rule to apply + index of the newly Created Conditional Formatting object + + + + Add a new Conditional Formatting consisting of two rules. + + list of rectangular regions to apply conditional formatting rules + the first rule + the second rule + index of the newly Created Conditional Formatting object + + + + Add a new Conditional Formatting Set to the sheet. + + list of rectangular regions to apply conditional formatting rules + Set of up to three conditional formatting rules + index of the newly Created Conditional Formatting object + + + + Adds a copy of a ConditionalFormatting object to the sheet + + the Conditional Formatting to clone + index of the new Conditional Formatting object + + This method could be used to copy ConditionalFormatting object + from one sheet to another. For example: + ConditionalFormatting cf = sheet.GetConditionalFormattingAt(index); + newSheet.AddConditionalFormatting(cf); + + + + A factory method allowing to create a conditional formatting rule + with a cell comparison operator +

    + The Created conditional formatting rule Compares a cell value + to a formula calculated result, using the specified operator. + The type of the Created condition is {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS} +

    + + @param comparisonOperation - MUST be a constant value from + {@link ComparisonOperator}:

    +

      +
    • BETWEEN
    • +
    • NOT_BETWEEN
    • +
    • EQUAL
    • +
    • NOT_EQUAL
    • +
    • GT
    • +
    • LT
    • +
    • GE
    • +
    • LE
    • +
    +

    + @param formula1 - formula for the valued, Compared with the cell + @param formula2 - second formula (only used with + {@link ComparisonOperator#BETWEEN}) and {@link ComparisonOperator#NOT_BETWEEN} operations) +
    + + + Create a conditional formatting rule that Compares a cell value to a formula calculated result, using an operator + + MUST be a constant value from ComparisonOperator except BETWEEN and NOT_BETWEEN + the formula to determine if the conditional formatting is applied + a conditional formatting rule + + + + Create a conditional formatting rule based on a Boolean formula. + When the formula result is true, the cell is highlighted. + + the formula to Evaluate. MUST be a Boolean function. + conditional formatting rule + + + + + + + Gets Conditional Formatting object at a particular index + + 0-based index of the Conditional Formatting object to fetch + Conditional Formatting object or null if not found + throws ArgumentException if the index is outside of the allowable range (0 ... numberOfFormats-1) + + + + get the number of conditional formats in this sheet + + + + + Removes a Conditional Formatting object by index + + 0-based index of the Conditional Formatting object to remove + throws ArgumentException if the index is outside of the allowable range (0 ... numberOfFormats-1) + + + @return the rich text string for this textbox. + + + @return Returns the left margin within the textbox. + + + @return returns the right margin within the textbox. + + + @return returns the top margin within the textbox. + + + s the bottom margin within the textbox. + + + This enumeration value indicates the type of vertical alignment for a cell, i.e., + whether it is aligned top, bottom, vertically centered, justified or distributed. + + + The vertical alignment is aligned-to-top. + + + The vertical alignment is centered across the height of the cell. + + + The vertical alignment is aligned-to-bottom. + + +

    + When text direction is horizontal: the vertical alignment of lines of text is distributed vertically, + where each line of text inside the cell is evenly distributed across the height of the cell, + with flush top and bottom margins. +

    +

    + When text direction is vertical: similar behavior as horizontal justification. + The alignment is justified (flush top and bottom in this case). For each line of text, each + line of the wrapped text in a cell is aligned to the top and bottom (except the last line). + If no single line of text wraps in the cell, then the text is not justified. +

    +
    + +

    + When text direction is horizontal: the vertical alignment of lines of text is distributed vertically, + where each line of text inside the cell is evenly distributed across the height of the cell, + with flush top +

    +

    + When text direction is vertical: behaves exactly as distributed horizontal alignment. + The first words in a line of text (appearing at the top of the cell) are flush + with the top edge of the cell, and the last words of a line of text are flush with the bottom edge of the cell, + and the line of text is distributed evenly from top to bottom. +

    +
    + + + Indicates the sheet is visible. + + + + + Indicates the book window is hidden, but can be shown by the user via the user interface. + + + + + Indicates the sheet is hidden and cannot be shown in the user interface (UI). + + + In Excel this state is only available programmatically in VBA: + ThisWorkbook.Sheets("MySheetName").Visible = xlSheetVeryHidden + + + + + + High level interface of a Excel workbook. This is the first object most users + will construct whether they are reading or writing a workbook. It is also the + top level object for creating new sheets/etc. + This interface is shared between the implementation specific to xls and xlsx. + This way it is possible to access Excel workbooks stored in both formats. + + + + + get the active sheet. The active sheet is is the sheet + which is currently displayed when the workbook is viewed in Excel. + + + + + Gets the first tab that is displayed in the list of tabs in excel. + + + + + Sets the order of appearance for a given sheet. + + the name of the sheet to reorder + the position that we want to insert the sheet into (0 based) + + + + Sets the tab whose data is actually seen when the sheet is opened. + This may be different from the "selected sheet" since excel seems to + allow you to show the data of one sheet when another is seen "selected" + in the tabs (at the bottom). + + the index of the sheet to select (0 based) + + + + set the active sheet. The active sheet is is the sheet + which is currently displayed when the workbook is viewed in Excel. + + index of the active sheet (0-based) + + + + Set the sheet name + + sheet number (0 based) + Sheet name + + + + Set the sheet name. + + sheet number (0 based) + sheet name + + + + Returns the index of the sheet by its name + + the sheet name + index of the sheet (0 based) + + + + Returns the index of the given sheet + + the sheet to look up + index of the sheet (0 based) + + + + Sreate an Sheet for this Workbook, Adds it to the sheets and returns + the high level representation. Use this to create new sheets. + + + + + + Create an Sheet for this Workbook, Adds it to the sheets and returns + the high level representation. Use this to create new sheets. + + sheetname to set for the sheet. + Sheet representing the new sheet. + + + + Create an Sheet from an existing sheet in the Workbook. + + + + + + + Get the number of spreadsheets in the workbook + + + + + Get the Sheet object at the given index. + + index of the sheet number (0-based physical & logical) + Sheet at the provided index + + + + Get sheet with the given name + + name of the sheet + Sheet with the name provided or null if it does not exist + + + + Removes sheet at the given index + + + + + + Enumerate sheets + + + + + + Create a new Font and add it to the workbook's font table + + + + + + Finds a font that matches the one with the supplied attributes + + + + + + + + + + the font with the matched attributes or null + + + + Finds a font that matches the one with the supplied attributes + + + + + + + + + + the font with the matched attributes or null + + + + Get the number of fonts in the font table + + + + + Get the font at the given index number + + index number (0-based) + font at the index + + + + Create a new Cell style and add it to the workbook's style table + + the new Cell Style object + + + + Get the number of styles the workbook Contains + + + + + Get the cell style object at the given index + + index within the set of styles (0-based) + CellStyle object at the index + + + + Write out this workbook to an OutPutstream. + + the stream you wish to write to + + + + the total number of defined names in this workbook + + + + + the defined name with the specified name. + + the name of the defined name + the defined name with the specified name. null if not found + + + + Returns all defined names with the given name. + + the name of the defined name + a list of the defined names with the specified name. An empty list is returned if none is found. + + + + Returns all defined names. + + a list of the defined names. An empty list is returned if none is found. + + + + the defined name at the specified index + + position of the named range (0-based) + + + + + Creates a new (unInitialised) defined name in this workbook + + new defined name object + + + + Gets the defined name index by name + + the name of the defined name + zero based index of the defined name. + + + + Remove the defined name at the specified index + + named range index (0 based) + + + + Remove a defined name by name + + the name of the defined name + + + + Remove a defined name + + the name of the defined name + + + + Adds the linking required to allow formulas referencing the specified + external workbook to be added to this one. In order for formulas + such as "[MyOtherWorkbook]Sheet3!$A$5" to be added to the file, + some linking information must first be recorded. Once a given external + workbook has been linked, then formulas using it can added. Each workbook + needs linking only once.
    + This linking only applies for writing formulas. + To link things for evaluation, see {@link FormulaEvaluator#setupReferencedWorkbooks(java.util.Map)} +
    + The name the workbook will be referenced as in formulas + The open workbook to fetch the link required information from + +
    + + + Sets the printarea for the sheet provided + + Zero-based sheet index + Valid name Reference for the Print Area + + + + Sets the printarea for the sheet provided + + Zero-based sheet index (0 = First Sheet) + Column to begin printarea + Column to end the printarea + Row to begin the printarea + Row to end the printarea + + + + Retrieves the reference for the printarea of the specified sheet, + the sheet name is Appended to the reference even if it was not specified. + + Zero-based sheet index + Null if no print area has been defined + + + + Delete the printarea for the sheet specified + + Zero-based sheet index (0 = First Sheet) + + + + Retrieves the current policy on what to do when getting missing or blank cells from a row. + + + + + Returns the instance of DataFormat for this workbook. + + the DataFormat object + + + + Adds a picture to the workbook. + + The bytes of the picture + The format of the picture. + the index to this picture (1 based). + + + + Gets all pictures from the Workbook. + + the list of pictures (a list of link PictureData objects.) + + + + Return an object that handles instantiating concrete classes of + the various instances one needs for HSSF and XSSF. + + + + + + if this workbook is not visible in the GUI + + + + + Check whether a sheet is hidden. + + number of sheet + true if sheet is hidden + + + Check whether a sheet is very hidden. +

    + This is different from the normal hidden status + ({@link #isSheetHidden(int)}) +

    + @param sheetIx sheet index to check + @return true if sheet is very hidden +
    + + Hide or unhide a sheet + + @param sheetIx the sheet index (0-based) + @param hidden True to mark the sheet as hidden, false otherwise + + + Hide or unhide a sheet. +
    +             0 = not hidden
    +             1 = hidden
    +             2 = very hidden.
    +            
    + @param sheetIx The sheet number + @param hidden 0 for not hidden, 1 for hidden, 2 for very hidden +
    + + + Register a new toolpack in this workbook. + + the toolpack to register + + + + Gets a bool value that indicates whether the date systems used in the workbook starts in 1904. + The default value is false, meaning that the workbook uses the 1900 date system, + where 1/1/1900 is the first day in the system. + + True if the date systems used in the workbook starts in 1904 + + + + Returns the spreadsheet version (EXCLE97) of this workbook + + + + The enumeration value indicating the style of fill pattern being used for a cell format. + + + + No background + + + Solidly Filled + + + Small fine dots + + + Wide dots + + + Sparse dots + + + Thick horizontal bands + + + Thick vertical bands + + + Thick backward facing diagonals + + + Thick forward facing diagonals + + + Large spots + + + Brick-like layout + + + Thin horizontal bands + + + Thin vertical bands + + + Thin backward diagonal + + + Thin forward diagonal + + + Squares + + + Diamonds + + + Less Dots + + + Least Dots + + + Utility class that builds on {@link CellRangeAddress} + + Portions of this class may be moved to {@link CellRangeAddressBase} + + + first range is within the second range + + + first range encloses or is equal to the second + + + Get the type of intersection between two cell ranges + + @param crB - the specified range + @return code which reflects how the specified range is related to this range.
    + Possible return codes are: + NO_INTERSECTION - the specified range is outside of this range;
    + OVERLAP - both ranges partially overlap;
    + INSIDE - the specified range is inside of this one
    + ENCLOSES - the specified range encloses (possibly exactly the same as) this range
    +
    + + Do all possible cell merges between cells of the list so that: + if a cell range is completely inside of another cell range, it s removed from the list + if two cells have a shared border, merge them into one bigger cell range + @param cellRangeList + @return updated List of cell ranges + + + @return the new range(s) to replace the supplied ones. null if no merge is possible + + + ** + + + Check if the specified range is located inside of this cell range. + + @param crB + @return true if this cell range Contains the argument range inside if it's area + + + Check if the specified cell range has a shared border with the current range. + + @return true if the ranges have a complete shared border (i.e. + the two ranges toher make a simple rectangular region. + + + Create an enclosing CellRange for the two cell ranges. + + @return enclosing CellRange + + + @return true if a < b + + + @return true if a <= b + + + @return true if a > b + + + @return true if a >= b + + +

    This class is a Container for POI usermodel row=0 column=0 cell references. + It is barely a Container for these two coordinates. The implementation + of the Comparable interface sorts by "natural" order top left to bottom right.

    + +

    Use CellAddress when you want to refer to the location of a cell in a sheet + when the concept of relative/absolute does not apply (such as the anchor location + of a cell comment). Use {@link CellReference} when the concept of + relative/absolute does apply (such as a cell reference in a formula). + CellAddresses do not have a concept of "sheet", while CellReferences do.

    +
    + + A constant for references to the first cell in a sheet. + + + Create a new CellAddress object. + + @param row Row index (first row is 0) + @param column Column index (first column is 0) + + + Create a new CellAddress object. + + @param Address a cell Address in A1 format. Address may not contain sheet name or dollar signs. + (that is, Address is not a cell reference. Use {@link #CellAddress(CellReference)} instead if + starting with a cell reference.) + + + Create a new CellAddress object. + + @param reference a reference to a cell + + + Create a new CellAddress object. + + @param cell the Cell to Get the location of + + + Get the cell Address row + + @return row + + + Get the cell Address column + + @return column + + + Compare this CellAddress using the "natural" row-major, column-minor ordering. + That is, top-left to bottom-right ordering. + + @param other + @return
      +
    • -1 if this CellAddress is before (above/left) of other
    • +
    • 0 if Addresses are the same
    • +
    • 1 if this CellAddress is After (below/right) of other
    • +
    +
    + + Same as {@link #ToString()} + @return A1-style cell Address string representation + + + + Represents data marker used in charts. + @author Roman Kashitsyn + + + + + constructor + + the sheet where data located. + the range within that sheet. + + + + get or set the sheet marker points to. + + + + + get or set range of the marker. + + + + + Formats data marker using canonical format, for example + 'SheetName!$A$1:$A$5'. + + formatted data marker + + + + Convert DateFormat patterns into Excel custom number formats. + For example, to format a date in excel using the "dd MMMM, yyyy" pattern and Japanese + locale, use the following code: + + + returns "[$-0411]dd MMMM, yyyy;@" where the [$-0411] prefix tells Excel to use the Japanese locale + String excelFormatPattern = DateFormatConverter.convert(Locale.JAPANESE, "dd MMMM, yyyy"); + + CellStyle cellStyle = workbook.createCellStyle(); + + DataFormat poiFormat = workbook.createDataFormat(); + cellStyle.setDataFormat(poiFormat.getFormat(excelFormatPattern)); + cell.setCellValue(new Date()); + cell.setCellStyle(cellStyle); // formats date as '2012\u5e743\u670817\u65e5' + + + + @author Yegor Kozlov + + + Return the dimension of this image + + @param is the stream Containing the image data + @param type type of the picture: {@link NPOI.SS.UserModel.Workbook#PICTURE_TYPE_JPEG}, + {@link NPOI.SS.UserModel.Workbook#PICTURE_TYPE_PNG} or {@link NPOI.SS.UserModel.Workbook#PICTURE_TYPE_DIB} + + @return image dimension in pixels + + + The metadata of PNG and JPEG can contain the width of a pixel in millimeters. + Return the the "effective" dpi calculated as 25.4/HorizontalPixelSize + and 25.4/VerticalPixelSize. Where 25.4 is the number of mm in inch. + + @return array of two elements: {horisontalPdi, verticalDpi}. + {96, 96} is the default. + + + Calculate and Set the preferred size (anchor) for this picture. + + @param scaleX the amount by which image width is multiplied relative to the original width. + @param scaleY the amount by which image height is multiplied relative to the original height. + @return the new Dimensions of the scaled picture in EMUs + + + Calculates the dimensions in EMUs for the anchor of the given picture + + @param picture the picture Containing the anchor + @return the dimensions in EMUs + + + The Char (!) that Separates sheet names from cell references + + + The Char (:) that Separates the two cell references in a multi-cell area reference + + + The Char (') used to quote sheet names when they contain special Chars + + + Create an area ref from a string representation. Sheet names containing special Chars should be + delimited and escaped as per normal syntax rules for formulas.
    + The area reference must be contiguous (i.e. represent a single rectangle, not a Union of rectangles) +
    + + Creates an area ref from a pair of Cell References. + + + is the reference for a contiguous (i.e. + Unbroken) area, or is it made up of + several different parts? + (If it Is, you will need to call + .... + + + is the reference for a whole-column reference, + such as C:C or D:G ? + + + Takes a non-contiguous area reference, and + returns an array of contiguous area references. + + + @return false if this area reference involves more than one cell + + + @return the first cell reference which defines this area. Usually this cell is in the upper + left corner of the area (but this is not a requirement). + + + Note - if this area reference refers to a single cell, the return value of this method will + be identical to that of GetFirstCell() + @return the second cell reference which defines this area. For multi-cell areas, this is + cell diagonally opposite the 'first cell'. Usually this cell is in the lower right corner + of the area (but this is not a requirement). + + + Returns a reference to every cell covered by this area + + + Example return values: + + + + + + +
    ResultComment
    A1:A1Single cell area reference without sheet
    A1:$C$1Multi-cell area reference without sheet
    Sheet1!A$1:B4Standard sheet name
    'O''Brien''s Sales'!B5:C6' Sheet name with special Chars
    + @return the text representation of this area reference as it would appear in a formula. +
    + + Separates Area refs in two parts and returns them as Separate elements in a String array, + each qualified with the sheet name (if present) + + @return array with one or two elements. never null + + + Creates new cell range. Indexes are zero-based. + + @param firstRow Index of first row + @param lastRow Index of last row (inclusive), must be equal to or larger than {@code firstRow} + @param firstCol Index of first column + @param lastCol Index of last column (inclusive), must be equal to or larger than {@code firstCol} + + + @return the text format of this range using specified sheet name. + + + + Creates a CellRangeAddress from a cell range reference string. + + + usually a standard area ref (e.g. "B1:D8"). May be a single + cell ref (e.g. "B5") in which case the result is a 1 x 1 cell + range. May also be a whole row range (e.g. "3:5"), or a whole + column range (e.g. "C:F") + + a CellRangeAddress object + + + See OOO documentation: excelfileformat.pdf sec 2.5.14 - 'Cell Range Address'

    + + Common subclass of 8-bit and 16-bit versions + + @author Josh Micich + + + Validate the range limits against the supplied version of Excel + + @param ssVersion the version of Excel to validate against + @throws IllegalArgumentException if the range limits are outside of the allowed range + + + Runs a bounds check for row numbers + @param row + + + Runs a bounds check for column numbers + @param column + + + Check if the row is in the specified cell range + + @param rowInd the row to check + @return true if the range contains the row [rowInd] + + + Check if the column is in the specified cell range + + @param colInd the column to check + @return true if the range contains the column [colInd] + + +

    + Determines whether or not this CellRangeAddress and the specified CellRangeAddress intersect. + + a candidate cell range address to check for intersection with this range + returns true if this range and other range have at least 1 cell in common +
    + + @return column number for the upper left hand corner + + + @return row number for the upper left hand corner + + + @return column number for the lower right hand corner + + + @return row number for the lower right hand corner + + + @return the size of the range (number of cells in the area). + + + List of CellRangeAddresses. Each structure represents a cell range + + + Convenience constructor for creating a CellRangeAddressList with a single + CellRangeAddress. Other CellRangeAddresses may be Added later. + + + @param in the RecordInputstream to read the record from + + + Get the number of following ADDR structures. The number of this + structures is automatically set when reading an Excel file and/or + increased when you manually Add a new ADDR structure . This is the reason + there isn't a set method for this field . + + @return number of ADDR structures + + + Add a cell range structure. + + @param firstRow - the upper left hand corner's row + @param firstCol - the upper left hand corner's col + @param lastRow - the lower right hand corner's row + @param lastCol - the lower right hand corner's col + @return the index of this ADDR structure + + + @return CellRangeAddress at the given index + + + @return the total size of for the specified number of ranges, + including the initial 2 byte range count + + + + Allow accessing the Initial value. + + + +

    Common conversion functions between Excel style A1, C27 style + cell references, and POI usermodel style row=0, column=0 + style references. Handles sheet-based and sheet-free references + as well, eg "Sheet1!A1" and "$B$72"

    + +

    Use CellReference when the concept of + relative/absolute does apply (such as a cell reference in a formula). + Use {@link CellAddress} when you want to refer to the location of a cell in a sheet + when the concept of relative/absolute does not apply (such as the anchor location + of a cell comment). + CellReferences have a concept of "sheet", while CellAddresses do not.

    +
    + + The character ($) that signifies a row or column value is absolute instead of relative + + + The character (!) that Separates sheet names from cell references + + + The character (') used to quote sheet names when they contain special characters + + + Matches a run of one or more letters followed by a run of one or more digits. + Both the letter and number groups are optional. + The run of letters is group 1 and the run of digits is group 2. + Each group may optionally be prefixed with a single '$'. + + + Matches references only where row and column are included. + Matches a run of one or more letters followed by a run of one or more digits. + If a reference does not match this pattern, it might match COLUMN_REF_PATTERN or ROW_REF_PATTERN + References may optionally include a single '$' before each group, but these are excluded from the Matcher.group(int). + + + Matches a run of one or more letters. The run of letters is group 1. + References may optionally include a single '$' before the group, but these are excluded from the Matcher.group(int). + + + Matches a run of one or more letters. The run of numbers is group 1. + References may optionally include a single '$' before the group, but these are excluded from the Matcher.group(int). + + + Named range names must start with a letter or underscore. Subsequent characters may include + digits or dot. (They can even end in dot). + + + Create an cell ref from a string representation. Sheet names containing special characters should be + delimited and escaped as per normal syntax rules for formulas. + + + @return possibly null if this is a 2D reference. Special characters are not + escaped or delimited + + + takes in a column reference portion of a CellRef and converts it from + ALPHA-26 number format to 0-based base 10. + 'A' -> 0 + 'Z' -> 25 + 'AA' -> 26 + 'IV' -> 255 + @return zero based column index + + + Takes in a 0-based base-10 column and returns a ALPHA-26 + representation. + eg column #3 -> D + + + Separates the row from the columns and returns an array of three Strings. The first element + is the sheet name. Only the first element may be null. The second element in is the column + name still in ALPHA-26 number format. The third element is the row. + + + Example return values: + + + + + +
    ResultComment
    A1Cell reference without sheet
    Sheet1!A1Standard sheet name
    'O''Brien''s Sales'!A1'Sheet name with special characters
    + @return the text representation of this cell reference as it would appear in a formula. +
    + + Returns the three parts of the cell reference, the + Sheet name (or null if none supplied), the 1 based + row number, and the A based column letter. + This will not include any markers for absolute + references, so use {@link #formatAsString()} + to properly turn references into strings. + + + Appends cell reference with '$' markers for absolute values as required. + Sheet name is not included. + + + Used to decide whether a name of the form "[A-Z]*[0-9]*" that appears in a formula can be + interpreted as a cell reference. Names of that form can be also used for sheets and/or + named ranges, and in those circumstances, the question of whether the potential cell + reference is valid (in range) becomes important. +

    + Note - that the maximum sheet size varies across Excel versions: +

    +

    + + + + +
    Version File Format Last Column Last Row
    97-2003BIFF8"IV" (2^8)65536 (2^14)
    2007BIFF12"XFD" (2^14)1048576 (2^20)
    + POI currently targets BIFF8 (Excel 97-2003), so the following behaviour can be observed for + this method: +
    + + + + + + + + + + + +
    Input Result
    "A", "1"true
    "a", "111"true
    "A", "65536"true
    "A", "65537"false
    "iv", "1"true
    "IW", "1"false
    "AAA", "1"false
    "a", "111"true
    "Sheet", "1"false
    + + @param colStr a string of only letter characters + @param rowStr a string of only digit characters + @return true if the row and col parameters are within range of a BIFF8 spreadsheet. +
    + + @deprecated 3.15 beta 2. Use {@link #isColumnWithinRange}. + + + Various utility functions that make working with a cells and rows easier. The various methods + that deal with style's allow you to create your CellStyles as you need them. When you apply a + style change to a cell, the code will attempt to see if a style already exists that meets your + needs. If not, then it will create a new style. This is to prevent creating too many styles. + there is an upper limit in Excel on the number of styles that can be supported. + + @author Eric Pugh epugh@upstate.com + @author (secondary) Avinash Kewalramani akewalramani@accelrys.com + + + Get a row from the spreadsheet, and create it if it doesn't exist. + + @param rowIndex The 0 based row number + @param sheet The sheet that the row is part of. + @return The row indicated by the rowCounter + + + Get a specific cell from a row. If the cell doesn't exist, then create it. + + @param row The row that the cell is part of + @param columnIndex The column index that the cell is in. + @return The cell indicated by the column. + + + Creates a cell, gives it a value, and applies a style if provided + + @param row the row to create the cell in + @param column the column index to create the cell in + @param value The value of the cell + @param style If the style is not null, then set + @return A new Cell + + + Create a cell, and give it a value. + + @param row the row to create the cell in + @param column the column index to create the cell in + @param value The value of the cell + @return A new Cell. + + + Take a cell, and align it. + + @param cell the cell to set the alignment for + @param workbook The workbook that is being worked with. + @param align the column alignment to use. + + @see CellStyle for alignment options + + + Take a cell, and align it. + + This is superior to cell.getCellStyle().setAlignment(align) because + this method will not modify the CellStyle object that may be referenced + by multiple cells. Instead, this method will search for existing CellStyles + that match the desired CellStyle, creating a new CellStyle with the desired + style if no match exists. + + @param cell the cell to set the alignment for + @param align the horizontal alignment to use. + + @see HorizontalAlignment for alignment options + @since POI 3.15 beta 3 + + + Take a cell, and vertically align it. + + This is superior to cell.getCellStyle().setVerticalAlignment(align) because + this method will not modify the CellStyle object that may be referenced + by multiple cells. Instead, this method will search for existing CellStyles + that match the desired CellStyle, creating a new CellStyle with the desired + style if no match exists. + + @param cell the cell to set the alignment for + @param align the vertical alignment to use. + + @see VerticalAlignment for alignment options + @since POI 3.15 beta 3 + + + Take a cell, and apply a font to it + + @param cell the cell to set the alignment for + @param workbook The workbook that is being worked with. + @param font The Font that you want to set... + + + Take a cell, and apply a font to it + + @param cell the cell to set the alignment for + @param font The Font that you want to set. + @throws IllegalArgumentException if font and cell do not belong to the same workbook + + +

    This method attempts to find an existing CellStyle that matches the cell's + current style plus styles properties in properties. A new style is created if the + workbook does not contain a matching style.

    + +

    Modifies the cell style of cell without affecting other cells that use the + same style.

    + +

    This is necessary because Excel has an upper limit on the number of styles that it supports.

    + +

    This function is more efficient than multiple calls to + {@link #setCellStyleProperty(org.apache.poi.ss.usermodel.Cell, org.apache.poi.ss.usermodel.Workbook, String, Object)} + if adding multiple cell styles.

    + +

    For performance reasons, if this is the only cell in a workbook that uses a cell style, + this method does NOT remove the old style from the workbook. + +

    + + @param cell The cell to change the style of + @param properties The properties to be added to a cell style, as {propertyName: propertyValue}. + @since POI 3.14 beta 2 +
    + +

    This method attempts to find an existing CellStyle that matches the cell's + current style plus a single style property propertyName with value + propertyValue. + A new style is created if the workbook does not contain a matching style.

    + +

    Modifies the cell style of cell without affecting other cells that use the + same style.

    + +

    If setting more than one cell style property on a cell, use + {@link #setCellStyleProperties(org.apache.poi.ss.usermodel.Cell, Map)}, + which is faster and does not add unnecessary intermediate CellStyles to the workbook.

    + + @param cell The cell that is to be changed. + @param propertyName The name of the property that is to be changed. + @param propertyValue The value of the property that is to be changed. +
    + +

    This method attempts to find an existing CellStyle that matches the cell's + current style plus a single style property propertyName with value + propertyValue. + A new style is created if the workbook does not contain a matching style.

    + +

    Modifies the cell style of cell without affecting other cells that use the + same style.

    + +

    If setting more than one cell style property on a cell, use + {@link #setCellStyleProperties(Cell, Map)}, + which is faster and does not add unnecessary intermediate CellStyles to the workbook.

    + + @param workbook The workbook that is being worked with. + @param propertyName The name of the property that is to be changed. + @param propertyValue The value of the property that is to be changed. + @param cell The cell that needs it's style changes +
    + + Copies the entries in src to dest, using the preferential data type + so that maps can be compared for equality + + @param src the property map to copy from (read-only) + @param dest the property map to copy into + @since POI 3.15 beta 3 + + + Returns a map containing the format properties of the given cell style. + The returned map is not tied to style, so subsequent changes + to style will not modify the map, and changes to the returned + map will not modify the cell style. The returned map is mutable. + @param style cell style + @return map of format properties (String -> Object) + @see #setFormatProperties(org.apache.poi.ss.usermodel.CellStyle, org.apache.poi.ss.usermodel.Workbook, java.util.Map) + + + Sets the format properties of the given style based on the given map. + + @param style cell style + @param workbook parent workbook + @param properties map of format properties (String -> Object) + @see #getFormatProperties(CellStyle) + + + Utility method that returns the named short value form the given map. + + @param properties map of named properties (String -> Object) + @param name property name + @return zero if the property does not exist, or is not a {@link Short}. + + + Utility method that returns the named int value from the given map. + + @param properties map of named properties (String -> Object) + @param name property name + @return zero if the property does not exist, or is not a {@link Integer} + otherwise the property value + + + Utility method that returns the named BorderStyle value form the given map. + + @param properties map of named properties (String -> Object) + @param name property name + @return Border style if set, otherwise {@link BorderStyle#NONE} + + + Utility method that returns the named FillPattern value from the given map. + + @param properties map of named properties (String -> Object) + @param name property name + @return FillPattern style if set, otherwise {@link FillPattern#NO_FILL} + @since POI 3.15 beta 3 + + + Utility method that returns the named HorizontalAlignment value from the given map. + + @param properties map of named properties (String -> Object) + @param name property name + @return HorizontalAlignment style if set, otherwise {@link HorizontalAlignment#GENERAL} + @since POI 3.15 beta 3 + + + Utility method that returns the named VerticalAlignment value from the given map. + + @param properties map of named properties (String -> Object) + @param name property name + @return VerticalAlignment style if set, otherwise {@link VerticalAlignment#BOTTOM} + @since POI 3.15 beta 3 + + + Utility method that returns the named boolean value form the given map. + + @param properties map of properties (String -> Object) + @param name property name + @return false if the property does not exist, or is not a {@link Boolean}. + + + Utility method that puts the given value to the given map. + + @param properties map of properties (String -> Object) + @param name property name + @param value property value + + + Utility method that puts the named short value to the given map. + + @param properties map of properties (String -> Object) + @param name property name + @param value property value + + + Utility method that puts the named short value to the given map. + + @param properties map of properties (String -> Object) + @param name property name + @param value property value + + + Utility method that puts the named boolean value to the given map. + + @param properties map of properties (String -> Object) + @param name property name + @param value property value + + + Looks for text in the cell that should be unicode, like an alpha and provides the + unicode version of it. + + @param cell The cell to check for unicode values + @return translated to unicode + + + Represents callback for CellWalk traverse method. + @author Roman Kashitsyn + + + @param cell current cell + @param ctx information about invokation context + + + Traverse cell range. + + @author Roman Kashitsyn + + + Should we call handler on empty (blank) cells. Default is + false. + @return true if handler should be called on empty (blank) + cells, false otherwise. + + + Sets the traverseEmptyCells property. + @param traverseEmptyCells new property value + + + Traverse cell range from top left to bottom right cell. + @param handler handler to call on each appropriate cell + + + Inner class to hold walk context. + @author Roman Kashitsyn + + + @author Roman Kashitsyn + + + Returns ordinal number of cell in range. Numeration starts + from top left cell and ends at bottom right cell. Here is a + brief example (number in cell is it's ordinal number): + + + + + + +
    12
    34
    + + @return ordinal number of current cell +
    + + Returns number of current row. + @return number of current row + + + Returns number of current column. + @return number of current column + + + Always 64 bits long (MSB, bit-63 is '1') + + + Convert to an equivalent {@link NormalisedDecimal} representation having 15 decimal digits of precision in the + non-fractional bits of the significand. + + + @return the number of non-fractional bits after the MSB of the significand + + + + A substitute class for Format class in Java + + + + Format class for Excel's SSN Format. This class mimics Excel's built-in + SSN Formatting. + + @author James May + + + Format a number as an SSN + + + Format class for Excel Zip + 4 Format. This class mimics Excel's + built-in Formatting for Zip + 4. + @author James May + + + Format a number as Zip + 4 + + + Format class for Excel phone number Format. This class mimics Excel's + built-in phone number Formatting. + @author James May + + + Format a number as a phone number + + + Format class that does nothing and always returns a constant string. + + This format is used to simulate Excel's handling of a format string + of all # when the value is 0. Excel will output "", Java will output "0". + + @see DataFormatter#createFormat(double, int, String) + + + The value the exponent field Gets for all NaN and InfInity values + + + @param rawBits the 64 bit binary representation of the double value + @return the top 12 bits (sign and biased exponent value) + + + The minimum value in 'Base-10 normalised form'.
    + When {@link #_binaryExponent} == 46 this is the the minimum {@link #_frac} value + (1014-0.05) * 2^17 +
    + Values between (1014-0.05) and 1014 will be represented as '1' + followed by 14 zeros. + Values less than (1014-0.05) will get Shifted by one more power of 10 + + This frac value rounds to '1' followed by fourteen zeros with an incremented decimal exponent +
    + + For 'Base-10 normalised form'
    + The maximum {@link #_frac} value when {@link #_binaryExponent} == 49 + (10^15-0.5) * 2^14 +
    + + Width of a long + + + Minimum precision after discarding whole 32-bit words from the significand + + + @param nBits number of bits to shift right + + + Holds values for quick multiplication and division by 10 + + + Number of powers of ten Contained in the significand + + + 219 + + + the value of {@link #_fractionalPart} that represents 0.5 + + + 1015 + + + Rounds at the digit with value 10decimalExponent + + + The decimal exponent increased by one less than the digit count of {@link #_wholePart} + + + The whole part of the significand (typically 15 digits). + + 47-50 bits long (MSB may be anywhere from bit 46 to 49) + LSB is units bit. + + + The fractional part of the significand. + 24 bits (only top 14-17 bits significant): a value between 0x000000 and 0xFFFF80 + + + Convert to an equivalent {@link ExpandedDouble} representation (binary frac and exponent). + The resulting transformed object is easily Converted to a 64 bit IEEE double: +
      +
    • bits 2-53 of the {@link #GetSignificand()} become the 52 bit 'fraction'.
    • +
    • {@link #GetBinaryExponent()} is biased by 1023 to give the 'exponent'.
    • +
    + The sign bit must be obtained from somewhere else. + @return a new {@link NormalisedDecimal} normalised to base 2 representation. +
    + + @return the significand as a fixed point number (with 24 fraction bits and 47-50 whole bits) + + + Rounds the first whole digit position (considers only units digit, not frational part). + Caller should check total digit count of result to see whether the rounding operation caused + a carry out of the most significant digit + + + @return the number of powers of 10 which have been extracted from the significand and binary exponent. + + + assumes both this and other are normalised + + + This class attempts to reproduce Excel's behaviour for comparing numbers. Results are + mostly the same as those from {@link Double#compare(double, double)} but with some + rounding. For numbers that are very close, this code converts to a format having 15 + decimal digits of precision and a decimal exponent, before completing the comparison. +

    + In Excel formula evaluation, expressions like "(0.06-0.01)=0.05" evaluate to "TRUE" even + though the equivalent java expression is false. In examples like this, + Excel achieves the effect by having additional logic for comparison operations. +

    +

    + Note - Excel also gives special treatment to expressions like "0.06-0.01-0.05" which + evaluates to "0" (in java, rounding anomalies give a result of 6.9E-18). The special + behaviour here is for different reasons to the example above: If the last operator in a + cell formula is '+' or '-' and the result is less than 250 times smaller than + first operand, the result is rounded to zero. + Needless to say, the two rules are not consistent and it is relatively easy to find + examples that satisfy
    + "A=B" is "TRUE" but "A-B" is not "0"
    + and
    + "A=B" is "FALSE" but "A-B" is "0"
    +
    + This rule (for rounding the result of a final addition or subtraction), has not been + implemented in POI (as of Jul-2009). + + @return negative, 0, or positive according to the standard Excel comparison + of values a and b. + + + If both numbers are subnormal, Excel seems to use standard comparison rules + + + Usually any normal number is greater (in magnitude) than any subnormal number. + However there are some anomalous cases around the threshold where Excel produces screwy results + @param isNegative both values are either negative or positive. This parameter affects the sign of the comparison result + @return usually isNegative ? -1 : +1 + + + for formatting double values in error messages + + + Converts the supplied value to the text representation that Excel would give if + the value were to appear in an unformatted cell, or as a literal number in a formula.
    + Note - the results from this method differ slightly from those of Double.ToString() + In some special cases Excel behaves quite differently. This function attempts to reproduce + those results. +
    + + Holds information regarding a split plane or freeze plane for a sheet. + + + + Constant for active pane being the lower right + + + Constant for active pane being the upper right + + + Constant for active pane being the lower left + + + Constant for active pane being the upper left + + + Returns the vertical position of the split. + @return 0 if there is no vertical spilt, + or for a freeze pane the number of columns in the TOP pane, + or for a split plane the position of the split in 1/20th of a point. + + + Returns the horizontal position of the split. + @return 0 if there is no horizontal spilt, + or for a freeze pane the number of rows in the LEFT pane, + or for a split plane the position of the split in 1/20th of a point. + + + For a horizontal split returns the top row in the BOTTOM pane. + @return 0 if there is no horizontal split, or the top row of the bottom pane. + + + For a vertical split returns the left column in the RIGHT pane. + @return 0 if there is no vertical split, or the left column in the RIGHT pane. + + + Returns the active pane + @see #PANE_LOWER_RIGHT + @see #PANE_UPPER_RIGHT + @see #PANE_LOWER_LEFT + @see #PANE_UPPER_LEFT + @return the active pane. + + + Returns true if this is a Freeze pane, false if it is a split pane. + + + Various utility functions that make working with a region of cells easier. + + @author Eric Pugh epugh@upstate.com + @author (secondary) Avinash Kewalramani akewalramani@accelrys.com + + + For setting the same property on many cells to the same value + + +

    + Sets the left border for a region of cells by manipulating the cell style of the individual cells on the left + + The new border + The region that should have the border + The sheet that the region is on. +
    + + + Sets the left border color for a region of cells by manipulating the cell style of the individual cells on the left + + The color of the border + The region that should have the border + The sheet that the region is on. + + + + Sets the right border for a region of cells by manipulating the cell style of the individual cells on the right + + The new border + The region that should have the border + The sheet that the region is on. + + + + Sets the right border color for a region of cells by manipulating the cell style of the individual cells on the right + + The color of the border + The region that should have the border + The sheet that the region is on. + + + + Sets the bottom border for a region of cells by manipulating the cell style of the individual cells on the bottom + + The new border + The region that should have the border + The sheet that the region is on + + + + Sets the bottom border color for a region of cells by manipulating the cell style of the individual cells on the bottom + + The color of the border + The region that should have the border + The sheet that the region is on. + + + + Sets the top border for a region of cells by manipulating the cell style of the individual cells on the top + + The new border + The region that should have the border + The sheet that the region is on. + + + + Sets the top border color for a region of cells by manipulating the cell style of the individual cells on the top + + The color of the border + The region that should have the border + The sheet that the region is on. + + + Class {@code SheetBuilder} provides an easy way of building workbook sheets + from 2D array of Objects. It can be used in test cases to improve code + readability or in Swing applications with tables. + + @author Roman Kashitsyn + + + Returns {@code true} if null array elements should be treated as empty + cells. + + @return {@code true} if null objects should be treated as empty cells + and {@code false} otherwise + + + Specifies if null array elements should be treated as empty cells. + + @param shouldCreateEmptyCells {@code true} if null array elements should be + treated as empty cells + @return {@code this} + + + Specifies name of the sheet to build. If not specified, default name (provided by + workbook) will be used instead. + @param sheetName sheet name to use + @return {@code this} + + + Builds sheet from parent workbook and 2D array with cell + values. Creates rows anyway (even if row contains only null + cells), creates cells if either corresponding array value is not + null or createEmptyCells property is true. + The conversion is performed in the following way: +

    +

      +
    • Numbers become numeric cells.
    • +
    • java.util.Date or java.util.Calendar + instances become date cells.
    • +
    • String with leading '=' char become formulas (leading '=' + will be truncated).
    • +
    • Other objects become strings via Object.toString() + method call.
    • +
    + + @return newly created sheet +
    + + Sets the cell value using object type information. + @param cell cell to change + @param value value to set + + + Holds a collection of Sheet names and their associated + reference numbers. + + @author Andrew C. Oliver (acoliver at apache dot org) + + + + Helper methods for when working with Usermodel sheets + + @author Yegor Kozlov + + + Dummy formula Evaluator that does nothing. + YK: The only reason of having this class is that + {@link NPOI.SS.UserModel.DataFormatter#formatCellValue(NPOI.SS.UserModel.Cell)} + returns formula string for formula cells. Dummy Evaluator Makes it to format the cached formula result. + + See Bugzilla #50021 + + + Compute width of a single cell + + @param cell the cell whose width is to be calculated + @param defaultCharWidth the width of a single character + @param formatter formatter used to prepare the text to be measured + @param useMergedCells whether to use merged cells + @return the width in pixels or -1 if cell is empty + + + Compute width of a column and return the result + + @param sheet the sheet to calculate + @param column 0-based index of the column + @param useMergedCells whether to use merged cells + @return the width in pixels or -1 if all cells are empty + + + Compute width of a column based on a subset of the rows and return the result + + @param sheet the sheet to calculate + @param column 0-based index of the column + @param useMergedCells whether to use merged cells + @param firstRow 0-based index of the first row to consider (inclusive) + @param lastRow 0-based index of the last row to consider (inclusive) + @param maxRows limit the scope to maxRows rows to speed up the function, or leave 0 (optional) + @return the width in pixels or -1 if cell is empty + + + Get default character width + + @param wb the workbook to get the default character width from + @return default character width + + + Compute width of a single cell in a row + Convenience method for {@link getCellWidth} + + @param row the row that contains the cell of interest + @param column the column number of the cell whose width is to be calculated + @param defaultCharWidth the width of a single character + @param formatter formatter used to prepare the text to be measured + @param useMergedCells whether to use merged cells + @return the width in pixels or -1 if cell is empty + + + Check if the Fonts are installed correctly so that Java can compute the size of + columns. + + If a Cell uses a Font which is not available on the operating system then Java may + fail to return useful Font metrics and thus lead to an auto-computed size of 0. + + This method allows to check if computing the sizes for a given Font will succeed or not. + + @param font The Font that is used in the Cell + @return true if computing the size for this Font will succeed, false otherwise + + + + Convert HSSFFont to Font. + + The font. + + + + + Check if the cell is in the specified cell range + + the cell range to check in + the row to check + the column to check + return true if the range contains the cell [rowIx, colIx] + + + Generate a valid sheet name based on the existing one. Used when cloning sheets. + + @param srcName the original sheet name to + @return clone sheet name + + + Return the cell, taking account of merged regions. Allows you to find the + cell who's contents are Shown in a given position in the sheet. + +

    If the cell at the given co-ordinates is a merged cell, this will + return the primary (top-left) most cell of the merged region.

    +

    If the cell at the given co-ordinates is not in a merged region, + then will return the cell itself.

    +

    If there is no cell defined at the given co-ordinates, will return + null.

    +
    + + For POI internal use only + + @author Josh Micich + + + Helper methods for when working with Usermodel Workbooks + + + Creates a valid sheet name, which is conform to the rules. + In any case, the result safely can be used for + {@link org.apache.poi.ss.usermodel.Workbook#setSheetName(int, String)}. +
    + Rules: +
      +
    • never null
    • +
    • minimum length is 1
    • +
    • maximum length is 31
    • +
    • doesn't contain special chars: 0x0000, 0x0003, / \ ? * ] [
    • +
    • Sheet names must not begin or end with ' (apostrophe)
    • +
    + Invalid characters are replaced by one space character ' '. + + @param nameProposal can be any string, will be truncated if necessary, + allowed to be null + @return a valid string, "empty" if to short, "null" if null +
    + + Creates a valid sheet name, which is conform to the rules. + In any case, the result safely can be used for + {@link org.apache.poi.ss.usermodel.Workbook#setSheetName(int, String)}. +
    + Rules: +
      +
    • never null
    • +
    • minimum length is 1
    • +
    • maximum length is 31
    • +
    • doesn't contain special chars: : 0x0000, 0x0003, / \ ? * ] [
    • +
    • Sheet names must not begin or end with ' (apostrophe)
    • +
    + + @param nameProposal can be any string, will be truncated if necessary, + allowed to be null + @param replaceChar the char to replace invalid characters. + @return a valid string, "empty" if to short, "null" if null +
    + + Validates sheet name. + +

    + The character count MUST be greater than or equal to 1 and less than or equal to 31. + The string MUST NOT contain the any of the following characters: +

      +
    • 0x0000
    • +
    • 0x0003
    • +
    • colon (:)
    • +
    • backslash (\)
    • +
    • asterisk (*)
    • +
    • question mark (?)
    • +
    • forward slash (/)
    • +
    • opening square bracket ([)
    • +
    • closing square bracket (])
    • +
    + The string MUST NOT begin or end with the single quote (') character. +

    + + @param sheetName the name to validate +
    + + Common interface for Excel text extractors, covering + HSSF and XSSF + + + Retreives the text contents of the file + + + This enum allows spReadsheets from multiple Excel versions to be handled by the common code. + Properties of this enum correspond to attributes of the spReadsheet that are easily + discernable to the user. It is not intended to deal with low-level issues like file formats. +

    + + @author Josh Micich + @author Yegor Kozlov + + + Excel97 format aka BIFF8 +

      +
    • The total number of available columns is 256 (2^8)
    • +
    • The total number of available rows is 64k (2^16)
    • +
    • The maximum number of arguments to a function is 30
    • +
    • Number of conditional format conditions on a cell is 3
    • +
    • Length of text cell contents is unlimited
    • +
    • Length of text cell contents is 32767
    • +
    +
    + + Excel2007 + +
      +
    • The total number of available columns is 16K (2^14)
    • +
    • The total number of available rows is 1M (2^20)
    • +
    • The maximum number of arguments to a function is 255
    • +
    • Number of conditional format conditions on a cell is unlimited + (actually limited by available memory in Excel)
    • +
    • Length of text cell contents is unlimited
    • +
    +
    + + @return the default file extension of spReadsheet + + + @return the maximum number of usable rows in each spReadsheet + + + @return the last (maximum) valid row index, equals to GetMaxRows() - 1 + + + @return the maximum number of usable columns in each spReadsheet + + + @return the last (maximum) valid column index, equals to GetMaxColumns() - 1 + + + @return the maximum number arguments that can be passed to a multi-arg function (e.g. COUNTIF) + + + + @return the maximum number of conditional format conditions on a cell + + + + @return the last valid column index in a ALPHA-26 representation + (IV or XFD). + + + @return the maximum number of cell styles per spreadsheet + + + @return the maximum length of a text cell + + + + This holds the common functionality for all POI + Document classes. + Currently, this relates to Document Information Properties + + @author Nick Burch + + + Holds metadata on our document + + + Holds further metadata on our document + + + The directory that our document lives in + + + + just for test case TestPOIDocumentMain.TestWriteReadProperties + + + + For our own logging use + + + Constructs from an old-style OPOIFS + + + + Initializes a new instance of the class. + + The fs. + + + Constructs from the default POIFS + + + Will create whichever of SummaryInformation + and DocumentSummaryInformation (HPSF) properties + are not already part of your document. + This is normally useful when creating a new + document from scratch. + If the information properties are already there, + then nothing will happen. + + + + Fetch the Document Summary Information of the document + + The document summary information. + + + + Fetch the Summary Information of the document + + The summary information. + + + + Find, and Create objects for, the standard + Documment Information Properties (HPSF). + If a given property Set is missing or corrupt, + it will remain null; + + + + + For a given named property entry, either return it or null if + if it wasn't found + + The property to read + The value of the given property or null if it wasn't found. + If retrieving properties fails + + + + For a given named property entry, either return it or null if + if it wasn't found + + The property to read + the encryption descriptor in case of cryptoAPI encryption + The value of the given property or null if it wasn't found. + If retrieving properties fails + + + Writes out the updated standard Document Information Properties (HPSF) + into the currently open NPOIFSFileSystem + TODO Implement in-place update + + @throws IOException if an error when writing to the open + {@link NPOIFSFileSystem} occurs + TODO throws exception if open from stream not file + + + + Writes out the standard Documment Information Properties (HPSF) + + the POIFSFileSystem to Write the properties into + + + + Writes out the standard Documment Information Properties (HPSF) + + the POIFSFileSystem to Write the properties into. + a list of POIFS entries to Add the property names too. + + + + Writes out a given ProperySet + + the (POIFS Level) name of the property to Write. + the PropertySet to Write out. + the POIFSFileSystem to Write the property into. + + + Called during a {@link #write()} to ensure that the Document (and + associated {@link POIFSFileSystem}) was opened in a way compatible + with an in-place write. + + @ if the document was opened suitably + + + + Writes the document out to the specified new {@link File}. If the file + exists, it will be replaced, otherwise a new one will be created + + @param newFile The new File to write to. + + @ thrown on errors writing to the file + + + Writes the document out to the specified output stream. The + stream is not closed as part of this operation. + + Note - if the Document was opened from a {@link File} rather + than an {@link InputStream}, you must write out using + {@link #write()} or to a different File. Overwriting the currently + open file via an OutputStream isn't possible. + + If {@code stream} is a {@link java.io.FileOutputStream} on a networked drive + or has a high cost/latency associated with each written byte, + consider wrapping the OutputStream in a {@link java.io.BufferedOutputStream} + to improve write performance, or use {@link #write()} / {@link #write(File)} + if possible. + + @param out The stream to write to. + + @ thrown on errors writing to the stream + + + Closes the underlying {@link NPOIFSFileSystem} from which + the document was read, if any. Has no effect on documents + opened from an InputStream, or newly created ones. + + Once {@link #close()} has been called, no further operations + should be called on the document. + + + Base class of all the exceptions that POI throws in the event + that it's given a file that isn't supported + + + + Common Parent for OLE2 based Text Extractors + of POI Documents, such as .doc, .xls + You will typically find the implementation of + a given format's text extractor under NPOI.Format.Extractor + + + @see org.apache.poi.hssf.extractor.ExcelExtractor + @see org.apache.poi.hslf.extractor.PowerPointExtractor + @see org.apache.poi.hdgf.extractor.VisioTextExtractor + @see org.apache.poi.hwpf.extractor.WordExtractor + + + + The POIDocument that's open + + + + Creates a new text extractor for the given document + + + + + + Creates a new text extractor, using the same document as another + text extractor. Normally only used by properties extractors. + + + + + + Returns the document information metadata for the document + + The doc summary information. + + + + Returns the summary information metadata for the document + + The summary information. + + + + Returns an HPSF powered text extractor for the + document properties metadata, such as title and author. + + + + + Return the underlying DirectoryEntry of this document. + + @return the DirectoryEntry that is associated with the POIDocument of this extractor. + + + + Common Parent for Text Extractors + of POI Documents. + You will typically find the implementation of + a given format's text extractor under + org.apache.poi.[format].extractor . + + @see org.apache.poi.hssf.extractor.ExcelExtractor + @see org.apache.poi.hslf.extractor.PowerPointExtractor + @see org.apache.poi.hdgf.extractor.VisioTextExtractor + @see org.apache.poi.hwpf.extractor.WordExtractor + + + + Retrieves all the text from the document. + How cells, paragraphs etc are separated in the text + is implementation specific - see the javadocs for + a specific project for details. + + All the text from the document. + + + + Returns another text extractor, which is able to + output the textual content of the document + metadata / properties, such as author and title. + + The metadata text extractor. + + + Used to ensure file handle cleanup. + + @param fs filesystem to close + + + This class represents a run of text that share common properties. + + + + Gets the fonts which shall be used to display the text contents of + this run. Specifies a font which shall be used to format all "normal" + characters in the run + + + + @return The text of the Run, including any tabs/spaces/etc + + + This class represents a paragraph, made up of one or more + Runs of text. + +
    +
    diff --git a/DAL/bin/Debug/SqlSugar.dll b/DAL/bin/Debug/SqlSugar.dll new file mode 100644 index 0000000..e0ac058 Binary files /dev/null and b/DAL/bin/Debug/SqlSugar.dll differ diff --git a/DAL/bin/Debug/Tool.dll b/DAL/bin/Debug/Tool.dll new file mode 100644 index 0000000..d76f056 Binary files /dev/null and b/DAL/bin/Debug/Tool.dll differ diff --git a/DAL/bin/Debug/Tool.pdb b/DAL/bin/Debug/Tool.pdb new file mode 100644 index 0000000..3ec701c Binary files /dev/null and b/DAL/bin/Debug/Tool.pdb differ diff --git a/DAL/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs b/DAL/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs new file mode 100644 index 0000000..f1a77a1 --- /dev/null +++ b/DAL/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.2", FrameworkDisplayName = ".NET Framework 4.5.2")] diff --git a/DAL/obj/Debug/DAL.csproj.AssemblyReference.cache b/DAL/obj/Debug/DAL.csproj.AssemblyReference.cache new file mode 100644 index 0000000..0aef34f Binary files /dev/null and b/DAL/obj/Debug/DAL.csproj.AssemblyReference.cache differ diff --git a/DAL/obj/Debug/DAL.csproj.CoreCompileInputs.cache b/DAL/obj/Debug/DAL.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..9b3d222 --- /dev/null +++ b/DAL/obj/Debug/DAL.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +fe1430da598476beb59a227e01b90eccdd1b8b854775aa7738cf602c74d6c360 diff --git a/DAL/obj/Debug/DAL.csproj.FileListAbsolute.txt b/DAL/obj/Debug/DAL.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..5065327 --- /dev/null +++ b/DAL/obj/Debug/DAL.csproj.FileListAbsolute.txt @@ -0,0 +1,28 @@ +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\DAL.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\DAL.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\obj\Debug\DAL.csproj.AssemblyReference.cache +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\obj\Debug\DAL.csproj.CoreCompileInputs.cache +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\obj\Debug\DAL.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\obj\Debug\DAL.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\BouncyCastle.Crypto.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\ICSharpCode.SharpZipLib.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\Model.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\NPOI.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\NPOI.OOXML.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\NPOI.OpenXml4Net.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\NPOI.OpenXmlFormats.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\Model.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\BouncyCastle.Crypto.xml +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\ICSharpCode.SharpZipLib.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\ICSharpCode.SharpZipLib.xml +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\NPOI.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\NPOI.xml +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\NPOI.OOXML.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\NPOI.OOXML.xml +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\NPOI.OpenXml4Net.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\NPOI.OpenXml4Net.xml +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\NPOI.OpenXmlFormats.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\SqlSugar.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\Tool.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\bin\Debug\Tool.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\DAL\obj\Debug\DAL.csproj.Up2Date diff --git a/DAL/obj/Debug/DAL.csproj.Up2Date b/DAL/obj/Debug/DAL.csproj.Up2Date new file mode 100644 index 0000000..e69de29 diff --git a/DAL/obj/Debug/DAL.dll b/DAL/obj/Debug/DAL.dll new file mode 100644 index 0000000..bef604b Binary files /dev/null and b/DAL/obj/Debug/DAL.dll differ diff --git a/DAL/obj/Debug/DAL.pdb b/DAL/obj/Debug/DAL.pdb new file mode 100644 index 0000000..50d0928 Binary files /dev/null and b/DAL/obj/Debug/DAL.pdb differ diff --git a/DAL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/DAL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..bd81f60 Binary files /dev/null and b/DAL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/DAL/packages.config b/DAL/packages.config new file mode 100644 index 0000000..c0b59e6 --- /dev/null +++ b/DAL/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Model/CheckModel.cs b/Model/CheckModel.cs new file mode 100644 index 0000000..5e40901 --- /dev/null +++ b/Model/CheckModel.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class ExclModel + {/// + /// Band + /// + public string Band { get; set; } = ""; + /// + /// Test result + /// + public string Result { get; set; } = ""; + /// + /// Channel + /// + public string Channel { get; set; } = ""; + /// + /// 文件名 + /// + public string textname { get; set; } = ""; + } + public class IniModel + {/// + /// LTE_BAND_TX_LOW_LOSS-1 + /// + public string LTE_BAND_TX_LOW_LOSS { get; set; } = ""; + /// + /// LTE_BAND_TX_MID_LOSS-2 + /// + public string LTE_BAND_TX_MID_LOSS { get; set; } = ""; + /// + /// LTE_BAND_TX_HIGH_LOSS-3 + /// + public string LTE_BAND_TX_HIGH_LOSS { get; set; } = ""; + /// + /// LTE_BAND_RX_LOW_LOSS-4 + /// + public string LTE_BAND_RX_LOW_LOSS { get; set; } = ""; + /// + /// LTE_BAND_RX_MID_LOSS-5 + /// + public string LTE_BAND_RX_MID_LOSS { get; set; } = ""; + /// + /// LTE_BAND_TX_HIGH_LOSS-6 + /// + public string LTE_BAND_RX_HIGH_LOSS { get; set; } = ""; + /// + /// index + /// + public string several_line_loss { get; set; } = ""; + /// + /// 文件名 + /// + public string textname { get; set; } = ""; + } + public class JinjiModel + { + /// + /// type + /// + public string type { get; set; } = ""; + /// + /// snimei + /// + public string[] snimei { get; set; } = new string[] { }; + } + public class CheckModel + { + } +} diff --git a/Model/Model.csproj b/Model/Model.csproj new file mode 100644 index 0000000..7e41100 --- /dev/null +++ b/Model/Model.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + {5A80DE64-FCD5-4D7C-8A1E-4199412D80BD} + Library + Properties + Model + Model + v4.5.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Model/Properties/AssemblyInfo.cs b/Model/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..9da606d --- /dev/null +++ b/Model/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Model")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Model")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("5a80de64-fcd5-4d7c-8a1e-4199412d80bd")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Model/SettingModel.cs b/Model/SettingModel.cs new file mode 100644 index 0000000..3e037e9 --- /dev/null +++ b/Model/SettingModel.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class UserModel + { + /// + /// 工号 + /// + public string userName { get; set; } + /// + /// 姓名 + /// + public string nickName { get; set; } + /// + /// 部门 + /// + public string bumen { get; set; } + /// + /// 职位 + /// + public string zhiwei { get; set; } + } + public class SettingModel + { + /// + /// 机型 + /// + public string[] Types { get; set; } + /// + /// 夹具号1 + /// + public string devcode1 { get; set; } + /// + /// 夹具号2 + /// + public string devcode2 { get; set; } + /// + /// 线损文件地址 + /// + public string pathini { get; set; } + /// + /// 线损文件备份地址 + /// + public string pathen { get; set; } + /// + /// load配置文件地址 + /// + public string pathLoad { get; set; } + /// + /// log文件1地址 + /// + public string pathch1 { get; set; } + /// + /// log文件2地址 + /// + public string pathch2 { get; set; } + public int index { get; set; } + + public SettingModel() + { + this.Types = new string[] { }; + this.index = 0; + this.devcode1 = ""; + this.devcode2 = ""; + this.pathini = ""; + this.pathen = ""; + this.pathLoad = ""; + this.pathch1 = ""; + this.pathch1 = ""; + } + } +} diff --git a/Model/bin/Debug/Model.dll b/Model/bin/Debug/Model.dll new file mode 100644 index 0000000..7ce17f8 Binary files /dev/null and b/Model/bin/Debug/Model.dll differ diff --git a/Model/bin/Debug/Model.pdb b/Model/bin/Debug/Model.pdb new file mode 100644 index 0000000..91b11a9 Binary files /dev/null and b/Model/bin/Debug/Model.pdb differ diff --git a/Model/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs b/Model/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs new file mode 100644 index 0000000..f1a77a1 --- /dev/null +++ b/Model/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.2", FrameworkDisplayName = ".NET Framework 4.5.2")] diff --git a/Model/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Model/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..274f9b5 Binary files /dev/null and b/Model/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Model/obj/Debug/Model.csproj.AssemblyReference.cache b/Model/obj/Debug/Model.csproj.AssemblyReference.cache new file mode 100644 index 0000000..ad79f31 Binary files /dev/null and b/Model/obj/Debug/Model.csproj.AssemblyReference.cache differ diff --git a/Model/obj/Debug/Model.csproj.CoreCompileInputs.cache b/Model/obj/Debug/Model.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..9be1bcf --- /dev/null +++ b/Model/obj/Debug/Model.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +5b0fed87316a2c0929a745c8f24737b80a561f496f6dcc58c66336c4775c7d1c diff --git a/Model/obj/Debug/Model.csproj.FileListAbsolute.txt b/Model/obj/Debug/Model.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..1319c3c --- /dev/null +++ b/Model/obj/Debug/Model.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +D:\桌面文件夹\Desktop\中移版本库\金机点检\Model\bin\Debug\Model.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\Model\bin\Debug\Model.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\Model\obj\Debug\Model.csproj.AssemblyReference.cache +D:\桌面文件夹\Desktop\中移版本库\金机点检\Model\obj\Debug\Model.csproj.CoreCompileInputs.cache +D:\桌面文件夹\Desktop\中移版本库\金机点检\Model\obj\Debug\Model.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\Model\obj\Debug\Model.pdb diff --git a/Model/obj/Debug/Model.dll b/Model/obj/Debug/Model.dll new file mode 100644 index 0000000..7ce17f8 Binary files /dev/null and b/Model/obj/Debug/Model.dll differ diff --git a/Model/obj/Debug/Model.pdb b/Model/obj/Debug/Model.pdb new file mode 100644 index 0000000..91b11a9 Binary files /dev/null and b/Model/obj/Debug/Model.pdb differ diff --git a/Tool/CommonHelper.cs b/Tool/CommonHelper.cs new file mode 100644 index 0000000..c775003 --- /dev/null +++ b/Tool/CommonHelper.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tool +{ + public class CommonHelper + { + public static bool IMEICheck(string imei) + { + + int vl_Sum1 = 0, vl_Sum2 = 0, vl_Total = 0; + int vl_Temp = 0; + + for (int i = 0; i < 14; i++) + { + /*(1)将奇数位数字相加(从1开始计数)*/ + if ((i % 2) == 0) + { + vl_Sum1 = vl_Sum1 + int.Parse(imei[i].ToString()); + } + else + { + /*(2)将偶数位数字分别乘以2,分别计算个位数和十位数之和(从1开始计数)*/ + vl_Temp = (int.Parse(imei[i].ToString())) * 2; + if (vl_Temp < 10) + { + vl_Sum2 = vl_Sum2 + vl_Temp; + } + else + { + vl_Sum2 = vl_Sum2 + 1 + vl_Temp - 10; + } + } + } + /*(1)+(2)*/ + vl_Total = vl_Sum1 + vl_Sum2; + /*如果得出的数个位是0则校验位为0,否则为10减去个位数 */ + if ((vl_Total % 10) == 0) + { + if (imei[14] == '0') + { + return true; + } + } + else + { + if ((10 - (vl_Total % 10)).ToString() == imei[14].ToString()) + { + return true; + } + } + return false; + } + public static string GetIMEI(string imei) + { + + int vl_Sum1 = 0, vl_Sum2 = 0, vl_Total = 0; + int vl_Temp = 0; + + for (int i = 0; i < 14; i++) + { + /*(1)将奇数位数字相加(从1开始计数)*/ + if ((i % 2) == 0) + { + vl_Sum1 = vl_Sum1 + int.Parse(imei[i].ToString()); + } + else + { + /*(2)将偶数位数字分别乘以2,分别计算个位数和十位数之和(从1开始计数)*/ + vl_Temp = (int.Parse(imei[i].ToString())) * 2; + if (vl_Temp < 10) + { + vl_Sum2 = vl_Sum2 + vl_Temp; + } + else + { + vl_Sum2 = vl_Sum2 + 1 + vl_Temp - 10; + } + } + } + /*(1)+(2)*/ + vl_Total = vl_Sum1 + vl_Sum2; + /*如果得出的数个位是0则校验位为0,否则为10减去个位数 */ + if ((vl_Total % 10) == 0) + { + return imei + "0"; + } + else + { + return imei + (10 - (vl_Total % 10)).ToString(); + } + } + public static List Clone(List list) where T : new() + { + List items = new List(); + + foreach (var m in list) + { + var model = new T(); + var ps = model.GetType().GetProperties(); + var properties = m.GetType().GetProperties(); + foreach (var p in properties) + { + foreach (var pm in ps) + { + if (pm.Name == p.Name) + { + pm.SetValue(model, p.GetValue(m)); + } + } + } + items.Add(model); + } + + return items; + } + } +} diff --git a/Tool/ConfigHelper.cs b/Tool/ConfigHelper.cs new file mode 100644 index 0000000..e41e52c --- /dev/null +++ b/Tool/ConfigHelper.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tool +{ + public class ConfigHelper + { + //向配置文件写入内容 + public void Write(string key, string value) + { + + Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); + if (config.AppSettings.Settings[key] == null) + { + config.AppSettings.Settings.Add(key, value); + } + else + { + config.AppSettings.Settings[key].Value = value; + } + config.Save(ConfigurationSaveMode.Modified); + ConfigurationManager.RefreshSection("appSettings");// 重新加载新的配置文件 + } + //读取配置文件内容 + public Dictionary ReadAll() + { + Dictionary dic = new Dictionary(); + Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); + foreach (string key in config.AppSettings.Settings.AllKeys) + { + dic[key] = config.AppSettings.Settings[key].Value; + } + return dic; + } + public Dictionary ReadAll(string path) + { + Dictionary dic = new Dictionary(); + ExeConfigurationFileMap map = new ExeConfigurationFileMap + { + ExeConfigFilename = path + }; + Configuration config = ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None); + foreach (string key in config.AppSettings.Settings.AllKeys) + { + dic[key] = config.AppSettings.Settings[key].Value; + } + return dic; + } + } +} diff --git a/Tool/FileHelper.cs b/Tool/FileHelper.cs new file mode 100644 index 0000000..588c5ce --- /dev/null +++ b/Tool/FileHelper.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tool +{ + public class FileHelper + { + public void Transport(string file, string dst, string product) + { + string src; + src = file; + + FileStream inFileStream = new FileStream(src, FileMode.Open); + if (!Directory.Exists(dst)) + { + Directory.CreateDirectory(dst); + } + dst = dst + "\\" + product; + FileStream outFileStream = new FileStream(dst, FileMode.OpenOrCreate); + try + { + byte[] buf = new byte[inFileStream.Length]; + + int byteCount; + + while ((byteCount = inFileStream.Read(buf, 0, buf.Length)) > 0) + { + outFileStream.Write(buf, 0, byteCount); + } + + inFileStream.Flush(); + outFileStream.Flush(); + } + finally + { + inFileStream.Close(); + outFileStream.Close(); + } + + } + } +} diff --git a/Tool/LogHelper.cs b/Tool/LogHelper.cs new file mode 100644 index 0000000..50e45ce --- /dev/null +++ b/Tool/LogHelper.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tool +{ + public class LogHelper + { + private static readonly object LogLock = new object(); + public static void WriteLog(string msg) + { + lock (LogLock) + { + string filePath = AppDomain.CurrentDomain.BaseDirectory + "Log"; + if (!Directory.Exists(filePath)) + { + Directory.CreateDirectory(filePath); + } + string logPath = AppDomain.CurrentDomain.BaseDirectory + "Log\\" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt"; + try + { + using (StreamWriter sw = File.AppendText(logPath)) + { + sw.WriteLine("**************************************************"); + sw.WriteLine("时间:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); + sw.WriteLine(msg); + sw.WriteLine(); + sw.Flush(); + sw.Close(); + sw.Dispose(); + } + } + catch (IOException e) + { + using (StreamWriter sw = File.AppendText(logPath)) + { + + sw.WriteLine("**************************************************"); + sw.WriteLine("时间:" + DateTime.Now.ToString("yyy-MM-dd HH:mm:ss")); + sw.WriteLine("异常:" + e.Message); + sw.WriteLine(); + sw.Flush(); + sw.Close(); + sw.Dispose(); + } + } + } + } + public static void WriteLogMater(string msg) + { + lock (LogLock) + { + string filePath = AppDomain.CurrentDomain.BaseDirectory + "Logmater"; + if (!Directory.Exists(filePath)) + { + Directory.CreateDirectory(filePath); + } + string logPath = AppDomain.CurrentDomain.BaseDirectory + "Logmater\\" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt"; + try + { + using (StreamWriter sw = File.AppendText(logPath)) + { + sw.WriteLine("**************************************************"); + sw.WriteLine("时间:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); + sw.WriteLine(msg); + sw.WriteLine(); + sw.Flush(); + sw.Close(); + sw.Dispose(); + } + } + catch (IOException e) + { + using (StreamWriter sw = File.AppendText(logPath)) + { + + sw.WriteLine("**************************************************"); + sw.WriteLine("时间:" + DateTime.Now.ToString("yyy-MM-dd HH:mm:ss")); + sw.WriteLine("异常:" + e.Message); + sw.WriteLine(); + sw.Flush(); + sw.Close(); + sw.Dispose(); + } + } + } + } + } +} diff --git a/Tool/Properties/AssemblyInfo.cs b/Tool/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5134e9b --- /dev/null +++ b/Tool/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Tool")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tool")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("cc8994b7-1312-45e6-abda-92413692feb3")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Tool/SqlHelper.cs b/Tool/SqlHelper.cs new file mode 100644 index 0000000..6e4a01e --- /dev/null +++ b/Tool/SqlHelper.cs @@ -0,0 +1,165 @@ +using Model; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tool +{ + public class SqlHelper + { + private ConnectionConfig connection2 = null; + public SqlSugarClient db2 = null; + private ConnectionConfig connection3 = null; + public SqlSugarClient db3 = null; + public SqlHelper() + { + string SqlIP2 = "192.168.2.2"; + string SqlIP3 = "192.168.2.3"; + string database = "MESDB"; + string uid = "sa"; + string pwd = "8ik,9ol."; + connection2 = new ConnectionConfig() + { + ConnectionString = "server='" + SqlIP2 + "';initial catalog='" + database + "';uid='" + uid + "';pwd='" + pwd + "'", + DbType = DbType.SqlServer, + IsAutoCloseConnection = true, + InitKeyType = InitKeyType.Attribute + }; + db2 = new SqlSugarClient(connection2); + connection3 = new ConnectionConfig() + { + ConnectionString = "server='" + SqlIP3 + "';initial catalog='" + database + "';uid='" + uid + "';pwd='" + pwd + "'", + DbType = DbType.SqlServer, + IsAutoCloseConnection = true, + InitKeyType = InitKeyType.Attribute + }; + db3 = new SqlSugarClient(connection3); + } + #region t_CMCC_Jinji + [SugarTable("t_CMCC_Jinji")] + public class t_CMCC_Jinji + { + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + public int id { get; set; } + public string type { get; set; } + public string snimei { get; set; } + public string inname { get; set; } + public DateTime? inTime { get; set; } + public string endname { get; set; } + public DateTime? endTime { get; set; } + } + #endregion + #region t_CMCC_JinjiPower + [SugarTable("t_CMCC_JinjiPower")] + public class t_CMCC_JinjiPower + { + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + public int id { get; set; } + public string type { get; set; } + public string snimei { get; set; } + public string Devcode { get; set; } + public string Band { get; set; } + public string Channel { get; set; } + public string Result { get; set; } + public string kind { get; set; } + public string textname { get; set; } + public string Powername { get; set; } + public DateTime? PowerTime { get; set; } + } + #endregion + #region t_CMCC_JinjiLine + [SugarTable("t_CMCC_JinjiLine")] + public class t_CMCC_JinjiLine + { + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + public int id { get; set; } + /// + /// 机型 + /// + public string type { get; set; } + /// + /// 金机编码 + /// + public string snimei { get; set; } + /// + /// 夹具号 + /// + public string Devcode { get; set; } + /// + /// 类别 + /// + public string kind { get; set; } + /// + /// 第几项线损 + /// + public string several_line_loss { get; set; } + public string LTE_BAND_TX_LOW_LOSS { get; set; } + public string LTE_BAND_TX_MID_LOSS { get; set; } + public string LTE_BAND_TX_HIGH_LOSS { get; set; } + public string LTE_BAND_RX_LOW_LOSS { get; set; } + public string LTE_BAND_RX_MID_LOSS { get; set; } + public string LTE_BAND_RX_HIGH_LOSS { get; set; } + /// + /// 线损文件名称 + /// + public string textname { get; set; } + /// + /// 录入人员名称 + /// + public string Linename { get; set; } + /// + /// 录入时间 + /// + public DateTime? LineTime { get; set; } + } + #endregion + #region t_DD_UserDetail + [SugarTable("t_DD_UserDetail")] + public class t_DD_UserDetail + { + /// + /// 姓名 + /// + public string username { get; set; } + /// + /// 工号 + /// + public string jobnumber { get; set; } + /// + /// 公司 + /// + public string companyName { get; set; } + /// + /// 部门 + /// + public string workPlace { get; set; } + /// + /// 职位 + /// + public string position { get; set; } + } + #endregion + public UserModel GetUser(string jobnumber) + { + try + { + var userModel = db2.Queryable().Where(it => it.jobnumber == jobnumber && it.companyName == "重庆盟讯电子科技有限公司").First(); + if (userModel == null) + { + return null; + } + return new UserModel() { userName = jobnumber, nickName = userModel.username, bumen = userModel.workPlace, zhiwei = userModel.position }; + } + // return db.Queryable().Where(it => it.jobnumber == jobnumber && it.companyName == "重庆盟讯电子科技有限公司").First().username; + //} + catch (System.Exception ee) + { + LogHelper.WriteLog(ee.ToString()); + throw ee; + } + } + } +} diff --git a/Tool/Tool.csproj b/Tool/Tool.csproj new file mode 100644 index 0000000..a45730f --- /dev/null +++ b/Tool/Tool.csproj @@ -0,0 +1,65 @@ + + + + + Debug + AnyCPU + {CC8994B7-1312-45E6-ABDA-92413692FEB3} + Library + Properties + Tool + Tool + v4.5.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\点检\packages\SqlSugar.5.0.3\lib\SqlSugar.dll + + + + + + + + + + + + + + + + + + + + + + {5A80DE64-FCD5-4D7C-8A1E-4199412D80BD} + Model + + + + + + + \ No newline at end of file diff --git a/Tool/bin/Debug/Model.dll b/Tool/bin/Debug/Model.dll new file mode 100644 index 0000000..7ce17f8 Binary files /dev/null and b/Tool/bin/Debug/Model.dll differ diff --git a/Tool/bin/Debug/Model.pdb b/Tool/bin/Debug/Model.pdb new file mode 100644 index 0000000..91b11a9 Binary files /dev/null and b/Tool/bin/Debug/Model.pdb differ diff --git a/Tool/bin/Debug/SqlSugar.dll b/Tool/bin/Debug/SqlSugar.dll new file mode 100644 index 0000000..e0ac058 Binary files /dev/null and b/Tool/bin/Debug/SqlSugar.dll differ diff --git a/Tool/bin/Debug/Tool.dll b/Tool/bin/Debug/Tool.dll new file mode 100644 index 0000000..d76f056 Binary files /dev/null and b/Tool/bin/Debug/Tool.dll differ diff --git a/Tool/bin/Debug/Tool.pdb b/Tool/bin/Debug/Tool.pdb new file mode 100644 index 0000000..3ec701c Binary files /dev/null and b/Tool/bin/Debug/Tool.pdb differ diff --git a/Tool/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs b/Tool/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs new file mode 100644 index 0000000..f1a77a1 --- /dev/null +++ b/Tool/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.2", FrameworkDisplayName = ".NET Framework 4.5.2")] diff --git a/Tool/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Tool/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..f1353b6 Binary files /dev/null and b/Tool/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Tool/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Tool/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..bd3d43d Binary files /dev/null and b/Tool/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Tool/obj/Debug/Tool.csproj.AssemblyReference.cache b/Tool/obj/Debug/Tool.csproj.AssemblyReference.cache new file mode 100644 index 0000000..40979b4 Binary files /dev/null and b/Tool/obj/Debug/Tool.csproj.AssemblyReference.cache differ diff --git a/Tool/obj/Debug/Tool.csproj.CoreCompileInputs.cache b/Tool/obj/Debug/Tool.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..5db9d34 --- /dev/null +++ b/Tool/obj/Debug/Tool.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +f94c390bd35cd2c22da9892b123575027c89d50c705b1483972981c73fe32bc2 diff --git a/Tool/obj/Debug/Tool.csproj.FileListAbsolute.txt b/Tool/obj/Debug/Tool.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..7ff1240 --- /dev/null +++ b/Tool/obj/Debug/Tool.csproj.FileListAbsolute.txt @@ -0,0 +1,10 @@ +D:\桌面文件夹\Desktop\中移版本库\金机点检\Tool\bin\Debug\Tool.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\Tool\bin\Debug\Tool.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\Tool\obj\Debug\Tool.csproj.AssemblyReference.cache +D:\桌面文件夹\Desktop\中移版本库\金机点检\Tool\obj\Debug\Tool.csproj.CoreCompileInputs.cache +D:\桌面文件夹\Desktop\中移版本库\金机点检\Tool\obj\Debug\Tool.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\Tool\obj\Debug\Tool.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\Tool\bin\Debug\Model.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\Tool\bin\Debug\SqlSugar.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\Tool\bin\Debug\Model.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\Tool\obj\Debug\Tool.csproj.Up2Date diff --git a/Tool/obj/Debug/Tool.csproj.Up2Date b/Tool/obj/Debug/Tool.csproj.Up2Date new file mode 100644 index 0000000..e69de29 diff --git a/Tool/obj/Debug/Tool.dll b/Tool/obj/Debug/Tool.dll new file mode 100644 index 0000000..d76f056 Binary files /dev/null and b/Tool/obj/Debug/Tool.dll differ diff --git a/Tool/obj/Debug/Tool.pdb b/Tool/obj/Debug/Tool.pdb new file mode 100644 index 0000000..3ec701c Binary files /dev/null and b/Tool/obj/Debug/Tool.pdb differ diff --git a/Tool/packages.config b/Tool/packages.config new file mode 100644 index 0000000..24c1fc5 --- /dev/null +++ b/Tool/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/View/App.config b/View/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/View/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/View/App.xaml b/View/App.xaml new file mode 100644 index 0000000..02e89fe --- /dev/null +++ b/View/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/View/App.xaml.cs b/View/App.xaml.cs new file mode 100644 index 0000000..f658822 --- /dev/null +++ b/View/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace View +{ + /// + /// App.xaml 的交互逻辑 + /// + public partial class App : Application + { + } +} diff --git a/View/MesLoginView.xaml b/View/MesLoginView.xaml new file mode 100644 index 0000000..27f6b1a --- /dev/null +++ b/View/MesLoginView.xaml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/View/MesLoginView.xaml.cs b/View/MesLoginView.xaml.cs new file mode 100644 index 0000000..de079dc --- /dev/null +++ b/View/MesLoginView.xaml.cs @@ -0,0 +1,169 @@ +using Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Security.Principal; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Tool; + +namespace View +{ + /// + /// MainWindow.xaml 的交互逻辑 + /// + /// + public class LoginModel + { + public string name { get; set; } + public string pro { get; set; } + /// + /// 部门 + /// + public string bumen { get; set; } + } + public partial class MesLoginView : Window + { + private List Users = new List(); + private Dictionary dic = new Dictionary(); + private LoginModel _model; + public MesLoginView() + { + InitializeComponent(); + } + public MesLoginView(string title, Dictionary dic1, List Item, LoginModel model) + { + InitializeComponent(); + try + { + Users = new List(); + int num = int.Parse(dic1["账号数量"]); + for (int i = 0; i < num; i++) + { + string nam = "账号" + (i + 1).ToString(); + Users.Add(dic1[nam]); + } + } + catch (Exception ex) + { + new MessageBoxView("提示!", ex.ToString() + "账号数量可能不是数值").ShowDialog(); + return; + } + dic = dic1; + lblTitle.Text = title; + ComboBoxProd.ItemsSource = Item; + ComboBoxProd.SelectedIndex = 0; + _model = model; + } + public string userName = ""; + private UserModel UserModel = new UserModel(); + private SqlHelper mesHelper = new SqlHelper(); + private SqlHelper sqlHelper = new SqlHelper(); + private void btnCancel_Click(object sender, RoutedEventArgs e) + { + this.Close(); + } + + private void btnLogin_Click(object sender, RoutedEventArgs e) + { + try + { + if (Account.Text == "") + { + new MessageBoxView("提示!", "请输入账号!").ShowDialog(); + return; + } + IntPtr p = Marshal.SecureStringToBSTR(this.Password.SecurePassword); // 使用.NET内部算法把IntPtr指向处的字符集合转换成字符串 + string password = Marshal.PtrToStringBSTR(p); // 顺便校验一下 + if (password == "") + { + new MessageBoxView("提示!", "请输入密码!").ShowDialog(); + return; + } + //try + //{ + // if (mesHelper.Login(Account.Text.ToLower(), password)) + // { + // string user = mesHelper.GetName(Account.Text.ToLower()); + // if (user == "") + // { + // new MessageBoxView("提示!", "获取姓名失败!").ShowDialog(); + // return; + // } + // _model.name = user; + // _model.pro = ComboBoxProd.Text; + // this.DialogResult = true; + // this.Close(); + // } + // else + // { + // new MessageBoxView("提示!", "账号或密码错误!").ShowDialog(); + // } + //} + //catch (Exception) + //{ + //} + try + { + UserModel user = sqlHelper.GetUser(Account.Text.ToLower()); + if (user.nickName == "") + { + new MessageBoxView("提示!", "获取姓名失败!").ShowDialog(); + return; + } + string nume = user.nickName + ";" + password; + if (!Users.Contains(nume)) + { + new MessageBoxView("提示!", "密码错误").ShowDialog(); + return; + } + _model.name = user.nickName; + _model.pro = ComboBoxProd.Text; + _model.bumen = user.bumen; + this.DialogResult = true; + this.Close(); + } + catch (Exception ee) + { + new MessageBoxView("错误!", ee.Message.ToString()).ShowDialog(); + LogHelper.WriteLog(ee.ToString()); + } + //} + } + catch (Exception ee) + { + new MessageBoxView("错误!", ee.Message.ToString()).ShowDialog(); + LogHelper.WriteLog(ee.ToString()); + } + } + + //private void main_PreviewKeyDown(object sender, KeyEventArgs e) + //{ + // //if (e.Key == Key.Enter) + // //{ + // // btnLogin_Click(null, null); + // //} + // //else if (e.Key == Key.Escape) + // //{ + // // this.Close(); + + // //} + //} + + private void main_Loaded(object sender, RoutedEventArgs e) + { + Account.Focus(); + Account.SelectAll(); + } + } +} diff --git a/View/MessageBoxView.xaml b/View/MessageBoxView.xaml new file mode 100644 index 0000000..96926e2 --- /dev/null +++ b/View/MessageBoxView.xaml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/View/MessageBoxView.xaml.cs b/View/MessageBoxView.xaml.cs new file mode 100644 index 0000000..492c0d5 --- /dev/null +++ b/View/MessageBoxView.xaml.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace View +{ + /// + /// MessageBoxView.xaml 的交互逻辑 + /// + public partial class MessageBoxView : Window + { + public MessageBoxView(string title, string msg) + { + InitializeComponent(); + Title = title; + Message = msg; + } + public new string Title + { + get { return this.lblTitle.Text; } + set { this.lblTitle.Text = value; } + } + + public string Message + { + get { return this.lblMsg.Text; } + set { this.lblMsg.Text = value; } + } + + + private void Yes_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + this.DialogResult = true; + this.Close(); + } + + + private void No_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + this.DialogResult = false; + this.Close(); + } + } +} + diff --git a/View/Properties/AssemblyInfo.cs b/View/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..38518fa --- /dev/null +++ b/View/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("View")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("View")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +//若要开始生成可本地化的应用程序,请设置 +//.csproj 文件中的 CultureYouAreCodingWith +//在 中。例如,如果你使用的是美国英语。 +//使用的是美国英语,请将 设置为 en-US。 然后取消 +//对以下 NeutralResourceLanguage 特性的注释。 更新 +//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //主题特定资源词典所处位置 + //(未在页面中找到资源时使用, + //或应用程序资源字典中找到时使用) + ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 + //(未在页面中找到资源时使用, + //、应用程序或任何主题专用资源字典中找到时使用) +)] + + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/View/Properties/Resources.Designer.cs b/View/Properties/Resources.Designer.cs new file mode 100644 index 0000000..5e4fbb1 --- /dev/null +++ b/View/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本: 4.0.30319.42000 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace View.Properties +{ + + + /// + /// 强类型资源类,用于查找本地化字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// 返回此类使用的缓存 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("View.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/View/Properties/Resources.resx b/View/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/View/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/View/Properties/Settings.Designer.cs b/View/Properties/Settings.Designer.cs new file mode 100644 index 0000000..b8246d8 --- /dev/null +++ b/View/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace View.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/View/Properties/Settings.settings b/View/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/View/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/View/View.csproj b/View/View.csproj new file mode 100644 index 0000000..feace60 --- /dev/null +++ b/View/View.csproj @@ -0,0 +1,134 @@ + + + + + Debug + AnyCPU + {D7E15C96-E37B-4520-B89C-B6D563CAE6B8} + WinExe + View + View + v4.5.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\点检\packages\HandyControls.3.4.2\lib\net452\HandyControl.dll + + + ..\点检\packages\MaterialDesignColors.2.0.3\lib\net452\MaterialDesignColors.dll + + + ..\点检\packages\MaterialDesignThemes.4.2.1\lib\net452\MaterialDesignThemes.Wpf.dll + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MesLoginView.xaml + Code + + + Designer + MSBuild:Compile + + + + + MessageBoxView.xaml + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + {5A80DE64-FCD5-4D7C-8A1E-4199412D80BD} + Model + + + {CC8994B7-1312-45E6-ABDA-92413692FEB3} + Tool + + + + + + + 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + + \ No newline at end of file diff --git a/View/bin/Debug/HandyControl.dll b/View/bin/Debug/HandyControl.dll new file mode 100644 index 0000000..cbcda3d Binary files /dev/null and b/View/bin/Debug/HandyControl.dll differ diff --git a/View/bin/Debug/HandyControl.pdb b/View/bin/Debug/HandyControl.pdb new file mode 100644 index 0000000..b6007d3 Binary files /dev/null and b/View/bin/Debug/HandyControl.pdb differ diff --git a/View/bin/Debug/HandyControl.xml b/View/bin/Debug/HandyControl.xml new file mode 100644 index 0000000..d149271 --- /dev/null +++ b/View/bin/Debug/HandyControl.xml @@ -0,0 +1,7193 @@ + + + + HandyControl + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to 全部. + + + + + Looks up a localized string similar to 上午. + + + + + Looks up a localized string similar to Please wait.... + + + + + Looks up a localized string similar to 取消. + + + + + Looks up a localized string similar to 清空. + + + + + Looks up a localized string similar to 关闭. + + + + + Looks up a localized string similar to 关闭所有. + + + + + Looks up a localized string similar to 关闭其他. + + + + + Looks up a localized string similar to 确定. + + + + + Looks up a localized string similar to 错误的图片路径. + + + + + Looks up a localized string similar to 非法的图片尺寸. + + + + + Looks up a localized string similar to 查找. + + + + + Looks up a localized string similar to 格式错误. + + + + + Looks up a localized string similar to 间隔10分钟. + + + + + Looks up a localized string similar to 间隔1小时. + + + + + Looks up a localized string similar to 间隔1分钟. + + + + + Looks up a localized string similar to 间隔2小时. + + + + + Looks up a localized string similar to 间隔30分钟. + + + + + Looks up a localized string similar to 间隔30秒. + + + + + Looks up a localized string similar to 间隔5分钟. + + + + + Looks up a localized string similar to 不能为空. + + + + + Looks up a localized string similar to 跳转. + + + + + Looks up a localized string similar to 查找类似 {0} 的本地化字符串。. + + + + + Looks up a localized string similar to 杂项. + + + + + Looks up a localized string similar to 下一页. + + + + + Looks up a localized string similar to 否. + + + + + Looks up a localized string similar to 暂无数据. + + + + + Looks up a localized string similar to 不在范围内. + + + + + Looks up a localized string similar to 页面模式. + + + + + Looks up a localized string similar to 下午. + + + + + Looks up a localized string similar to PNG图片. + + + + + Looks up a localized string similar to 上一页. + + + + + Looks up a localized string similar to 滚动模式. + + + + + Looks up a localized string similar to 提示. + + + + + Looks up a localized string similar to 过大. + + + + + Looks up a localized string similar to 双页模式. + + + + + Looks up a localized string similar to 未知. + + + + + Looks up a localized string similar to 未知大小. + + + + + Looks up a localized string similar to 是. + + + + + Looks up a localized string similar to 放大. + + + + + Looks up a localized string similar to 缩小. + + + + + 查找类似 全部 的本地化字符串。 + + + + + 查找类似 上午 的本地化字符串。 + + + + + 查找类似 取消 的本地化字符串。 + + + + + 查找类似 清空 的本地化字符串。 + + + + + 查找类似 关闭 的本地化字符串。 + + + + + 查找类似 关闭所有 的本地化字符串。 + + + + + 查找类似 关闭其他 的本地化字符串。 + + + + + 查找类似 确定 的本地化字符串。 + + + + + 查找类似 错误的图片路径 的本地化字符串。 + + + + + 查找类似 非法的图片尺寸 的本地化字符串。 + + + + + 查找类似 查找 的本地化字符串。 + + + + + 查找类似 格式错误 的本地化字符串。 + + + + + 查找类似 间隔10分钟 的本地化字符串。 + + + + + 查找类似 间隔1小时 的本地化字符串。 + + + + + 查找类似 间隔1分钟 的本地化字符串。 + + + + + 查找类似 间隔2小时 的本地化字符串。 + + + + + 查找类似 间隔30分钟 的本地化字符串。 + + + + + 查找类似 间隔30秒 的本地化字符串。 + + + + + 查找类似 间隔5分钟 的本地化字符串。 + + + + + 查找类似 不能为空 的本地化字符串。 + + + + + 查找类似 跳转 的本地化字符串。 + + + + + 查找类似 查找类似 {0} 的本地化字符串。 的本地化字符串。 + + + + + 查找类似 杂项 的本地化字符串。 + + + + + 查找类似 下一页 的本地化字符串。 + + + + + 查找类似 否 的本地化字符串。 + + + + + 查找类似 暂无数据 的本地化字符串。 + + + + + 查找类似 不在范围内 的本地化字符串。 + + + + + 查找类似 页面模式 的本地化字符串。 + + + + + 查找类似 下午 的本地化字符串。 + + + + + 查找类似 PNG图片 的本地化字符串。 + + + + + 查找类似 上一页 的本地化字符串。 + + + + + 查找类似 滚动模式 的本地化字符串。 + + + + + 查找类似 提示 的本地化字符串。 + + + + + 查找类似 过大 的本地化字符串。 + + + + + 查找类似 双页模式 的本地化字符串。 + + + + + 查找类似 未知 的本地化字符串。 + + + + + 查找类似 未知大小 的本地化字符串。 + + + + + 查找类似 是 的本地化字符串。 + + + + + 查找类似 放大 的本地化字符串。 + + + + + 查找类似 缩小 的本地化字符串。 + + + + + 查找类似 全部 的本地化字符串。 + + + + + 查找类似 上午 的本地化字符串。 + + + + + 查找类似 取消 的本地化字符串。 + + + + + 查找类似 清空 的本地化字符串。 + + + + + 查找类似 关闭 的本地化字符串。 + + + + + 查找类似 关闭所有 的本地化字符串。 + + + + + 查找类似 关闭其他 的本地化字符串。 + + + + + 查找类似 确定 的本地化字符串。 + + + + + 查找类似 错误的图片路径 的本地化字符串。 + + + + + 查找类似 非法的图片尺寸 的本地化字符串。 + + + + + 查找类似 查找 的本地化字符串。 + + + + + 查找类似 格式错误 的本地化字符串。 + + + + + 查找类似 间隔10分钟 的本地化字符串。 + + + + + 查找类似 间隔1小时 的本地化字符串。 + + + + + 查找类似 间隔1分钟 的本地化字符串。 + + + + + 查找类似 间隔2小时 的本地化字符串。 + + + + + 查找类似 间隔30分钟 的本地化字符串。 + + + + + 查找类似 间隔30秒 的本地化字符串。 + + + + + 查找类似 间隔5分钟 的本地化字符串。 + + + + + 查找类似 不能为空 的本地化字符串。 + + + + + 查找类似 跳转 的本地化字符串。 + + + + + 查找类似 查找类似 {0} 的本地化字符串。 的本地化字符串。 + + + + + 查找类似 杂项 的本地化字符串。 + + + + + 查找类似 下一页 的本地化字符串。 + + + + + 查找类似 否 的本地化字符串。 + + + + + 查找类似 暂无数据 的本地化字符串。 + + + + + 查找类似 不在范围内 的本地化字符串。 + + + + + 查找类似 页面模式 的本地化字符串。 + + + + + 查找类似 下午 的本地化字符串。 + + + + + 查找类似 PNG图片 的本地化字符串。 + + + + + 查找类似 上一页 的本地化字符串。 + + + + + 查找类似 滚动模式 的本地化字符串。 + + + + + 查找类似 提示 的本地化字符串。 + + + + + 查找类似 过大 的本地化字符串。 + + + + + 查找类似 双页模式 的本地化字符串。 + + + + + 查找类似 未知 的本地化字符串。 + + + + + 查找类似 未知大小 的本地化字符串。 + + + + + 查找类似 是 的本地化字符串。 + + + + + 查找类似 放大 的本地化字符串。 + + + + + 查找类似 缩小 的本地化字符串。 + + + + + Placeholder + + + + + Necessary + + + + + Symbol + + + + + ContentHeight + + + + + MinContentHeight + + + + + MaxContentHeight + + + + + RegexPattern + + + + + PasswordLength + + + + + IsMonitoring + + + + + 掩码字符 + + + + + 计数 + + + + + 关闭计时器 + + + + + 开始计时器 + + + + + 切换块 + + + + + Replace the original property Text for binding text. + + + Don't use the property! + Because the has some unique behaviors + that is not needed at at , + which will cause some unexpected issue. + + + + + Gets or sets the text that need to be highlighted. + It can be an array of text separated by spaces. + + + + + Gets or sets the of the background of the highlight text. + + + + + 更新内容视图 + + + + + 更新内容视图位置 + + + + + 生成序号 + + + + + A control to provide a visual indicator when an application is busy. + + + + + Busyness group name. + + + + + Busy state for BusyIndicator. + + + + + Idle state for BusyIndicator. + + + + + BusyDisplay group. + + + + + Visible state name for BusyIndicator. + + + + + Hidden state name for BusyIndicator. + + + + + Timer used to delay the initial display and avoid flickering. + + + + + Overrides the OnApplyTemplate method. + + + + + Gets or sets a value indicating whether the BusyContent is visible. + + + + + Identifies the IsBusy dependency property. + + + + + Gets or sets a value indicating whether the busy indicator should show. + + + + + IsBusyProperty property changed handler. + + BusyIndicator that changed its IsBusy. + Event arguments. + + + + IsBusyProperty property changed handler. + + Event arguments. + + + + Identifies the BusyContent dependency property. + + + + + Gets or sets a value indicating the busy content to display to the user. + + + + + Identifies the BusyTemplate dependency property. + + + + + Gets or sets a value indicating the template to use for displaying the busy content to the user. + + + + + Identifies the DisplayAfter dependency property. + + + + + Gets or sets a value indicating how long to delay before displaying the busy content. + + + + + Identifies the FocusAfterBusy dependency property. + + + + + Gets or sets a Control that should get the focus when the busy indicator disapears. + + + + + Identifies the OverlayStyle dependency property. + + + + + Gets or sets a value indicating the style to use for the overlay. + + + + + Identifies the ProgressBarStyle dependency property. + + + + + Gets or sets a value indicating the style to use for the progress bar. + + + + + Handler for the DisplayAfterTimer. + + Event sender. + Event arguments. + + + + Changes the control's visual state(s). + + True if state transitions should be used. + + + + Get/set the speed ratio of the animation. + + + + + Get/set whether the loading indicator is active. + + + + + When overridden in a derived class, is invoked whenever application code + or internal processes call System.Windows.FrameworkElement.ApplyTemplate(). + + + + + Represents a control that enables a user to select a date by using a visual calendar display. + + + + + Occurs when a date is selected. + + + + + Occurs when the DisplayDate property is changed. + + + + + Occurs when the DisplayMode property is changed. + + + + + Occurs when the SelectionMode property is changed. + + + + + Static constructor + + + + + Initializes a new instance of the PersianCalendar class. + + + + + Gets or sets the dates that are not selectable. + + + + + Gets or sets the style for displaying a CalendarButton. + + + + + Identifies the CalendarButtonStyle dependency property. + + + + + Gets or sets the style for displaying a day. + + + + + Identifies the DayButtonStyle dependency property. + + + + + Gets or sets the style for a Month. + + + + + Identifies the MonthStyle dependency property. + + + + + Gets or sets the date to display. + + + + + + Identifies the DisplayDate dependency property. + + + + + DisplayDateProperty property changed handler. + + PersianCalendar that changed its DisplayDate. + DependencyPropertyChangedEventArgs. + + + + Gets or sets the last date to be displayed. + + + + + + Identifies the DisplayDateEnd dependency property. + + + + + DisplayDateEndProperty property changed handler. + + PersianCalendar that changed its DisplayDateEnd. + DependencyPropertyChangedEventArgs. + + + + Gets or sets the first date to be displayed. + + + + + + Identifies the DisplayDateStart dependency property. + + + + + DisplayDateStartProperty property changed handler. + + PersianCalendar that changed its DisplayDateStart. + DependencyPropertyChangedEventArgs. + + + + Gets or sets a value indicating whether the calendar is displayed in months or years. + + + + + Identifies the DisplayMode dependency property. + + + + + DisplayModeProperty property changed handler. + + PersianCalendar that changed its DisplayMode. + DependencyPropertyChangedEventArgs. + + + + Gets or sets the day that is considered the beginning of the week. + + + + + Identifies the FirstDayOfWeek dependency property. + + + + + FirstDayOfWeekProperty property changed handler. + + PersianCalendar that changed its FirstDayOfWeek. + DependencyPropertyChangedEventArgs. + + + + Gets or sets a value indicating whether the current date is highlighted. + + + + + Identifies the IsTodayHighlighted dependency property. + + + + + IsTodayHighlightedProperty property changed handler. + + PersianCalendar that changed its IsTodayHighlighted. + DependencyPropertyChangedEventArgs. + + + + Gets or sets the currently selected date. + + + + + + Identifies the SelectedDate dependency property. + + + + + SelectedDateProperty property changed handler. + + PersianCalendar that changed its SelectedDate. + DependencyPropertyChangedEventArgs. + + + + Gets the dates that are currently selected. + + + + + Gets or sets the selection mode for the calendar. + + + + + Identifies the SelectionMode dependency property. + + + + + This flag is used to determine whether DatePicker should change its + DisplayDate because of a SelectedDate change on its PersianCalendar + + + + + Invoked whenever application code or an internal process, + such as a rebuilding layout pass, calls the ApplyTemplate method. + + + + + Provides a text representation of the selected date. + + A text representation of the selected date, or an empty string if SelectedDate is a null reference. + + + + Creates the automation peer for this PersianCalendar Control. + + + + + + Called when this element gets focus. + + + + + Represents a control that allows the user to select a date. + + + + + Occurs when the drop-down PersianCalendar is closed. + + + + + Occurs when the drop-down PersianCalendar is opened. + + + + + Occurs when text entered into the PersianDatePicker cannot be parsed or the Date is not valid to be selected. + + + + + Occurs when a date is selected. + + + + + Static constructor + + + + + Initializes a new instance of the PersianDatePicker class. + + + + + Gets the days that are not selectable. + + + + + Gets or sets the style that is used when rendering the calendar. + + + + + Identifies the CalendarStyle dependency property. + + + + + Gets or sets the date to display. + + + + + + Identifies the DisplayDate dependency property. + + + + + Gets or sets the last date to be displayed. + + + + + + Identifies the DisplayDateEnd dependency property. + + + + + DisplayDateEndProperty property changed handler. + + PersianDatePicker that changed its DisplayDateEnd. + DependencyPropertyChangedEventArgs. + + + + Gets or sets the first date to be displayed. + + + + + + Identifies the DisplayDateStart dependency property. + + + + + DisplayDateStartProperty property changed handler. + + PersianDatePicker that changed its DisplayDateStart. + DependencyPropertyChangedEventArgs. + + + + Gets or sets the day that is considered the beginning of the week. + + + + + Identifies the FirstDayOfWeek dependency property. + + + + + Gets or sets a value that indicates whether the drop-down PersianCalendar is open or closed. + + + + + Identifies the IsDropDownOpen dependency property. + + + + + IsDropDownOpenProperty property changed handler. + + PersianDatePicker that changed its IsDropDownOpen. + DependencyPropertyChangedEventArgs. + + + + Called when the IsEnabled property changes. + + + + + Gets or sets a value that indicates whether the current date will be highlighted. + + + + + Identifies the IsTodayHighlighted dependency property. + + + + + Gets or sets the currently selected date. + + + + + + Identifies the SelectedDate dependency property. + + + + + SelectedDateProperty property changed handler. + + PersianDatePicker that changed its SelectedDate. + DependencyPropertyChangedEventArgs. + + + + Gets or sets the format that is used to display the selected date. + + + + + Identifies the SelectedDateFormat dependency property. + + + + + SelectedDateFormatProperty property changed handler. + + PersianDatePicker that changed its SelectedDateFormat. + DependencyPropertyChangedEventArgs. + + + + Gets or sets the text that is displayed by the PersianDatePicker. + + + + + Identifies the Text dependency property. + + + + + TextProperty property changed handler. + + PersianDatePicker that changed its Text. + DependencyPropertyChangedEventArgs. + + + + Sets the local Text property without breaking bindings + + + + + + Builds the visual tree for the PersianDatePicker control when a new template is applied. + + + + + Provides a text representation of the selected date. + + A text representation of the selected date, or an empty string if SelectedDate is a null reference. + + + + Creates the automation peer for this PersianDatePicker Control. + + + + + + Raises the DateValidationError event. + + A DatePickerDateValidationErrorEventArgs that contains the event data. + + + + Called when this element gets focus. + + + + + Input text is parsed in the correct format and changed into a DateTime object. + If the text can not be parsed TextParseError Event is thrown. + + + + + 时间日期选择器 + + + + + Sets the local Text property without breaking bindings + + + + + + 值改变事件 + + + + + 值改变事件 + + + + + Initialize Splash Window + + Create Splash Window and return it. + + SplashWindow + + + + SplashWindow splash = new SplashWindow(); + return splash; + + + + + + Add Status Messages + + + + + + Close Splash Window + + + + + Represents a dynamic data collection that provides notifications when items get added, removed, or when the whole list is refreshed. + + + + + + Initializes a new instance of the System.Collections.ObjectModel.ObservableCollection(Of T) class. + + + + + Initializes a new instance of the System.Collections.ObjectModel.ObservableCollection(Of T) class that contains elements copied from the specified collection. + + collection: The collection from which the elements are copied. + The collection parameter cannot be null. + + + + Adds the elements of the specified collection to the end of the ObservableCollection(Of T). + + + + + Removes the first occurence of each item in the specified collection from ObservableCollection(Of T). NOTE: with notificationMode = Remove, removed items starting index is not set because items are not guaranteed to be consecutive. + + + + + Clears the current collection and replaces it with the specified item. + + + + + Clears the current collection and replaces it with the specified collection. + + + + + 用来使窗口变得全屏的辅助类 + 采用设置窗口位置和尺寸,确保盖住整个屏幕的方式来实现全屏 + 目前已知需要满足的条件是:窗口盖住整个屏幕、窗口没有WS_THICKFRAME样式、窗口不能有标题栏且最大化 + + + + + 用于记录窗口全屏前位置的附加属性 + + + + + 用于记录窗口全屏前样式的附加属性 + + + + + 开始进入全屏模式 + 进入全屏模式后,窗口可通过 API 方式(也可以用 Win + Shift + Left/Right)移动,调整大小,但会根据目标矩形寻找显示器重新调整到全屏状态。 + 进入全屏后,不要修改样式等窗口属性,在退出时,会恢复到进入前的状态 + 进入全屏模式后会禁用 DWM 过渡动画 + + + + + 退出全屏模式 + 窗口会回到进入全屏模式时保存的状态 + 退出全屏模式后会重新启用 DWM 过渡动画 + + + + + 确保窗口全屏的Hook + 使用HandleProcessCorruptedStateExceptions,防止访问内存过程中因为一些致命异常导致程序崩溃 + + + + + Elements to be displayed when selected + + + + + Whether to hide the element + + + + + Rule ItemsControl + + + Each item in this category has the same size and margin + + + + + Lightweight version of ItemsControl + + + + + 带上下文菜单的按钮 + + + + + 带上下文菜单的切换按钮 + + + + + 封面流 + + + + + 最大显示数量的一半 + + + + + 页码 + + + + + 是否循环 + + + + + 存储所有的内容 + + + + + 当前在显示范围内的项 + + + + + 相机 + + + + + 3d画布 + + + + + 项容器 + + + + + 显示范围内第一个项的编号 + + + + + 显示范围内最后一个项的编号 + + + + + 页码 + + + + + 是否循环 + + + + + 批量添加资源 + + + + + + 添加一项资源 + + + + + + 添加一项资源 + + + + + + 删除指定位置的项 + + + + + + 更新项的位置 + + + + + + 更新显示范围 + + + + + 创建网格形状 + + + + + + + + + + 创建内容形状 + + + + + + 移动 + + + + + 命中测试 + + + + + + + 缩放比间隔 + + + + + 图片保存对话框 + + + + + 右下角小图片是否加载过 + + + + + 图片是否可以在x轴方向移动 + + + + + 图片是否可以在y轴方向移动 + + + + + 图片实际位置 + + + + + 图片实际旋转角度 + + + + + 图片实际旋缩放比 + + + + + 在图片上鼠标移动时的即时位置 + + + + + 鼠标是否在图片上按下左键 + + + + + 在图片上按下时图片的位置 + + + + + 在图片上按下时鼠标的位置 + + + + + 在小图片上鼠标移动时的即时位置 + + + + + 鼠标是否在小图片上按下左键 + + + + + 在小图片上按下时图片的位置 + + + + + 在小图片上按下时鼠标的位置 + + + + + 图片长宽比 + + + + + 图片是否倾斜 + + + + + 缩放高度间隔 + + + + + 缩放宽度间隔 + + + + + 底部BorderBottom(包含一些图片操作)是否显示中 + + + + + 带一个图片Uri的构造函数 + + + + + + 带一个图片路径的构造函数 + + + + + + 是否显示全屏按钮 + + + + + 关闭按钮是否显示中 + + + + + 是否显示全屏按钮 + + + + + 图片原始宽度 + + + + + 图片原始高度 + + + + + 关闭按钮是否显示中 + + + + + 底部BorderBottom(包含一些图片操作)是否显示中 + + + + + 初始化 + + + + + 右下角小图片显示切换 + + + + + 初始化右下角小图片 + + + + + 更新右下角小图片 + + + + + 缩放图片 + + + + + + 旋转图片 + + + + + + 移动图片 + + + + + 移动小图片 + + + + + 数据验证委托 + + + + + 数据搜索委托 + + + + + 数据是否错误 + + + + + 数据是否错误 + + + + + 错误提示 + + + + + 错误提示 + + + + + 文本类型 + + + + + 文本类型 + + + + + 文本类型 + + + + + 是否显示清除按钮 + + + + + 是否显示清除按钮 + + + + + 是否自动完成输入 + + + + + 是否自动完成输入 + + + + + 搜索文本 + + + + + 搜索文本 + + + + + 验证数据 + + + + + + 更新搜索的项目 + + + + + + 时间日期选择器 + + + + + Sets the local Text property without breaking bindings + + + + + + 表示可以成为一个数据输入控件 + + + + + 验证数据 + + + + + + 数据验证委托 + + + + + 数据是否错误 + + + + + 错误提示 + + + + + 文本类型 + + + + + 是否显示清除按钮 + + + + + 数值选择控件 + + + + + 值改变事件 + + + + + 值改变事件 + + + + + 当前值 + + + + + 当前值 + + + + + 最大值 + + + + + 最大值 + + + + + 最小值 + + + + + 最小值 + + + + + 指示每单击一下按钮时增加或减少的数量 + + + + + 指示每单击一下按钮时增加或减少的数量 + + + + + 指示要显示的小数位数 + + + + + 指示要显示的小数位数 + + + + + 指示要显示的数字的格式 + + + + + 指示要显示的数字的格式,这将会覆盖 属性 + + + + + 是否显示上下调值按钮 + + + + + 是否显示上下调值按钮 + + + + + 标识 IsReadOnly 依赖属性。 + + + + + 获取或设置一个值,该值指示NumericUpDown是否只读。 + + + + + 掩码字符 + + + + + 数据是否错误 + + + + + 错误提示 + + + + + 文本类型 + + + + + 是否显示清除按钮 + + + + + 是否实时搜索 + + + + + 是否实时搜索 + + + + + 时间选择器 + + + + + Sets the local Text property without breaking bindings + + + + + + 标记 + + + + + 轮播控件 + + + + + 是否自动跳转 + + + + + 跳转时间间隔 + + + + + 页码 + + + + + 计时器开关 + + + + + 更新页按钮 + + + + + 更新项的位置 + + + + + Color picker + + + + + The type of color currently displayed + + + + + Whether the control has been loaded + + + + + Do you need to update the ball position + + + + + Whether you are dragging the ball + + + + + Need to update information + + + + + Color selection panel width + + + + + Color selection panel height + + + + + Preset colors (a total of 18, two rows) + + + + + Color range collection + + + + + Color separated collection + + + + + Color change event + + + + + Color change event + + + + + Cancel event + + + + + Cancel event + + + + + Currently selected color + + + + + The type of color currently displayed + + + + + initialization + + + + + Create color buttons + + + + + + Internal update + + + + + Update color while dragging + + + + + message notification + + + + + count + + + + + Turn off timer + + + + + Message container + + + + + Start timer + + + + + Message container + + + + + + Display information + + + + + + success + + + + + + + Success + + + + + + Success Global + + + + + + Success Global + + + + + + Info + + + + + + + Info + + + + + + Info Global + + + + + + Info Global + + + + + + Warning + + + + + + + Warning + + + + + + Warning Global + + + + + + Warning Global + + + + + + Error + + + + + + + Error + + + + + + Error Global + + + + + + Error Global + + + + + + Fatal + + + + + + + Fatal + + + + + + Fatal Global + + + + + + Fatal Global + + + + + + Ask + + + + + + + + Ask + + + + + + Ask Global + + + + + + + Ask Global + + + + + + Close + + + + + Clear + + + + + + Clear + + + + + + Clear Global + + + + + 页码 + + + + + 页面更新事件 + + + + + 页面更新事件 + + + + + 最大页数 + + + + + 最大页数 + + + + + 每页的数据量 + + + + + 每页的数据量 + + + + + 当前页 + + + + + 当前页 + + + + + 表示当前选中的按钮距离左右两个方向按钮的最大间隔(4表示间隔4个按钮,如果超过则用省略号表示) + + + + + 表示当前选中的按钮距离左右两个方向按钮的最大间隔(4表示间隔4个按钮,如果超过则用省略号表示) + + + + + 更新 + + + + + 是否响应鼠标滚轮操作 + + + + + 是否响应鼠标滚轮操作 + + + + + 是否支持惯性 + + + + + 是否支持惯性 + + + + + 控件是否可以穿透点击 + + + + + 控件是否可以穿透点击 + + + + + 当前垂直滚动偏移 + + + + + 当前垂直滚动偏移 + + + + + 当前水平滚动偏移 + + + + + 当前水平滚动偏移 + + + + + 用以代替Grid + + + 当不需要Grid的行、列分隔等功能时建议用此轻量级类代替 + + + + + 波浪进度条 + + + + + 预览内容 + + + + + 预览内容 + + + + + 值改变事件 + + + + + 值改变事件 + + + + + 步骤改变事件 + + + + + 步骤改变事件 + + + + + 步骤条单元项 + + + + + 步骤编号 + + + + + 步骤编号 + + + + + 步骤状态 + + + + + 步骤状态 + + + + + 是否为内部操作 + + + + + 是否启用动画 + + + + + 是否启用动画 + + + + + 是否可以拖动 + + + + + 是否可以拖动 + + + + + 是否显示关闭按钮 + + + + + 是否显示关闭按钮 + + + + + 是否显示上下文菜单 + + + + + 是否显示上下文菜单 + + + + + 是否将标签填充 + + + + + 是否将标签填充 + + + + + 标签宽度 + + + + + 标签宽度 + + + + + 标签高度 + + + + + 标签高度 + + + + + 是否可以滚动 + + + + + 是否可以滚动 + + + + + 是否显示溢出按钮 + + + + + 是否显示溢出按钮 + + + + + 是否显示滚动按钮 + + + + + 是否显示滚动按钮 + + + + + 可见的标签数量 + + + + + 动画速度 + + + + + 选项卡是否处于拖动状态 + + + + + 选项卡是否等待被拖动 + + + + + 拖动中的选项卡坐标 + + + + + 鼠标按下时选项卡位置 + + + + + 鼠标按下时选项卡横向偏移 + + + + + 鼠标按下时的坐标 + + + + + 右侧可移动的最大值 + + + + + 左侧可移动的最大值 + + + + + 选项卡宽度 + + + + + 选项卡拖动等待距离(在鼠标移动了超过20个像素无关单位后,选项卡才开始被拖动) + + + + + 选项卡是否处于拖动状态 + + + + + 选项卡是否已经被拖动 + + + + + 目标横向位移 + + + + + 当前编号 + + + + + 标签容器横向滚动距离 + + + + + 标签容器 + + + + + 当前编号 + + + + + 是否显示关闭按钮 + + + + + 是否显示关闭按钮 + + + + + 是否显示上下文菜单 + + + + + 是否显示上下文菜单 + + + + + 更新选项卡横向偏移 + + + + + + 创建动画 + + + + + 计算选项卡当前合适的位置编号 + + + + + + + 是否可以更新 + + + + + 选项卡字典 + + + + + 流式行为持续时间 + + + + + 流式行为持续时间 + + + + + 是否将标签填充 + + + + + 是否将标签填充 + + + + + 标签宽度 + + + + + 标签宽度 + + + + + 标签高度 + + + + + 标签高度 + + + + + 是否可以强制更新 + + + + + 是否已经加载 + + + + + 更新 + + + + + + 获取显示时间 + + + + + + 更新 + + + + + + 作为刻度使用的文字块 + + + + + 时间 + + + + + 时间 + + + + + 时间格式 + + + + + 横向移动 + + + + + + 时间条 + + + + + 是否显示刻度字符串 + + + + + 是否显示刻度字符串 + + + + + 刻度字符串 + + + + + 刻度字符串 + + + + + 选中时间 + + + + + 选中时间 + + + + + 时间改变事件 + + + + + 刻度集合 + + + + + 初始化时时间 + + + + + 时间段集合 + + + + + 顶部border是否被按下 + + + + + 控件是否处于拖动中 + + + + + 刻度单项宽度 + + + + + 鼠标按下拖动时选中的时间 + + + + + 显示的刻度数目 + + + + + 刻度区间编号 + + + + + 刻度单次偏移 + + + + + 刻度总偏移 + + + + + 刻度区间编号 + + + + + 时间改变事件 + + + + + 设置刻度时间格式 + + + + + + 更新刻度 + + + + + 时间转换 + + + + + + + 鼠标滚轮滚动时改变刻度区间 + + + + + + 更新 + + + + + 更新鼠标跟随块位置 + + + + + 穿梭框 + + + + + 图片浏览器 + + + + + 带一个图片Uri的构造函数 + + + + + + 带一个图片路径的构造函数 + + + + + + 消息框 + + + + + 成功 + + + + + + + 消息 + + + + + + + 警告 + + + + + + + 错误 + + + + + + + 严重 + + + + + + + 询问 + + + + + + + 自定义信息展示 + + + + + + + 信息展示 + + + + + + + + + + + 信息展示 + + + + + + + + + + + + 弹出窗口 + + + + + 左上 + + + + + 左 + + + + + 左下 + + + + + 上左 + + + + + 上 + + + + + 上右 + + + + + 右上 + + + + + 右 + + + + + 右下 + + + + + 下左 + + + + + 下 + + + + + 下右 + + + + + No Icon. + + + + + A Information Icon. + + + + + A Warning Icon. + + + + + A Error Icon. + + + + + 颜色范围 + + + + + 颜色差值 + + + + + 更新 + + + + + 获取指定比例处的颜色 + + 范围(0-1) + + + + + 最多只能显示一项,且不可折叠 + + + + + 显示所有项,且不可折叠 + + + + + 类似ShowOne,但是控件的尺寸不随项的数量而改变 + + + + + 没有任何限制 + + + + + IP类型枚举 + + + + + A类IP地址 + + + + + B类IP地址 + + + + + C类IP地址 + + + + + D类IP地址 + + + + + E类IP地址 + + + + + 表示一个操作的返回结果类型 + + + + + 成功 + + + + + 失败 + + + + + 无数据 + + + + + 步骤状态 + + + + + 完成 + + + + + 进行中 + + + + + 等待中 + + + + + 文本类型枚举 + + + + + 标题对齐方式 + + + + + 表示一个操作的返回结果信息 + + + + + 操作结果 + + + + + 返回数据 + + + + + 操作消息(包含错误原因等数据) + + + + + 装箱后的值类型(用于提高效率) + + + + + Represents a specialized resource dictionary that contains color resources used + by XAML elements. + + + + + Initializes a new instance of the ColorPaletteResources class. + + + + + Enables you to detect whether your app is in design mode in a visual designer. + + + + + Gets a value that indicates whether the process is running in design mode. + + **True** if the process is running in design mode; otherwise **false**. + + + + Gets a collection of merged resource dictionaries that are specifically keyed + and composed to address theme scenarios, for example supplying theme values for + "HighContrast". + + + A dictionary of ResourceDictionary theme dictionaries. Each must be keyed with + **x:Key**. + + + + + Default styles for controls. + + + + + Initializes a new instance of the Theme class. + + + + + Returns theme used for Windows + + + + + + Identifies the ApplicationTheme dependency property. + + + + + Gets or sets a value that determines the light-dark preference for the overall + theme of an app. + + + A value of the enumeration. The initial value is the default theme set by the + user in Windows settings. + + + + + Gets the UI theme that is used by the UIElement (and its child elements) + for resource determination. The UI theme you specify with RequestedTheme can + override the app-level RequestedTheme. + + The element from which to read the property value. + A value of the enumeration, for example **Light**. + + + + Sets the UI theme that is used by the UIElement (and its child elements) + for resource determination. The UI theme you specify with RequestedTheme can + override the app-level RequestedTheme. + + The element on which to set the attached property. + The property value to set. + + + + Identifies the RequestedTheme dependency property. + + + + + Gets the UI theme that is currently used by the element, which might be different + than the RequestedTheme. + + The element from which to read the property value. + A value of the enumeration, for example **Light**. + + + + Identifies the ActualTheme dependency property. + + + + + Declares the theme preference for an app. + + + + + Use the **Light** default theme. + + + + + Use the **Dark** default theme. + + + + + Specifies a UI theme that should be used for individual UIElement parts of an app UI. + + + + + Use the Application.RequestedTheme value for the element. This is the default. + + + + + Use the **Light** default theme. + + + + + Use the **Dark** default theme. + + + + + Gets or sets a value that determines the light-dark preference for the overall + theme of an app. + + + A value of the enumeration. The initial value is the default theme set by the + user in Windows settings. + + + + + Gets or sets the accent color of the app. + + + + + Represents a method that handles general events. + + + + The event source. + The event data. If there is no event data, this parameter will be null. + + + + Base class for cultural change + + + + + Converter to get the value of a binding expression in localization + + + + + Listener for a culture change when binding is localized + + + + + Interface for implementing a localized string provider + + + + + Returns a localized object by key + + + + + + + + Listener for cultural change when localized by key + + + + + A markup extension that returns a localized string by key or binding + + + + + Localized string key + + + + + Key binding of a localized string + + + + + Formatted localized string arguments + + + + + Formatted localized string argument bindings + + + + + The main class for working with localization + + + + + Implementing a localized string provider through application resources + + + + + Provides multiple conversions from to various translation providers. + + + + + Returns whether this converter can convert the object to the specified type, using the specified context. + + An that provides a format context. + A that represents the type you want to convert to. + true, if this converter can perform the conversion, otherwise false. + + + + Returns whether this converter can convert an object of the given type to the type of this converter, using the specified context. + + An that provides a format context. + A that represents the type you want to convert from. + true, if this converter can perform the conversion, otherwise false. + + + + Converts the given object to the type of this converter, using the specified context and culture information. + + An that provides a format context. + The to use as the current culture. + The to convert. + An that represents the converted value. + + + + Get Shamsi Year From Miladi Year + + Enter The Jalali DateTime + + + + + Get Short Shamsi Year From Miladi Year In String + + Enter The Jalali DateTime + + + + + Get Shamsi Year From Miladi Year In String + + Enter The Jalali DateTime + + + + + Get Shamsi Month From Miladi Month + + Enter The Jalali DateTime + + + + + Get Shamsi Month Number From Miladi Month In String + + Enter The Jalali DateTime + + + + + Get Shamsi Month From Miladi Month Number + + Enter The Jalali DateTime + + + + + Get Shamsi Month Name From Miladi Month + + Enter The Jalali DateTime + + + + + Get Shamsi Day From Miladi Month + + Enter The Jalali DateTime + + + + + Get Shamsi Day From Miladi Month In String + + Enter The Jalali DateTime + + + + + Get Shamsi Day Name From Miladi Month + + Enter The Jalali DateTime + + + + + Get Shamsi Day ShortName From Miladi Month + + Enter The Jalali DateTime + + + + + شنبه بیست آذر سال یکهزار سیصد و نود وهفت ساعت هفت و سی دقیقه و بیست ثانیه + + + + + + شنبه بیست آذر سال یکهزار سیصد و نود وهفت ساعت هفت و سی دقیقه + + + + + + شنبه بیست آذر سال یکهزار سیصد و نود وهفت + + + + + + ساعت پانزده و سی دقیقه و ده ثانیه + + + + + + ساعت پانزده و سی دقیقه + + + + + Thrown when setting value is less than 0 or (Divisor or more). + + + Thrown when divisor is 1 or less. + + + Thrown when item1.Divisor and item2.Divisor are different. + + + Thrown when size is 1 or less. + + + Remove all elements at the index and after the index. + + + Specialized RingBuffer for undo/redo. + Type of elements + + + Index of current element. + + + Current element. + + + Thrown when size is 1 or less. + + + + To use the method, the first delegate is t, and T is the parameter, otherwise it is the return type.Pause checkpoint: manual.WaitOne() == true is no pause + + + + + Clones the observable collection. + + The type. + The collection. + The new collection. + + + + Adds a value if it doesn't exist yet. + + The type. + The collection. + The value. + + + + Updates a value. + + The type. + The collection. + The value. + The new value. + + + + Deletes a value if it exists. + + The type. + The collection. + The value. + + + + Checks whether all values are null or not. + + The type. + The collection. + true if all values are null. + + + + Checks whether the collection and the values are null. + + The type. + The collection. + The value. + + + + Checks whether a value is null. + + The type. + The value. + + + + Checks whether the collection is null. + + The type. + The collection. + + + + This Extension Help you to Easily implement search, sort, and group operations + + + + + + + + This Extension Method Help you to Add Items into ObservableCollection from Another Thread + + + + + + + + Generate MD5 Hash + + + + + + + Generate SHA256 Hash + + + + + + + Encrypt string with AES + + + + + + + + Decrypt string with AES + + + + + + + + Encrypt string with Base64 + + + + + + + Decrypt string with Base64 + + + + + + + Encrypt string with RSA + + + + + + + + Decrypt string with RSA + + + + + + + + Get Shamsi Date From Miladi Year + + Enter The Jalali DateTime + + + + + Get Short Shamsi Date From Miladi Year + + Enter The Jalali DateTime + + + + + Get Long Shamsi Date From Miladi Year + + Enter The Jalali DateTime + + + + + An extension for the class. + + + + + Clones the dictionary. + + The key type. + The value type. + The dictionary. + A new . + + + + Adds a value if it doesn't exist yet. + + The key type. + The value type. + The dictionary. + The key. + The value. + + + + Updates a value. + + The key type. + The value type. + The dictionary. + The key. + The value. + + + + Updates a key value pair. + + The key type. + The value type. + The dictionary. + The key value pair. + + + + Deletes the key if it exists. + + The key type. + The value type. + The dictionary. + The key. + + + + Deletes a value if it exists. + + The key type. + The value type. + The dictionary. + The value. + + + + Checks whether all values are null or not. + + The key type. + The value type. + The dictionary. + true if all values are null. + + + + Checks whether all keys are null or not. + + The key type. + The value type. + The dictionary. + true if all keys are null. + + + + Gets the key for a value. + + The key type. + The value type. + The dictionary. + The value. + The found key. + + + + Adds keys to the list. + + The key value type. + The value value type. + The keys. + The key value pair. + The value. + + + + Checks whether the count is greater than zero. + + The value value type. + The count. + The value. + + + + Checks whether the dictionary is null. + + The key value type. + The value value type. + The dictionary. + + + + Checks whether the value pair is null. + + The key type. + The value type. + The key value pair. + + + + Checks whether the value pair is null. + + The key type. + The value type. + The key. + The value. + + + + This Extension Help you to access item index in foreach loop + + + + + + + + This Extension Help you to Easily implement search, sort, and group operations + + + + + + + + Transform the input + + String to be transformed + The culture + + + + + Can tranform a string + + + + + Transform the input + + String to be transformed + + + + + Transforms a string using the provided transformers. Transformations are applied in the provided order. + + + + + + + + Transforms a string using the provided transformers. Transformations are applied in the provided order. + + + + + + + + + Changes string to title case + + + "INvalid caSEs arE corrected" -> "Invalid Cases Are Corrected" + + + + + Changes the string to lower case + + + "Sentence casing" -> "sentence casing" + + + + + Changes the string to upper case + + + "lower case statement" -> "LOWER CASE STATEMENT" + + + + + Changes the string to sentence case + + + "lower case statement" -> "Lower case statement" + + + + + Truncate a string to a fixed length + + + + + Truncate a string to a fixed number of letters or digits + + + + + Truncate a string to a fixed number of words + + + + + Can truncate a string. + + + + + Truncate a string + + The string to truncate + The length to truncate to + The string used to truncate with + The enum value used to determine from where to truncate the string + The truncated string + + + + Truncation location for humanizer + + + + + Truncate letters from the left (start) of the string + + + + + Truncate letters from the right (end) of the string + + + + + Gets a ITruncator + + + + + Fixed length truncator + + + + + Fixed number of characters truncator + + + + + Fixed number of words truncator + + + + + An extension for the class. + + + + + Clones the list. + + The type. + The list. + The new list. + + + + Adds a value if it doesn't exist yet. + + The type. + The list. + The value. + + + + Updates a value. + + The type. + The list. + The value. + The new value. + + + + Deletes a value if it exists. + + The type. + The list. + The value. + + + + Checks whether all values are null or not. + + The type. + The list. + true if all values are null. + + + + Checks whether the list and the values are null. + + The type. + The list. + The value. + + + + Checks whether a value is null. + + The type. + The value. + + + + Checks whether the list is null. + + The type. + The list. + + + + Enable quick and more natural string.Format calls + + + + + + + + Transforms a string using the provided transformers. Transformations are applied in the provided order. + + + + + + + + Truncate the string + + The string to be truncated + The length to truncate to + The truncated string + + + + Truncate the string + + The string to be truncated + The length to truncate to + The truncate to use + The enum value used to determine from where to truncate the string + The truncated string + + + + Truncate the string + + The string to be truncated + The length to truncate to + The string used to truncate with + The enum value used to determine from where to truncate the string + The truncated string + + + + Truncate the string + + The string to be truncated + The length to truncate to + The string used to truncate with + The truncator to use + The enum value used to determine from where to truncate the string + The truncated string + + + + Converts this from one encoding to another. + + The input . + The input encoding. + The output encoding. + A new with its data converted to . + + + + Creates a Color from a XAML color string. + + + + + + + Defines a collection of extensions methods for UI. + + + + + Find descendant control using its name. + + Parent element. + Name of the control to find + Descendant control or null if not found. + + + + Find first descendant control of a specified type. + + Type to search for. + Parent element. + Descendant control or null if not found. + + + + Find first descendant control of a specified type. + + Parent element. + Type of descendant. + Descendant control or null if not found. + + + + Find all descendant controls of the specified type. + + Type to search for. + Parent element. + Descendant controls or empty if not found. + + + + Find visual ascendant control using its name. + + Parent element. + Name of the control to find + Descendant control or null if not found. + + + + Find first visual ascendant control of a specified type. + + Type to search for. + Child element. + Ascendant control or null if not found. + + + + Find first visual ascendant control of a specified type. + + Child element. + Type of ascendant to look for. + Ascendant control or null if not found. + + + + Find all visual ascendants for the element. + + Child element. + A collection of parent elements or null if none found. + + + + Color extension class + + + + + Convert color to decimal representation (rgb order is reversed) + + + + + + + Convert color to decimal representation (rgb order is reversed) + + + + + + + Get the total length of the path + + + + + + + Get the total length of the path + + + + + + + + + Display element + + + + + + Display element + + + + + + + Unrealistic elements, but reserve space + + + + + + No elements are displayed, and no space is reserved + + + + + + Check that only one instance of the program runs + + + + + + + Bring MainWindow To Front + + + + + Check if Running Application runs with admin access or not + + + + + + Get AbsoluteUri like pack://application:,,,/WpfApp;component/Style.xaml + + Project Name + xaml file path + pack://application:,,,/{AssemblyName};component/{path} + + + + Faster application execution at startup by caching + + Cache Path + + + + Close the application and start a new instance immediately + + + + + + Assembly Based Method to Get the path of the executable file, this method work in .Net Framework and .Net Core in Portable and Publish Mode + + + + + + Native Method to Get the path of the executable file, this method work in .Net Framework and .Net Core in Portable and Publish Mode + + + + + + Send Message to Another Application + + + + + + + Listen to Receive Message from Another Process + + + + + + + Register Context Menu in Directory + Use this method when you want to add a ContextMenu when you right-click on folders + + + + Icon Should be in *.ico format + + + + UnRegister Context Menu from Directory + Use this method when you want to remove a ContextMenu when you right-click on folders + + + + + + Register Cascade Context Menu in Directory + Use this method when you want to add a Cascade Menu in ContextMenu when you right-click on folders + This Method need Administrator Access + + + + + Icon Should be in *.ico format + Icon Should be in *.ico format + + + + UnRegister Cascade Context Menu from Directory + Use this method when you want to remove a Cascade Menu from ContextMenu when you right-click on folders + This Method need Administrator Access + + + + + + + + Register Context Menu in File + Use this method when you want to add a ContextMenu when you right-click on files + + + + Icon Should be in *.ico format + + + + UnRegister Context Menu from File + Use this method when you want to remove a ContextMenu when you right-click on files + + + + + + Register Cascade Context Menu in File + Use this method when you want to add a Cascade Menu in ContextMenu when you right-click on files + This Method need Administrator Access + + + + + Icon Should be in *.ico format + Icon Should be in *.ico format + + + + UnRegister Cascade Context Menu from File + Use this method when you want to remove a Cascade Menu from ContextMenu when you right-click on files + This Method need Administrator Access + + + + + + + + Register Context Menu in Background + Use this method when you want to add a ContextMenu when you right-click on desktop or Explorer background + + + + Icon Should be in *.ico format + + + + UnRegister Context Menu from Background + Use this method when you want to remove a ContextMenu when you right-click on desktop or Explorer background + + + + + + Register Cascade Context Menu in Background + Use this method when you want to add a Cascade Menu in ContextMenu when you right-click on desktop or Explorer background + This Method need Administrator Access + + + + + Icon Should be in *.ico format + Icon Should be in *.ico format + + + + UnRegister Cascade Context Menu from Background + Use this method when you want to remove a Cascade Menu from ContextMenu when you right-click on desktop or Explorer background + This Method need Administrator Access + + + + + + + + Register Context Menu in Drive + Use this method when you want to add a ContextMenu when you right-click on drives + This Method need Administrator Access + + + + Icon Should be in *.ico format + + + + UnRegister Context Menu from Drive + Use this method when you want to remove a ContextMenu when you right-click on drives + This Method need Administrator Access + + + + + + Register Cascade Context Menu in Drive + Use this method when you want to add a Cascade Menu in ContextMenu when you right-click on drives + This Method need Administrator Access + + + + + Icon Should be in *.ico format + Icon Should be in *.ico format + + + + UnRegister Cascade Context Menu from Drive + Use this method when you want to remove a Cascade Menu from ContextMenu when you right-click on drives + This Method need Administrator Access + + + + + + + + Get Color from LinearGradientBrush, SolidColorBrush and Brush + + + + + + + Get Hex Code from Color + + + + + + + Get Hex Code from Brush + + + + + + + Creates a Color from a XAML color string. + + + + + + + Translate numeric file size in bytes to a human-readable shorter string format. + + + + + + + Generate SHA256 for String + + + + + + + Generate SHA256 for File + + + + + + + Encrypt string with AES + + + + + + + + Decrypt string with AES + + + + + + + + Encrypt string with Base64 + + + + + + + Decrypt string with Base64 + + + + + + + Encrypt string with RSA + + + + + + + + Decrypt string with RSA + + + + + + + Decrypt a file async. + The full path and name of the file to be decrypted. + The full path and name of the file to be output. + The password for the decryption. + + + Decrypt a file. + The full path and name of the file to be decrypted. + The full path and name of the file to be output. + The password for the decryption. + + + Encrypt a file async. + The full path and name of the file to be encrypted. + The full path and name of the file to be output. + The password for the encryption. + + + Encrypt a file. + The full path and name of the file to be encrypted. + The full path and name of the file to be output. + The password for the encryption. + + + + Encrypt a file Asymmetric + + + + + + + + Decrypt a file Asymmetric + + + + + + + + Encrypt a File async. + + + + + + + + Encrypt a File. + + + + + + + + Decrypt a File async. + + + + + + + + Decrypt a File. + + + + + + + + This method generates RSA public and private keys + KeySize is measured in bits. 1024 is the default, 2048 is better, 4096 is more robust but takes a fair bit longer to generate. + + + + + + Export PublicKey To File + + + + + + + Read PublicKey from File + + + + + + + Export PrivateKey To File + + + + + + + + + Read PrivateKey from File + + + + + + + + + Read Data Value From the Ini File + + must be unique + Optional + default is: application startup folder location + + + + + Write Data to the INI File + + + + Optional + default is: application startup folder location + + + + Delete Key from INI File + + + Optional + + + + + Delete Section from INI File + + + + + + + Check if Key Exist or Not in INI File + + + Optional + + + + + + Contains static handlers for applying background Mica effects from Windows 11. + + + + + Checks if the current supports selected . + + Background type to check. + if is supported. + + + + Applies selected background effect to when is rendered. + + Window to apply effect. + Background type. + Skip the compatibility check. + + + + Applies selected background effect to hWnd by it's pointer. + + Pointer to the window handle. + Background type. + Skip the compatibility check. + + + + Tries to remove background effects if they have been applied to the . + + The window from which the effect should be removed. + + + + Tries to remove all effects if they have been applied to the hWnd. + + Pointer to the window handle. + + + + Tries to inform the operating system that this window uses dark mode. + + Window to apply effect. + + + + Tries to inform the operating system that this hWnd uses dark mode. + + Pointer to the window handle. + + + + Tries to clear the dark theme usage information. + + Window to remove effect. + + + + Tries to clear the dark theme usage information. + + Pointer to the window handle. + + + + Tries to remove default TitleBar from hWnd. + + Pointer to the window handle. + is problem occurs. + + + + Windows NT + + + + + Windows 7 + + + + + Windows 7 Or Greater + + + + + Windows 8 + + + + + Windows 8 Or Greater + + + + + Windows 8.1 + + + + + Windows 8.1 Or Greater + + + + + Windows 10 + + + + + Windows 10 Or Greater + + + + + Windows 10 Threshold1 Version 1507 Build 10240 + + + + + Windows 10 Threshold1 Version 1507 Build 10240 Or Greater + + + + + Windows 10 Threshold2 Version 1511 Build 10586 (November Update) + + + + + Windows 10 Threshold2 Version 1511 Build 10586 Or Greater (November Update) + + + + + Windows 10 Redstone1 Version 1607 Build 14393 (Anniversary Update) + + + + + Windows 10 Redstone1 Version 1607 Build 14393 Or Greater (Anniversary Update) + + + + + Windows 10 Redstone2 Version 1703 Build 15063 (Creators Update) + + + + + Windows 10 Redstone2 Version 1703 Build 15063 Or Greater (Creators Update) + + + + + Windows 10 Redstone3 Version 1709 Build 16299 (Fall Creators Update) + + + + + Windows 10 Redstone3 Version 1709 Build 16299 Or Greater (Fall Creators Update) + + + + + Windows 10 Redstone4 Version 1803 Build 17134 (April 2018 Update) + + + + + Windows 10 Redstone4 Version 1803 Build 17134 Or Greater (April 2018 Update) + + + + + Windows 10 Redstone5 Version 1809 Build 17763 (October 2018 Update) + + + + + Windows 10 Redstone5 Version 1809 Build 17763 Or Greater (October 2018 Update) + + + + + Windows 10 19H1 Version 1903 Build 18362 (May 2019 Update) + + + + + Windows 10 19H1 Version 1903 Build 18362 Or Greater (May 2019 Update) + + + + + Windows 10 19H2 Version 1909 Build 18363 (November 2019 Update) + + + + + Windows 10 19H2 Version 1909 Build 18363 Or Greater (November 2019 Update) + + + + + Windows 10 20H1 Version 2004 Build 19041 (May 2020 Update) + + + + + Windows 10 20H1 Version 2004 Build 19041 Or Greater (May 2020 Update) + + + + + Windows 10 20H2 Version 2009 Build 19042 (October 2020 Update) + + + + + Windows 10 20H2 Version 2009 Build 19042 Or Greater (October 2020 Update) + + + + + Windows 10 21H1 Build 19043 + + + + + Windows 10 21H1 Build 19043 Or Greater (May 2021 Update) + + + + + Windows 11 Build 22000 + + + + + Windows 11 Build 22000 Or Greater + + + + + Add Or Update Key + + + + + + null mean CurrentUser + + + + Get Value from Key + + + + + + + + + + Delete Key + + + + + + + + + + Delete a Key and any childs recursively + + + + + + + + + Get the active window in the current application + + + + + + Make the window active as the topmost window in the foreground + + + + + + 开始使用触摸拖动窗口,在触摸抬起后自动结束 + + + + + Serializes the data in the object to the designated file path + + Type of Object to serialize + Object to serialize + FilePath for the XML file + + + + Deserializes the data in the XML file into an object + + Type of object to deserialize + FilePath to XML file + Object containing deserialized data + + + + 包含一些常用的动画辅助方法 + + + + + 创建一个Thickness动画 + + + + + + + + 创建一个Double动画 + + + + + + + + 包含内部使用的一些简单算法 + + + + + 平分一个整数到一个数组中 + + + + + + + + 计算控件在窗口中的可见坐标 + + + + + 获取布局范围框 + + + + + + + 计算两点的连线和x轴的夹角 + + + + + + + + 计算法线 + + + + + + + + + 输入层点击帮助类 + + + + + 将 MouseDown MouseMove MouseUp 封装为点击事件 + + 要被附加的元素 + 点击的事件 + 因为拖动而结束点击时触发 + + + + 去掉对 的点击时间的监听 + + + 点击的事件 + 因为拖动而结束点击时触发的事件 + + + + Resource help class + + + + + Get Resource + + + + + + + get HandyControl theme + + + + + This class can provide single-open functions for visual elements + + + + + Create an instance based on the specified type + + + + + + + 验证帮助类 + + + + + 是否在浮点数范围内 + + + + + + + 是否在正浮点数范围内 + + + + + + + 是否在正浮点数范围内(包括0) + + + + + + + 是否在负浮点数范围内 + + + + + + + 是否在负浮点数范围内(包括0) + + + + + + + 是否在正整数范围内 + + + + + + + 是否在正整数范围内(包括0) + + + + + + + 是否在负整数范围内 + + + + + + + 是否在负整数范围内(包括0) + + + + + + Width of left border that retains its size. + + + Width of right border that retains its size. + + + Height of top border that retains its size. + + + Height of bottom border that retains its size. + + + + Gets the default (empty) value. + + + + + If the calling thread and the thread that owns the window are attached to different input queues, the system posts + the request to the thread that owns the window. This prevents the calling thread from blocking its execution while + other threads process the request. + + + + + Prevents generation of the WM_SYNCPAINT message. + + + + + Draws a frame (defined in the window's class description) around the window. + + + + + Applies new frame styles set using the SetWindowLong function. Sends a WM_NCCALCSIZE message to the window, even if + the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE is sent only when the window's + size is being changed. + + + + + Hides the window. + + + + + Does not activate the window. If this flag is not set, the window is activated and moved to the top of either the + topmost or non-topmost group (depending on the setting of the hWndInsertAfter parameter). + + + + + Discards the entire contents of the client area. If this flag is not specified, the valid contents of the client + area are saved and copied back into the client area after the window is sized or repositioned. + + + + + Retains the current position (ignores X and Y parameters). + + + + + Does not change the owner window's position in the Z order. + + + + + Does not redraw changes. If this flag is set, no repainting of any kind occurs. This applies to the client area, + the nonclient area (including the title bar and scroll bars), and any part of the parent window uncovered as a + result of the window being moved. When this flag is set, the application must explicitly invalidate or redraw any + parts of the window and parent window that need redrawing. + + + + + Same as the SWP_NOOWNERZORDER flag. + + + + + Prevents the window from receiving the WM_WINDOWPOSCHANGING message. + + + + + Retains the current size (ignores the cx and cy parameters). + + + + + Retains the current Z order (ignores the hWndInsertAfter parameter). + + + + + Displays the window. + + + + + The window is initially maximized. + + + + + The window has a maximize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must + also be specified. + + + + + The window is initially minimized. Same as the WS_ICONIC style. + + + + + The window has a sizing border. Same as the WS_SIZEBOX style. + + + + + ShowWindow options + + + + + Collection of backdrop types. + + + + + Automatically selects backdrop effect. + + + + + Turns off the backdrop effect. + + + + + Sets Mica effect with generated wallpaper tint. + + + + + Sets acrlic effect. + + + + + Sets blurred wallpaper effect, like Mica without tint. + + + + + DWMWINDOWATTRIBUTE enumeration. (dwmapi.h) + + + + + + Enables content rendered in the non-client area to be visible on the frame drawn by DWM. + + + + + Retrieves the bounds of the caption button area in the window-relative space. + + + + + Forces the window to display an iconic thumbnail or peek representation (a static bitmap), even if a live or snapshot representation of the window is available. + + + + + Cloaks the window such that it is not visible to the user. + + + + + If the window is cloaked, provides one of the following values explaining why. + + + + + Freeze the window's thumbnail image with its current visuals. Do no further live updates on the thumbnail image to match the window's contents. + + + + + Allows a window to either use the accent color, or dark, according to the user Color Mode preferences. + + + + + Allows a window to either use the accent color, or dark, according to the user Color Mode preferences. + + + + + Controls the policy that rounds top-level window corners. + Windows 11 and above. + + + + + The color of the thin border around a top-level window. + + + + + The color of the caption. + Windows 11 and above. + + + + + The color of the caption text. + Windows 11 and above. + + + + + Width of the visible border around a thick frame window. + Windows 11 and above. + + + + + Allows to enter a value from 0 to 4 deciding on the imposed backdrop effect. + + + + + Indicates whether the window should use the Mica effect. + Windows 11 and above. + + + + + Contains some regular verification operations + + + + + Determine whether the string format meets certain requirements + + The string to be judged + Regular expression + + + + + Determine whether the string meets the specified format + + The string to be judged + Specified formatted text + + + + + Determine whether the string format is email + + Email string to be judged + Method returns boolean + + + + Determine whether the string format is a specified type of IP address + + IP string to be judged + Specified IP type + Method returns boolean + + + + Determine whether the string format is an IP address + + IP string to be judged + Method returns boolean + + + + Determine whether the string format is a single Chinese character + + Single Chinese character string to be judged + Method returns boolean + + + + Determine whether the string format is url + + URL string to be judged + Method returns boolean + + + + Determine whether the string format is persian + + string to be judged + Method returns boolean + + + + Determine whether the string format is Iraniana National Code + + string to be judged + + + + + 包含一些正则验证所需要的字符串 + + + + + 邮件正则匹配表达式 + + + + + 手机号正则匹配表达式 + + + + + IP正则匹配 + + + + + A类IP正则匹配 + + + + + B类IP正则匹配 + + + + + C类IP正则匹配 + + + + + D类IP正则匹配 + + + + + E类IP正则匹配 + + + + + 汉字正则匹配 + + + + + Url正则匹配 + + + + + 数字正则匹配 + + + + + 计算性质数字正则匹配 + + + + + 正整数正则匹配 + + + + + 负整数正则匹配 + + + + + 整数正则匹配 + + + + + 非负整数正则匹配 + + + + + 非正整数正则匹配 + + + + + 正浮点数正则匹配 + + + + + 负浮点数正则匹配 + + + + + 浮点数正则匹配 + + + + + 非负浮点数正则匹配 + + + + + 非正浮点数正则匹配 + + + + + شناسایی حروف فارسی + + + + + شناسایی کد ملی + + + + + 根据属性名称使用反射来获取值 + + + + + + + An action that will launch a process to open a file or Uri. For files, this action will launch the default program + for the given file extension. A Uri will open in a web browser. + + + + + The file or Uri to open. + + + + + This method is called when some criteria is met and the action is invoked. + + + + + + 鼠标拖动行为,该类是反编译微软的System.Windows.Interactivity程序集得到的,并对其做了些扩展 + + + + + 是否固定住Y轴 + + + + + 是否固定住X轴 + + + + + 控件库使用的所有命令(为了统一,不使用wpf自带的命令) + + + + + 搜索 + + + + + 清除 + + + + + 切换 + + + + + 右转 + + + + + 左转 + + + + + 小 + + + + + 大 + + + + + 还原 + + + + + 打开 + + + + + 保存 + + + + + 选中 + + + + + 关闭 + + + + + 取消 + + + + + 确定 + + + + + 是 + + + + + 否 + + + + + 关闭所有 + + + + + 关闭其他 + + + + + 上一个 + + + + + 下一个 + + + + + 跳转 + + + + + 上午 + + + + + 下午 + + + + + 确认 + + + + + 小时改变 + + + + + 分钟改变 + + + + + 秒改变 + + + + + 鼠标移动 + + + + + 打开链接 + + + + + 关闭程序 + + + + + 前置主窗口 + + + + + 关闭窗口 + + + + + 开始截图 + + + + + 按照类别排序 + + + + + 按照名称排序 + + + + + 更多 + + + + + AutomationPeer for PersianCalendar Control + + + + + Initializes a new instance of the CalendarAutomationPeer class. + + Owning PersianCalendar + + + + Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface. + + A value from the System.Windows.Automation.Peers.PatternInterface enumeration. + The object that supports the specified pattern, or null if unsupported. + + + + Gets the control type for the element that is associated with the UI Automation peer. + + The control type. + + + + Called by GetClassName that gets a human readable name that, in addition to AutomationControlType, + differentiates the control represented by this AutomationPeer. + + The string that contains the name. + + + + AutomationPeer for CalendarButton + + + + + Initializes a new instance of the CalendarButtonAutomationPeer class. + + Owning CalendarButton + + + + Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface. + + A value from the System.Windows.Automation.Peers.PatternInterface enumeration. + The object that supports the specified pattern, or null if unsupported. + + + + Gets the control type for the element that is associated with the UI Automation peer. + + The control type. + + + + Called by GetClassName that gets a human readable name that, in addition to AutomationControlType, + differentiates the control represented by this AutomationPeer. + + The string that contains the name. + + + + Overrides the GetLocalizedControlTypeCore method for CalendarButtonAutomationPeer + + + + + + Overrides the GetHelpTextCore method for CalendarButtonAutomationPeer + + + + + + Overrides the GetNameCore method for CalendarButtonAutomationPeer + + + + + + AutomationPeer for CalendarDayButton + + + + + Initializes a new instance of the CalendarDayButtonAutomationPeer class. + + Owning CalendarDayButton + + + + Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface. + + A value from the System.Windows.Automation.Peers.PatternInterface enumeration. + The object that supports the specified pattern, or null if unsupported. + + + + Gets the control type for the element that is associated with the UI Automation peer. + + The control type. + + + + Called by GetClassName that gets a human readable name that, in addition to AutomationControlType, + differentiates the control represented by this AutomationPeer. + + The string that contains the name. + + + + Overrides the GetHelpTextCore method for CalendarDayButtonAutomationPeer + + + + + + Overrides the GetLocalizedControlTypeCore method for CalendarDayButtonAutomationPeer + + + + + + Overrides the GetNameCore method for CalendarDayButtonAutomationPeer + + + + + + Grid item column. + + + + + Grid item column span. + + + + + Grid item's containing grid. + + + + + Grid item row. + + + + + Grid item row span. + + + + + True if the owning CalendarDayButton is selected. + + + + + Selection items selection container. + + + + + Adds selection item to selection. + + + + + Removes selection item from selection. + + + + + Selects this item. + + + + + Gets the table item's column headers. + + The table item's column headers + + + + Get's the table item's row headers. + + The table item's row headers + + + + AutomationPeer for PersianDatePicker Control + + + + + Initializes a new instance of the AutomationPeer for PersianDatePicker control. + + PersianDatePicker + + + + Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface. + + A value from the System.Windows.Automation.Peers.PatternInterface enumeration. + The object that supports the specified pattern, or null if unsupported. + + + + Gets the control type for the element that is associated with the UI Automation peer. + + The control type. + + + + Called by GetClassName that gets a human readable name that, in addition to AutomationControlType, + differentiates the control represented by this AutomationPeer. + + The string that contains the name. + + + + Overrides the GetLocalizedControlTypeCore method for PersianDatePicker + + + + + + Represents a collection of DateTimeRanges. + + + + + Initializes a new instance of the CalendarBlackoutDatesCollection class. + + + + + + Dates that are in the past are added to the BlackoutDates. + + + + + Checks if a DateTime is in the Collection + + + + + + + Checks if a Range is in the collection + + + + + + + + Returns true if any day in the given DateTime range is contained in the BlackOutDays. + + CalendarDateRange that is searched in BlackOutDays + true if at least one day in the range is included in the BlackOutDays + + + + This finds the next date that is not blacked out in a certian direction. + + + + + + + + All the items in the collection are removed. + + + + + The item is inserted in the specified place in the collection. + + + + + + + The item in the specified index is removed from the collection. + + + + + + The object in the specified index is replaced with the provided item. + + + + + + + Registers for change notification on date ranges + + + + + + Un registers for change notification on date ranges + + + + + Reject date range changes that would make the blackout dates collection invalid + + + + + + + Update the calendar view to reflect the new blackout dates + + + + + + + Tests to see if a date range is not already selected + + date range to test + True if no selected day falls in the given date range + + + + Tests to see if a date range is not already selected + + First day of date range to test + Last day of date range to test + True if no selected day falls between start and end + + + + Gets the DateRange that contains the date. + + + + + + + Represents a button control used in PersianCalendar Control, which reacts to the Click event. + + + + + Static constructor + + + + + Represents the CalendarButton that is used in PersianCalendar Control. + + + + + Dependency property field for HasSelectedDays property + + + + + True if the CalendarButton represents a date range containing the display date + + + + + Dependency property field for IsInactive property + + + + + True if the CalendarButton represents + a month that falls outside the current year + or + a year that falls outside the current decade + + + + + Apply a template to the button. + + + + + Creates the automation peer for the DayButton. + + + + + + Change to the correct visual state for the button. + + + true to use transitions when updating the visual state, false to + snap directly to the new visual state. + + + + + Common PropertyChangedCallback for dependency properties that trigger visual state changes + + + + + + + Represents a button control used in PersianCalendar Control, which reacts to the Click event. + + + + + Default content for the CalendarDayButton + + + + + Identifies the Today state. + + + + + Identifies the RegularDay state. + + + + + Name of the Day state group. + + + + + Identifies the BlackoutDay state. + + + + + Identifies the NormalDay state. + + + + + Name of the BlackoutDay state group. + + + + + Static constructor + + + + + Represents the CalendarDayButton that is used in PersianCalendar Control. + + + + + Dependency property field for IsToday property + + + + + True if the CalendarDayButton represents today + + + + + Dependency property field for IsSelected property + + + + + True if the CalendarDayButton is selected + + + + + Dependency property field for IsActive property + + + + + True if the CalendarDayButton represents a day that falls in the currently displayed month + + + + + Dependency property field for IsBlackedOut property + + + + + True if the CalendarDayButton represents a blackout date + + + + + Dependency property field for IsHighlighted property + + + + + True if the CalendarDayButton represents a highlighted date + + + + + Apply a template to the button. + + + + + Creates the automation peer for the CalendarDayButton. + + + + + + Change to the correct visual state for the button. + + + true to use transitions when updating the visual state, false to + snap directly to the new visual state. + + + + + Represents the month that is used in PersianCalendar Control. + + + + + Gets a value indicating whether the calendar is displayed in months, years or decades. + + + + + Invoked whenever application code or an internal process, + such as a rebuilding layout pass, calls the ApplyTemplate method. + + + + + Gets a binding to a property on the owning calendar + + + + + + + DatePickerTextBox is a specialized form of TextBox which displays custom visuals when its contents are empty + + + + + Static constructor + + + + + Initializes a new instance of the class. + + + + + Watermark dependency property + + + + + Watermark content + + The watermark. + + + + Called when template is applied to the control. + + + + + Change to the correct visual state for the textbox. + + + true to use transitions when updating the visual state, false to + snap directly to the new visual state. + + + + + Called when the IsEnabled property changes. + + Sender object + Property changed args + + + + Called when watermark property is changed. + + The sender. + The instance containing the event data. + + + + Provides data for the DateSelected and DisplayDateChanged events. + + + + + Gets the date to be newly displayed. + + + + + Gets the date that was previously displayed. + + + + + Specifies a DateTime range class which has a start and end. + + + + + Initializes a new instance of the CalendarDateRange class. + + + + + Initializes a new instance of the CalendarDateRange class which creates a range from a single DateTime value. + + + + + + Initializes a new instance of the CalendarDateRange class which accepts range start and end dates. + + + + + + + Specifies the End date of the CalendarDateRange. + + + + + Specifies the Start date of the CalendarDateRange. + + + + + Returns true if any day in the given DateTime range is contained in the current CalendarDateRange. + + + + + + + Coerced the end parameter to satisfy the start <= end constraint + + + + If start <= end the end parameter otherwise the start parameter + + + + Event arguments to notify clients that the range is changing and what the new range will be + + + + + Specifies values for the different modes of operation of a PersianCalendar. + + + + + The PersianCalendar displays a month at a time. + + + + + The PersianCalendar displays a year at a time. + + + + + The PersianCalendar displays a decade at a time. + + + + + Provides data for the DisplayModeChanged event. + + + + + Initializes a new instance of the CalendarModeChangedEventArgs class. + + Previous value of the property, prior to the event being raised. + Current value of the property at the time of the event. + + + + Gets the new mode of the PersianCalendar. + + + + + Gets the previous mode of the PersianCalendar. + + + + + Workaround for Dev10 Bug 527138 UIElement.RaiseEvent(e) throws InvalidCastException when + e is of type SelectionChangedEventArgs + e.RoutedEvent was registered with a handler not of type System.Windows.Controls.SelectionChangedEventHandler + + + + + Constructor + + Routed Event + Items removed from selection + Items added to selection + + + + Specifies values for the different selection modes of a PersianCalendar. + + + + + One date can be selected at a time. + + + + + One range of dates can be selected at a time. + + + + + Multiple dates or ranges can be selected at a time. + + + + + No dates can be selected. + + + + + Represents the collection of SelectedDates for the PersianCalendar Control. + + + + + Initializes a new instance of the CalendarSelectedDatesCollection class. + + + + + + Adds a range of dates to the PersianCalendar SelectedDates. + + + + + + + Clears all the items of the SelectedDates. + + + + + Inserts the item in the specified position of the SelectedDates collection. + + + + + + + Removes the item at the specified position. + + + + + + The object in the specified index is replaced with the provided item. + + + + + + + Adds a range of dates to the PersianCalendar SelectedDates. + + + Helper version of AddRange for mouse drag selection. + This version guarantees no exceptions will be thrown by removing blackout days from the range before adding to the collection + + + + + Names and helpers for visual states in the controls. + + + + + Unfocused state for PersianCalendar Buttons + + + + + Focused state for PersianCalendar Buttons + + + + + CalendarButtons Focus state group + + + + + Normal state + + + + + MouseOver state + + + + + Pressed state + + + + + Disabled state + + + + + Common state group + + + + + Unfocused state + + + + + Focused state + + + + + Focus state group + + + + + Selected state + + + + + Unselected state + + + + + Selection state group + + + + + Active state + + + + + Inactive state + + + + + Active state group + + + + + Valid state + + + + + InvalidFocused state + + + + + InvalidUnfocused state + + + + + Validation state group + + + + + Unwatermarked state + + + + + Watermarked state + + + + + Watermark state group + + + + + Use VisualStateManager to change the visual state of the control. + + + Control whose visual state is being changed. + + + true to use transitions when updating the visual state, false to + snap directly to the new visual state. + + + Ordered list of state names and fallback states to transition into. + Only the first state to be found will be used. + + + + + Provides data for the DateValidationError event. + + + + + Initializes a new instance of the DatePickerDateValidationErrorEventArgs class. + + The exception that initially triggered the DateValidationError event. + The text being parsed. + + + + Gets the exception that initially triggered the DateValidationError event. + + + + + Gets the text being parsed when the DateValidationError event was raised. + + + + + Gets or sets a value that indicates whether Exception should be thrown. + + + + + Specifies date formats for a PersianDatePicker. + + + + + Specifies that the date should be displayed using unabbreviated days of the week and month names. + + + + + Specifies that the date should be displayed using abbreviated days of the week and month names. + + + + diff --git a/View/bin/Debug/MaterialDesignColors.dll b/View/bin/Debug/MaterialDesignColors.dll new file mode 100644 index 0000000..591710d Binary files /dev/null and b/View/bin/Debug/MaterialDesignColors.dll differ diff --git a/View/bin/Debug/MaterialDesignColors.pdb b/View/bin/Debug/MaterialDesignColors.pdb new file mode 100644 index 0000000..72301f9 Binary files /dev/null and b/View/bin/Debug/MaterialDesignColors.pdb differ diff --git a/View/bin/Debug/MaterialDesignThemes.Wpf.dll b/View/bin/Debug/MaterialDesignThemes.Wpf.dll new file mode 100644 index 0000000..0df9a11 Binary files /dev/null and b/View/bin/Debug/MaterialDesignThemes.Wpf.dll differ diff --git a/View/bin/Debug/MaterialDesignThemes.Wpf.pdb b/View/bin/Debug/MaterialDesignThemes.Wpf.pdb new file mode 100644 index 0000000..c53f310 Binary files /dev/null and b/View/bin/Debug/MaterialDesignThemes.Wpf.pdb differ diff --git a/View/bin/Debug/MaterialDesignThemes.Wpf.xml b/View/bin/Debug/MaterialDesignThemes.Wpf.xml new file mode 100644 index 0000000..9b08d3a --- /dev/null +++ b/View/bin/Debug/MaterialDesignThemes.Wpf.xml @@ -0,0 +1,1780 @@ + + + + MaterialDesignThemes.Wpf + + + + + Controls the corner radius of the surrounding box. + + + + + Provides culture-specific information about the format of calendar. + + + + + Gets the custom format string for a year and month value. + + + + + Gets the custom format string for a component one value. + + + + + Gets the custom format string for a component two value. + + + + + Gets the custom format string for a component three value. + + + + + Sets the culture-specific custom format string for a year value. + + An array of string that specify the name of culture to set the for. + The custom format string for a year value. If null, culture-specific custom format string for a year value is removed. + is null. + + + + Sets the culture-specific custom format string for a year value. + + A string that specify the name of culture to set the for. + The custom format string for a year value. If null, culture-specific custom format string for a year value is removed. + is null. + + + + Sets the culture-specific day of week style. + + An array of string that specify the name of culture to set the for. + A to be set. + is null. + + + + Sets the culture-specific day of week style. + + A string that specify the name of culture to set the for. + A to be set. + is null. + + + + Resets the culture-specific day of week style to default value. + + An array of string that specify the name of culture to reset. + is null. + + + + Resets the culture-specific day of week style to default value. + + A string that specify the name of culture to reset. + is null. + + + + Creates a from the . + + A that specifies the culture to get the date format. + The object that this method creates. + is null. + + + + Represents a day of week style. + + + + + Gets the custom format string for a day of week value. + + + + + Gets the string that separates MonthDay and DayOfWeek. + + + + + Gets a value indicating whether DayOfWeek is before MonthDay. + + + + + Initializes a new instance of the struct. + + A custom format string for a day of week value. + A string that separates MonthDay and DayOfWeek. + A value indicating whether DayOfWeek is before MonthDay. + + + + Extracts the from the date format string. + + the date format string. + The struct. + is null. + + + + Indicates if the delete button should be visible. + + + + + This override method is called when the control is clicked by mouse or keyboard + + + + + User a colour zone to easily switch the background and foreground colours, from selected Material Design palette or custom ones. + + + + + By default ComboBox uses the wrapper popup. Popup can be switched to classic Windows desktop view by means of this attached property. + + + + + By default the selected item is hidden from the drop down list, as per Material Design specifications. + To revert to a more classic Windows desktop behaviour, and show the currently selected item again in the drop + down, set this attached propety to true. + + + + + Help us format the content of a header button in a calendar. + + + Expected items, in the following order: + 1) DateTime Calendar.DisplayDate + 2) DateTime? Calendar.SelectedDate + + + + + CircularProgressBar draws two arcs to support a full circle at 100 %. + With one arc at 100 % the start point is identical the end point, so nothing is drawn. + Midpoint at half of current percentage is the endpoint of the first arc + and the start point of the second arc. + + + + + Converter for control. Can be extended by method. + + + + + Helps coerce the correct item container style for a , according to whether the list is displaying in standard mode, or using a , such as a . + + + + + Item container style to use when is null. + + + + + Item container style to use when is not null, typically when a is applied. + + + + + Returns the item container to use for a . + + Should be a or instance. + + + + + + + + Sets the left padding for the inner picker button to zero + + + + + Adds the width of the inner picker button to the right of inner padding + + + + + 1 - Content presenter render size, + 2 - Clipping border padding (main control padding) + + + + + + + + + + Allows editing of components inside of a datagrid cell with a single left click. + + + + + Set the maximum length for the text field. + + Not a dprop, as is only applied once. + + + + Cancel the close. + + + + + Indicates if the close has already been cancelled. + + + + + Gets the parameter originally provided to / + + + + + Allows interaction with the current dialog session. + + + + + Defines how a data context is sourced for a dialog if a + is passed as the command parameter when using . + + + + + The data context from the sender element (typically a ) + is applied to the content. + + + + + The data context from the is applied to the content. + + + + + The data context is explicitly set to null. + + + + + Routed command to be used somewhere inside an instance to trigger showing of the dialog. Content can be passed to the dialog via a . + + + + + Routed command to be used inside dialog content to close a dialog. Use a to indicate the result of the parameter. + + + + + Shows a modal dialog. To use, a instance must be in a visual tree (typically this may be specified towards the root of a Window's XAML). + + Content to show (can be a control or view model). + Task result is the parameter used to close the dialog, typically what is passed to the command. + + + + Shows a modal dialog. To use, a instance must be in a visual tree (typically this may be specified towards the root of a Window's XAML). + + Content to show (can be a control or view model). + Allows access to opened event which would otherwise have been subscribed to on a instance. + Task result is the parameter used to close the dialog, typically what is passed to the command. + + + + Shows a modal dialog. To use, a instance must be in a visual tree (typically this may be specified towards the root of a Window's XAML). + + Content to show (can be a control or view model). + Allows access to closing event which would otherwise have been subscribed to on a instance. + Task result is the parameter used to close the dialog, typically what is passed to the command. + + + + Shows a modal dialog. To use, a instance must be in a visual tree (typically this may be specified towards the root of a Window's XAML). + + Content to show (can be a control or view model). + Allows access to opened event which would otherwise have been subscribed to on a instance. + Allows access to closing event which would otherwise have been subscribed to on a instance. + Task result is the parameter used to close the dialog, typically what is passed to the command. + + + + Shows a modal dialog. To use, a instance must be in a visual tree (typically this may be specified towards the root of a Window's XAML). + + Content to show (can be a control or view model). + of the instance where the dialog should be shown. Typically this will match an identifer set in XAML. null is allowed. + Task result is the parameter used to close the dialog, typically what is passed to the command. + + + + Shows a modal dialog. To use, a instance must be in a visual tree (typically this may be specified towards the root of a Window's XAML). + + Content to show (can be a control or view model). + of the instance where the dialog should be shown. Typically this will match an identifer set in XAML. null is allowed. + Allows access to opened event which would otherwise have been subscribed to on a instance. + Task result is the parameter used to close the dialog, typically what is passed to the command. + + + + Shows a modal dialog. To use, a instance must be in a visual tree (typically this may be specified towards the root of a Window's XAML). + + Content to show (can be a control or view model). + of the instance where the dialog should be shown. Typically this will match an identifer set in XAML. null is allowed. + Allows access to closing event which would otherwise have been subscribed to on a instance. + Task result is the parameter used to close the dialog, typically what is passed to the command. + + + + Shows a modal dialog. To use, a instance must be in a visual tree (typically this may be specified towards the root of a Window's XAML). + + Content to show (can be a control or view model). + of the instance where the dialog should be shown. Typically this will match an identifer set in XAML. null is allowed. + Allows access to opened event which would otherwise have been subscribed to on a instance. + Allows access to closing event which would otherwise have been subscribed to on a instance. + Task result is the parameter used to close the dialog, typically what is passed to the command. + + + + Close a modal dialog. + + of the instance where the dialog should be closed. Typically this will match an identifer set in XAML. + + + + Close a modal dialog. + + of the instance where the dialog should be closed. Typically this will match an identifer set in XAML. + to provide to close handler + + + + Retrieve the current dialog session for a DialogHost + + The identifier to use to retrieve the DialogHost + The DialogSession if one is in process, or null + + + + dialog instance exists + + of the instance where the dialog should be closed. Typically this will match an identifer set in XAML. + + + + + Identifier which is used in conjunction with to determine where a dialog should be shown. + + + + + Returns a DialogSession for the currently open dialog for managing it programmatically. If no dialog is open, CurrentSession will return null + + + + + Defines how a data context is sourced for a dialog if a + is passed as the command parameter when using . + + + + + Indicates whether the dialog will close if the user clicks off the dialog, on the obscured background. + + + + + Parameter to provide to close handlers if an close due to click away is instigated. + + + + + Allows association of a snackbar, so that notifications can be paused whilst a dialog is being displayed. + + + + + Set the theme (light/dark) for the dialog. + + + + + Represents the overlay brush that is used to dim the background behind the dialog + + + + + Raised when a dialog is opened. + + + + + Attached property which can be used on the which instigated the to process the event. + + + + + Callback fired when the event is fired, allowing the event to be processed from a binding/view model. + + + + + Raised just before a dialog is closed. + + + + + Attached property which can be used on the which instigated the to process the closing event. + + + + + Callback fired when the event is fired, allowing the event to be processed from a binding/view model. + + + + + Attempts to focus the content of a popup. + + The popup content. + + + + Helper extensions for showing dialogs. + + + + + Shows a dialog using the first found in a given . + + Window on which the modal dialog should be displayed. Must contain a . + + + Thrown is a is not found when conducting a depth first traversal of visual tree. + + + As a depth first traversal of the window's visual tree is performed, it is not safe to use this method in a situtation where a screen has multiple s. + + + + + + Shows a dialog using the first found in a given . + + Window on which the modal dialog should be displayed. Must contain a . + Content to show (can be a control or view model). + Allows access to opened event which would otherwise have been subscribed to on a instance. + + Thrown is a is not found when conducting a depth first traversal of visual tree. + + + As a depth first traversal of the window's visual tree is performed, it is not safe to use this method in a situtation where a screen has multiple s. + + + + + + Shows a dialog using the first found in a given . + + Window on which the modal dialog should be displayed. Must contain a . + Content to show (can be a control or view model). + Allows access to closing event which would otherwise have been subscribed to on a instance. + + Thrown is a is not found when conducting a depth first traversal of visual tree. + + + As a depth first traversal of the window's visual tree is performed, it is not safe to use this method in a situtation where a screen has multiple s. + + + + + + Shows a dialog using the first found in a given . + + Window on which the modal dialog should be displayed. Must contain a . + Content to show (can be a control or view model). + Allows access to opened event which would otherwise have been subscribed to on a instance. + Allows access to closing event which would otherwise have been subscribed to on a instance. + + Thrown is a is not found when conducting a depth first traversal of visual tree. + + + As a depth first traversal of the window's visual tree is performed, it is not safe to use this method in a situtation where a screen has multiple s. + + + + + + Shows a dialog using the parent/ancestor of the a given . + + Dependency object which should be a visual child of a , where the dialog will be shown. + Content to show (can be a control or view model). + + Thrown is a is not found when conducting a depth first traversal of visual tree. + + + + + + Shows a dialog using the parent/ancestor of the a given . + + Dependency object which should be a visual child of a , where the dialog will be shown. + Content to show (can be a control or view model). + Allows access to opened event which would otherwise have been subscribed to on a instance. + + Thrown is a is not found when conducting a depth first traversal of visual tree. + + + + + + Shows a dialog using the parent/ancestor of the a given . + + Dependency object which should be a visual child of a , where the dialog will be shown. + Content to show (can be a control or view model). + Allows access to closing event which would otherwise have been subscribed to on a instance. + + Thrown is a is not found when conducting a depth first traversal of visual tree. + + + + + + Shows a dialog using the parent/ancestor of the a given . + + Dependency object which should be a visual child of a , where the dialog will be shown. + Content to show (can be a control or view model). + Allows access to opened event which would otherwise have been subscribed to on a instance. + Allows access to closing event which would otherwise have been subscribed to on a instance. + + Thrown is a is not found when conducting a depth first traversal of visual tree. + + + + + + Allows interation with the current dialog session. + + + + + Allows an open dialog to be managed. Use is only permitted during a single display operation. + + + + + Indicates if the dialog session has ended. Once ended no further method calls will be permitted. + + + Client code cannot set this directly, this is internally managed. To end the dialog session use . + + + + + The parameter passed to the and return by + + + + + Gets the which is currently displayed, so this could be a view model or a UI element. + + + + + Update the current content in the dialog. + + + + + + Closes the dialog. + + Thrown if the dialog session has ended, or a close operation is currently in progress. + + + + Closes the dialog. + + Result parameter which will be returned in or from method. + Thrown if the dialog session has ended, or a close operation is currently in progress. + + + + Cancel the close. + + + + + Indicates if the close has already been cancelled. + + + + + Allows interation with the current dialog session. + + + + + Raised when a drawer is opened. + + + + + Raised when a drawer is closing. + + + + + Allows interation with the current dialog session. + + + + + Returns full visual ancestry, starting at the leaf. + If element is not of or the + logical ancestry is used. + + + + + + + This interface is the adapter from UiControl (like , and others) to + + You should implement this interface in order to use SmartHint for your own control. + + + + + Checks to see if the targeted control can be deemed as logically + empty, even if not null, affecting the current hint display. + + + + + + Targeted control has keyboard focus + + + + + + Queues a notification message for display in a snackbar. + + Message. + + + + Queues a notification message for display in a snackbar. + + Message. + Content for the action button. + Call back to be executed if user clicks the action button. + + + + Queues a notification message for display in a snackbar. + + Message. + Content for the action button. + Call back to be executed if user clicks the action button. + Argument to pass to . + + + + Queues a notification message for display in a snackbar. + + Message. + Subsequent, duplicate messages queued within a short time span will + be discarded. To override this behaviour and ensure the message always gets displayed set to true. + + + + Queues a notification message for display in a snackbar. + + Message. + Content for the action button. + Call back to be executed if user clicks the action button. + The message will promoted to the front of the queue. + + + + Queues a notification message for display in a snackbar. + + Message. + Content for the action button. + Call back to be executed if user clicks the action button. + Argument to pass to . + The message will be promoted to the front of the queue and never considered to be a duplicate. + + + + Queues a notification message for display in a snackbar. + + Message. + Content for the action button. + Call back to be executed if user clicks the action button. + Argument to pass to . + The message will be promoted to the front of the queue. + The message will never be considered a duplicate. + Message show duration override. + + + + Queues a notification message for display in a snackbar. + + Message. + Content for the action button. + Call back to be executed if user clicks the action button. + Argument to pass to . + The message will promoted to the front of the queue. + The message will never be considered a duplicate. + Message show duration override. + + + + Controls the corner radius of the selection box. + + + + + Provides shorthand to initialise a new for a . + + + + + Floating Content (ex: Button) on navigation rail (optional) + + + + + Gets or sets the icon to display. + + + + + Gets the icon path data for the current . + + + + ****************************************** + This code is auto generated. Do not amend. + ****************************************** + + + ****************************************** + This code is auto generated. Do not amend. + ****************************************** + + List of available icons for use with . + + + All icons sourced from Material Design Icons Font - https://materialdesignicons.com/ - in accordance of + https://github.com/Templarian/MaterialDesign/blob/master/LICENSE. + + + + + Provides full information about a palette. + + + + + View a control on a 3D plane. + + + Taken from http://blogs.msdn.com/greg_schechter/archive/2007/10/26/enter-the-planerator-dead-simple-3d-in-wpf-with-a-stupid-name.aspx , Greg Schechter - Fall 2007 + + + + + Wrap this around a class that we want to catch the measure and arrange + processes occuring on, and propagate to the parent Planerator, if any. + Do this because layout invalidations don't flow up out of a + Viewport2DVisual3D object. + + + + + Defines how the popup is aligned to the toggle part of the control. + + + + + Display the popup below the toggle, and align the left edges.3 + + + + + Display the popup below the toggle, and align the right edges. + + + + + Display the popup below the toggle, and align the center of the popup with the center of the toggle. + + + + + Display the popup above the toggle, and align the left edges. + + + + + Display the popup above the toggle, and align the right edges. + + + + + Display the popup above the toggle, and align the center of the popup with the center of the toggle. + + + + + Display the popup to the left of the toggle, and align the top edges. + + + + + Display the popup to the left of the toggle, and align the bottom edges. + + + + + Display the popup to the left of the toggle, and align the middles. + + + + + Display the popup to the right of the toggle, and align the top edges. + + + + + Display the popup to the right of the toggle, and align the bottom edges. + + + + + Display the popup to the right of the toggle, and align the middles. + + + + + Defines what causes the to open it's popup. + + + + + Open when the toggle button is clicked. + + + + + Open when the mouse goes over the toggle button. + + + + + Open when the mouse goes over the toggle button, or the space in which the popup box would occupy should it be open. + + + + + Popup box, similar to a , but allows more customizable content. + + + + + Routed command to be used inside of a popup content to close it. + + + + + Content to display in the toggle button. + + + + + Template for . + + + + + Content to display in the toggle when it's checked (when the popup is open). Optional; if not provided the is used. + + + + + Template for . + + + + + Command to execute if toggle is checked (popup is open) and is set. + + + + + Command parameter to use in conjunction with . + + + + + Content to display in the content. + + + + + Popup content template. + + + + + Gets or sets whether the popup is currently open. + + + + + Indicates of the popup should stay open if a click occurs inside the popup. + + + + + Gets or sets how the popup is aligned in relation to the toggle. + + + + + Gets or sets what trigger causes the popup to open. + + + + + Get or sets how to unfurl controls when opening the popups. Only child elements of type are animated. + + + + + Gets or sets how to unfurl controls when opening the popups. Only child elements of type are animated. + + + + + Get or sets the popup horizontal offset in relation to the button. + + + + + Get or sets the popup horizontal offset in relation to the button. + + + + + Get or sets the popup vertical offset in relation to the button. + + + + + Get or sets the popup vertical offset in relation to the button. + + + + + Framework use. Provides the method used to position the popup. + + + + + Event raised when the checked toggled content (if set) is clicked. + + + + + Event raised when the checked toggled content (if set) is clicked. + + + + + Raises . + + + + + Raised when the popup is opened. + + + + + Raises . + + + + + Raised when the popup is closed. + + + + + Raises . + + + + + This class was initially based on work done in ControlzEx + https://github.com/ControlzEx/ControlzEx + + This custom popup can be used by validation error templates or something else. + It provides some additional nice features: + - repositioning if host-window size or location changed + - repositioning if host-window gets maximized and vice versa + - it's only topmost if the host-window is activated + + + + + Gets/sets if the popup can be closed by left mouse button down. + + + + + Causes the popup to update it's position according to it's current settings. + + + + + SetWindowPos options + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + A custom control implementing a rating bar. + The icon aka content may be set as a DataTemplate via the ButtonContentTemplate property. + + + + + The DependencyProperty for the RecognizesAccessKey property. + Default Value: false + + + + + Determine if Ripple should use AccessText in its style + + + + + Set to true to cause the ripple to originate from the centre of the + content. Otherwise the effect will originate from the mouse down position. + + + + + Set to true to cause the ripple to originate from the centre of the + content. Otherwise the effect will originate from the mouse down position. + + + + + + + Set to true to cause the ripple to originate from the centre of the + content. Otherwise the effect will originate from the mouse down position. + + + + + + Set to True to disable ripple effect + + + + + Set to True to disable ripple effect + + + + + + + Set to True to disable ripple effect + + + + + + Internal use only. + + + + + Represents a display device or multiple display devices on a single system. + Based on http://referencesource.microsoft.com/#System.Windows.Forms/winforms/Managed/System/WinForms/Screen.cs + + + + + Available working area on the screen. This excludes taskbars and other + docked windows. + + + + + Gets an array of all of the displays on the system. + + + + + Gets the bounds of the display. + + + + + Gets the device name associated with a display. + + + + + Gets a value indicating whether a particular display is the primary device. + + + + + Gets the primary display. + + + + + Gets the working area of the screen. + + + + + Screen instances call this property to determine + if their WorkingArea cache needs to be invalidated. + + + + + Specifies a value that indicates whether the specified object is equal to this one. + + + + + Retrieves a for the monitor that contains the specified point. + + + + + Retrieves a for the monitor that contains the largest region of the Rect. + + + + + Retrieves the working area for the monitor that is closest to the specified point. + + + + + Retrieves the working area for the monitor that contains the largest region of the specified Rect. + + + + + Retrieves the bounds of the monitor that is closest to the specified point. + + + + + Retrieves the bounds of the monitor that contains the largest region of the specified Rect. + + + + + Computes and retrieves a hash code for an object. + + + + + Called by the SystemEvents class when our display settings are + changing. We cache screen information and at this point we must + invalidate our cache. + + + + + Called by the SystemEvents class when our display settings have + changed. Here, we increment a static counter that Screen instances + can check against to invalidate their cache. + + + + + Retrieves a string representing this object. + + + + + A control that implement placeholder behavior. Can work as a simple placeholder either as a floating hint, see property. + + To set a target control you should set the HintProxy property. Use the converter which converts a control into the IHintProxy interface. + + + + + Implements a inspired by the Material Design specs (https://material.google.com/components/snackbars-toasts.html). + + + + + Defines the content of a message within a . Primary content should be set via the + standard property. Where an action is allowed, content + can be provided in . Standard button properties are + provided for actions, includiing . + + + + + Event correspond to left mouse button click on the Action button. + + + + + Add / Remove ActionClickEvent handler + + + + + Maximum total height of snackbar for the action button to be inlined. + + Default value (55) is between single line message (48) and two lined snackbar-message (66) + because tolerance is required (see issue) + + + + + + If set, the active snackbar will be closed. + + + Available only while the snackbar is displayed. + Should be locked by . + + + + + Gets the this is associated with. + + + + + Gets or sets a value that indicates whether this message queue displays messages without discarding duplicates. + False to show every message even if there are duplicates. + + + + + Clear the message queue and close the active snackbar. + This method can be called from any thread. + + + + + The content to be displayed + + + + + Message show duration. + + + + + The content for the action button on the snackbar + + + + + Handler to be invoked when the action button is clicked + + + + + The argument to pass to the delegate. + + + + + Promote the message, pushing it in front of any message that is not promoted. + + + + + Always show this message, even if it's a duplicate + + + + + Automatic ToolTip for TextBlock or TextBoxBase if containing text is trimmed + + + + + Helper properties for working with text fields. + + + + + The text box view margin property + + + + + Sets the text box view margin. + + The element. + The value. + + + + Gets the text box view margin. + + The element. + + The . + + + + + Controls the visibility of the underline decoration. + + + + + Controls the visibility of the underline decoration. + + + + + Controls the visibility of the underline decoration. + + + + + + + The attached WPF property for getting or setting the value for an underline decoration. + + + + + Sets the used for underline decoration. + + + + + + + Gets the used for underline decoration. + + + + + + Controls the visbility of the text field box. + + + + + Controls the visibility of the text field area box. + + + + + Controls the corner radius of the surrounding box. + + + + + Controls the corner radius of the bottom line of the surrounding box. + + + + + Controls the highlighting style of a text box. + + + + + Enables a ripple effect on focusing the text box. + + + + + Automatically inserts spelling suggestions into the text box context menu. + + + + + SuffixText dependency property + + + + + PrefixText dependency property + + + + + Controls the visbility of the clear button. + + + + + Controls visibility of the leading icon + + + + + Controls the leading icon + + + + + Controls the size of the leading icon + + + + + Controls visibility of the trailing icon + + + + + Controls the trailing icon + + + + + Controls the size of the trailing icon + + + + + Applies the text box view margin. + + The text box. + The margin. + + + + The text box view margin property changed callback. + + The dependency object. + The dependency property changed event args. + + + + Get the current Windows theme. + Based on ControlzEx + https://github.com/ControlzEx/ControlzEx/blob/48230bb023c588e1b7eb86ea83f7ddf7d25be735/src/ControlzEx/Theming/WindowsThemeHelper.cs#L19 + + + + + + Called when this element gets focus. + + + + + IsDropDownOpenProperty property changed handler. + + DatePicker that changed its IsDropDownOpen. + DependencyPropertyChangedEventArgs. + + + + Set to true to stop invalid text reverting back to previous valid value. Useful in cases where you + want to display validation messages and allow the user to correct the data without it reverting. + + + + + Set to true to display seconds in the time and allow the user to select seconds. + + + + + Framework use only. + + + + + + + Allows on (IsChecked) content to be provided on supporting styles. + + + + + Allows on (IsChecked) content to be provided on supporting styles. + + + + + + + Allows on (IsChecked) content to be provided on supporting styles. + + + + + Allows an on (IsChecked) template to be provided on supporting styles. + + + + + Allows an on (IsChecked) template to be provided on supporting styles. + + + + + Allows an on (IsChecked) template to be provided on supporting styles. + + + + + Allows transitions to be disabled where supported. + + + + + Allows transitions to be disabled where supported. Note this is an inheritable property. + + + + + Allows transitions to be disabled where supported. Note this is an inheritable property. + + + + + Allows transitions to be disabled where supported. Note this is an inheritable property. + + + + + Duration of the animation + + + + + Multiplies a time span unit by the index of an item in a list. + + + Example usage is for a to have a + time delayed according to position in a list, so cascading animations can occur. + + + + + Direction of the slide wipe + + + + + Duration of the animation + + + + + The transitioner provides an easy way to move between content with a default in-place circular transition. + + + + + Causes the the next slide to be displayed (affectively increments ). + + + + + Causes the the previous slide to be displayed (affectively decrements ). + + + + + Moves to the first slide. + + + + + Moves to the last slide. + + + + + If enabled, transition origins will be applied to wipes, according to where a transition was triggered from. For example, the mouse point where a user clicks a button. + + + + + Content control to host the content of an individual page within a . + + + + + Content control to enable easier transitions. + + + + + Gets or sets the transition to run when the content is loaded and made visible. + + + + + Delay offset to be applied to all opening effect transitions. + + + + + Allows multiple transition effects to be combined and run upon the content loading or being made visible. + + + + + Allows additional rendering for each tree node, outside of the rippled part of the node which responsds to user selection. + + + The content to be rendered is the same of the ; i.e the Header property, or + some other content such as a view model, typically when using a . + + + + + Sets the additional template. + + The element. + The value. + + + + Gets the additional template. + + The element. + + The . + + + + + Allows additional rendering for each tree node, outside of the rippled part of the node which responsds to user selection. + + + The content to be rendered is the same of the ; i.e the Header property, or + some other content such as a view model, typically when using a . + + + + + Sets the additional template selector. + + The element. + The value. + + + + Gets the additional template selector. + + The element. + + The . + + + + + To be used at level, or to be returned by + implementors when the additional template associated with a tree should not be used. + + + + + This is a simple utility to add and remove a single adorner to an element + since there is no built-in way to do that in xaml. + See here + + + + + + + + + + The hint property + + + + + The hint property + + + + + The hint property + + + + + Framework use only. + + + + + Framework use only. + + + + + + + Framework use only. + + + + diff --git a/View/bin/Debug/Model.dll b/View/bin/Debug/Model.dll new file mode 100644 index 0000000..7ce17f8 Binary files /dev/null and b/View/bin/Debug/Model.dll differ diff --git a/View/bin/Debug/Model.pdb b/View/bin/Debug/Model.pdb new file mode 100644 index 0000000..91b11a9 Binary files /dev/null and b/View/bin/Debug/Model.pdb differ diff --git a/View/bin/Debug/SqlSugar.dll b/View/bin/Debug/SqlSugar.dll new file mode 100644 index 0000000..e0ac058 Binary files /dev/null and b/View/bin/Debug/SqlSugar.dll differ diff --git a/View/bin/Debug/Tool.dll b/View/bin/Debug/Tool.dll new file mode 100644 index 0000000..d76f056 Binary files /dev/null and b/View/bin/Debug/Tool.dll differ diff --git a/View/bin/Debug/Tool.pdb b/View/bin/Debug/Tool.pdb new file mode 100644 index 0000000..3ec701c Binary files /dev/null and b/View/bin/Debug/Tool.pdb differ diff --git a/View/bin/Debug/View.exe b/View/bin/Debug/View.exe new file mode 100644 index 0000000..9b15620 Binary files /dev/null and b/View/bin/Debug/View.exe differ diff --git a/View/bin/Debug/View.exe.config b/View/bin/Debug/View.exe.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/View/bin/Debug/View.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/View/bin/Debug/View.pdb b/View/bin/Debug/View.pdb new file mode 100644 index 0000000..7a97e3d Binary files /dev/null and b/View/bin/Debug/View.pdb differ diff --git a/View/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs b/View/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs new file mode 100644 index 0000000..f1a77a1 --- /dev/null +++ b/View/obj/Debug/.NETFramework,Version=v4.5.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5.2", FrameworkDisplayName = ".NET Framework 4.5.2")] diff --git a/View/obj/Debug/App.g.cs b/View/obj/Debug/App.g.cs new file mode 100644 index 0000000..e19b726 --- /dev/null +++ b/View/obj/Debug/App.g.cs @@ -0,0 +1,70 @@ +#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "40AD4129693B9B3938C0DDE3654236AA261BBDDF7BF9F9DE6E97ED8950CD9A03" +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; +using View; + + +namespace View { + + + /// + /// App + /// + public partial class App : System.Windows.Application { + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + + #line 5 "..\..\App.xaml" + this.StartupUri = new System.Uri("MesLoginView.xaml", System.UriKind.Relative); + + #line default + #line hidden + } + + /// + /// Application Entry Point. + /// + [System.STAThreadAttribute()] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public static void Main() { + View.App app = new View.App(); + app.InitializeComponent(); + app.Run(); + } + } +} + diff --git a/View/obj/Debug/App.g.i.cs b/View/obj/Debug/App.g.i.cs new file mode 100644 index 0000000..e19b726 --- /dev/null +++ b/View/obj/Debug/App.g.i.cs @@ -0,0 +1,70 @@ +#pragma checksum "..\..\App.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "40AD4129693B9B3938C0DDE3654236AA261BBDDF7BF9F9DE6E97ED8950CD9A03" +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; +using View; + + +namespace View { + + + /// + /// App + /// + public partial class App : System.Windows.Application { + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + + #line 5 "..\..\App.xaml" + this.StartupUri = new System.Uri("MesLoginView.xaml", System.UriKind.Relative); + + #line default + #line hidden + } + + /// + /// Application Entry Point. + /// + [System.STAThreadAttribute()] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public static void Main() { + View.App app = new View.App(); + app.InitializeComponent(); + app.Run(); + } + } +} + diff --git a/View/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/View/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..ef195c7 Binary files /dev/null and b/View/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/View/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/View/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..5a0e884 Binary files /dev/null and b/View/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/View/obj/Debug/MainWindow.g.i.cs b/View/obj/Debug/MainWindow.g.i.cs new file mode 100644 index 0000000..a3f039d --- /dev/null +++ b/View/obj/Debug/MainWindow.g.i.cs @@ -0,0 +1,75 @@ +#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "79EA2B931E9500C1A440E6B16F31679F1E6D717BE4BAEE25389A2F1B144BEFE0" +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; +using View; + + +namespace View { + + + /// + /// MainWindow + /// + public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector { + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/View;component/mainwindow.xaml", System.UriKind.Relative); + + #line 1 "..\..\MainWindow.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + this._contentLoaded = true; + } + } +} + diff --git a/View/obj/Debug/MesLoginView.baml b/View/obj/Debug/MesLoginView.baml new file mode 100644 index 0000000..31f7a45 Binary files /dev/null and b/View/obj/Debug/MesLoginView.baml differ diff --git a/View/obj/Debug/MesLoginView.g.cs b/View/obj/Debug/MesLoginView.g.cs new file mode 100644 index 0000000..f47c85f --- /dev/null +++ b/View/obj/Debug/MesLoginView.g.cs @@ -0,0 +1,178 @@ +#pragma checksum "..\..\MesLoginView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "23698BA859F669A8E756A2DCB09A9D312086A9B86156D5674A4ACF960FD69023" +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +using MaterialDesignThemes.Wpf; +using MaterialDesignThemes.Wpf.Converters; +using MaterialDesignThemes.Wpf.Transitions; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; +using View; + + +namespace View { + + + /// + /// MesLoginView + /// + public partial class MesLoginView : System.Windows.Window, System.Windows.Markup.IComponentConnector { + + + #line 10 "..\..\MesLoginView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal View.MesLoginView main; + + #line default + #line hidden + + + #line 15 "..\..\MesLoginView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Media.Animation.Storyboard sbOpShow; + + #line default + #line hidden + + + #line 72 "..\..\MesLoginView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock lblTitle; + + #line default + #line hidden + + + #line 81 "..\..\MesLoginView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBox Account; + + #line default + #line hidden + + + #line 86 "..\..\MesLoginView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.PasswordBox Password; + + #line default + #line hidden + + + #line 91 "..\..\MesLoginView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.ComboBox ComboBoxProd; + + #line default + #line hidden + + + #line 94 "..\..\MesLoginView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Button btnCancel; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/View;component/mesloginview.xaml", System.UriKind.Relative); + + #line 1 "..\..\MesLoginView.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + this.main = ((View.MesLoginView)(target)); + + #line 11 "..\..\MesLoginView.xaml" + this.main.Loaded += new System.Windows.RoutedEventHandler(this.main_Loaded); + + #line default + #line hidden + return; + case 2: + this.sbOpShow = ((System.Windows.Media.Animation.Storyboard)(target)); + return; + case 3: + this.lblTitle = ((System.Windows.Controls.TextBlock)(target)); + return; + case 4: + this.Account = ((System.Windows.Controls.TextBox)(target)); + return; + case 5: + this.Password = ((System.Windows.Controls.PasswordBox)(target)); + return; + case 6: + this.ComboBoxProd = ((System.Windows.Controls.ComboBox)(target)); + return; + case 7: + + #line 93 "..\..\MesLoginView.xaml" + ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnLogin_Click); + + #line default + #line hidden + return; + case 8: + this.btnCancel = ((System.Windows.Controls.Button)(target)); + + #line 94 "..\..\MesLoginView.xaml" + this.btnCancel.Click += new System.Windows.RoutedEventHandler(this.btnCancel_Click); + + #line default + #line hidden + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/View/obj/Debug/MesLoginView.g.i.cs b/View/obj/Debug/MesLoginView.g.i.cs new file mode 100644 index 0000000..f47c85f --- /dev/null +++ b/View/obj/Debug/MesLoginView.g.i.cs @@ -0,0 +1,178 @@ +#pragma checksum "..\..\MesLoginView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "23698BA859F669A8E756A2DCB09A9D312086A9B86156D5674A4ACF960FD69023" +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +using MaterialDesignThemes.Wpf; +using MaterialDesignThemes.Wpf.Converters; +using MaterialDesignThemes.Wpf.Transitions; +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; +using View; + + +namespace View { + + + /// + /// MesLoginView + /// + public partial class MesLoginView : System.Windows.Window, System.Windows.Markup.IComponentConnector { + + + #line 10 "..\..\MesLoginView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal View.MesLoginView main; + + #line default + #line hidden + + + #line 15 "..\..\MesLoginView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Media.Animation.Storyboard sbOpShow; + + #line default + #line hidden + + + #line 72 "..\..\MesLoginView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock lblTitle; + + #line default + #line hidden + + + #line 81 "..\..\MesLoginView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBox Account; + + #line default + #line hidden + + + #line 86 "..\..\MesLoginView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.PasswordBox Password; + + #line default + #line hidden + + + #line 91 "..\..\MesLoginView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.ComboBox ComboBoxProd; + + #line default + #line hidden + + + #line 94 "..\..\MesLoginView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Button btnCancel; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/View;component/mesloginview.xaml", System.UriKind.Relative); + + #line 1 "..\..\MesLoginView.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + this.main = ((View.MesLoginView)(target)); + + #line 11 "..\..\MesLoginView.xaml" + this.main.Loaded += new System.Windows.RoutedEventHandler(this.main_Loaded); + + #line default + #line hidden + return; + case 2: + this.sbOpShow = ((System.Windows.Media.Animation.Storyboard)(target)); + return; + case 3: + this.lblTitle = ((System.Windows.Controls.TextBlock)(target)); + return; + case 4: + this.Account = ((System.Windows.Controls.TextBox)(target)); + return; + case 5: + this.Password = ((System.Windows.Controls.PasswordBox)(target)); + return; + case 6: + this.ComboBoxProd = ((System.Windows.Controls.ComboBox)(target)); + return; + case 7: + + #line 93 "..\..\MesLoginView.xaml" + ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnLogin_Click); + + #line default + #line hidden + return; + case 8: + this.btnCancel = ((System.Windows.Controls.Button)(target)); + + #line 94 "..\..\MesLoginView.xaml" + this.btnCancel.Click += new System.Windows.RoutedEventHandler(this.btnCancel_Click); + + #line default + #line hidden + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/View/obj/Debug/MessageBoxView.baml b/View/obj/Debug/MessageBoxView.baml new file mode 100644 index 0000000..3878aa1 Binary files /dev/null and b/View/obj/Debug/MessageBoxView.baml differ diff --git a/View/obj/Debug/MessageBoxView.g.cs b/View/obj/Debug/MessageBoxView.g.cs new file mode 100644 index 0000000..2120b5a --- /dev/null +++ b/View/obj/Debug/MessageBoxView.g.cs @@ -0,0 +1,156 @@ +#pragma checksum "..\..\MessageBoxView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F3843B9CC19CF9C8DFF0F951650D16EBB180E1B21528499EF00141327C3D14EB" +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; +using View; + + +namespace View { + + + /// + /// MessageBoxView + /// + public partial class MessageBoxView : System.Windows.Window, System.Windows.Markup.IComponentConnector { + + + #line 9 "..\..\MessageBoxView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal View.MessageBoxView main; + + #line default + #line hidden + + + #line 14 "..\..\MessageBoxView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Media.Animation.Storyboard sbOpShow; + + #line default + #line hidden + + + #line 39 "..\..\MessageBoxView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock lblTitle; + + #line default + #line hidden + + + #line 43 "..\..\MessageBoxView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBox lblMsg; + + #line default + #line hidden + + + #line 52 "..\..\MessageBoxView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Border border1; + + #line default + #line hidden + + + #line 57 "..\..\MessageBoxView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Border border2; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/View;component/messageboxview.xaml", System.UriKind.Relative); + + #line 1 "..\..\MessageBoxView.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + this.main = ((View.MessageBoxView)(target)); + return; + case 2: + this.sbOpShow = ((System.Windows.Media.Animation.Storyboard)(target)); + return; + case 3: + this.lblTitle = ((System.Windows.Controls.TextBlock)(target)); + return; + case 4: + this.lblMsg = ((System.Windows.Controls.TextBox)(target)); + return; + case 5: + this.border1 = ((System.Windows.Controls.Border)(target)); + + #line 51 "..\..\MessageBoxView.xaml" + this.border1.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Yes_MouseLeftButtonDown); + + #line default + #line hidden + return; + case 6: + this.border2 = ((System.Windows.Controls.Border)(target)); + + #line 56 "..\..\MessageBoxView.xaml" + this.border2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.No_MouseLeftButtonDown); + + #line default + #line hidden + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/View/obj/Debug/MessageBoxView.g.i.cs b/View/obj/Debug/MessageBoxView.g.i.cs new file mode 100644 index 0000000..2120b5a --- /dev/null +++ b/View/obj/Debug/MessageBoxView.g.i.cs @@ -0,0 +1,156 @@ +#pragma checksum "..\..\MessageBoxView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F3843B9CC19CF9C8DFF0F951650D16EBB180E1B21528499EF00141327C3D14EB" +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +using System; +using System.Diagnostics; +using System.Windows; +using System.Windows.Automation; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Media.Effects; +using System.Windows.Media.Imaging; +using System.Windows.Media.Media3D; +using System.Windows.Media.TextFormatting; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.Windows.Shell; +using View; + + +namespace View { + + + /// + /// MessageBoxView + /// + public partial class MessageBoxView : System.Windows.Window, System.Windows.Markup.IComponentConnector { + + + #line 9 "..\..\MessageBoxView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal View.MessageBoxView main; + + #line default + #line hidden + + + #line 14 "..\..\MessageBoxView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Media.Animation.Storyboard sbOpShow; + + #line default + #line hidden + + + #line 39 "..\..\MessageBoxView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBlock lblTitle; + + #line default + #line hidden + + + #line 43 "..\..\MessageBoxView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.TextBox lblMsg; + + #line default + #line hidden + + + #line 52 "..\..\MessageBoxView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Border border1; + + #line default + #line hidden + + + #line 57 "..\..\MessageBoxView.xaml" + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] + internal System.Windows.Controls.Border border2; + + #line default + #line hidden + + private bool _contentLoaded; + + /// + /// InitializeComponent + /// + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() { + if (_contentLoaded) { + return; + } + _contentLoaded = true; + System.Uri resourceLocater = new System.Uri("/View;component/messageboxview.xaml", System.UriKind.Relative); + + #line 1 "..\..\MessageBoxView.xaml" + System.Windows.Application.LoadComponent(this, resourceLocater); + + #line default + #line hidden + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] + void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { + switch (connectionId) + { + case 1: + this.main = ((View.MessageBoxView)(target)); + return; + case 2: + this.sbOpShow = ((System.Windows.Media.Animation.Storyboard)(target)); + return; + case 3: + this.lblTitle = ((System.Windows.Controls.TextBlock)(target)); + return; + case 4: + this.lblMsg = ((System.Windows.Controls.TextBox)(target)); + return; + case 5: + this.border1 = ((System.Windows.Controls.Border)(target)); + + #line 51 "..\..\MessageBoxView.xaml" + this.border1.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Yes_MouseLeftButtonDown); + + #line default + #line hidden + return; + case 6: + this.border2 = ((System.Windows.Controls.Border)(target)); + + #line 56 "..\..\MessageBoxView.xaml" + this.border2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.No_MouseLeftButtonDown); + + #line default + #line hidden + return; + } + this._contentLoaded = true; + } + } +} + diff --git a/View/obj/Debug/View.Properties.Resources.resources b/View/obj/Debug/View.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/View/obj/Debug/View.Properties.Resources.resources differ diff --git a/View/obj/Debug/View.csproj.AssemblyReference.cache b/View/obj/Debug/View.csproj.AssemblyReference.cache new file mode 100644 index 0000000..8649108 Binary files /dev/null and b/View/obj/Debug/View.csproj.AssemblyReference.cache differ diff --git a/View/obj/Debug/View.csproj.CoreCompileInputs.cache b/View/obj/Debug/View.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..72166c2 --- /dev/null +++ b/View/obj/Debug/View.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +9a6ab1a5c6e1902f8b6d0710f788d8148a924454d2412c822e5cfcd4ec422c3f diff --git a/View/obj/Debug/View.csproj.FileListAbsolute.txt b/View/obj/Debug/View.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..d7ea5d9 --- /dev/null +++ b/View/obj/Debug/View.csproj.FileListAbsolute.txt @@ -0,0 +1,31 @@ +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\View.exe.config +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\View.exe +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\View.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\View.csproj.AssemblyReference.cache +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\App.g.cs +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\View_MarkupCompile.cache +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\View_MarkupCompile.lref +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\View.g.resources +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\View.Properties.Resources.resources +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\View.csproj.GenerateResource.cache +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\View.csproj.CoreCompileInputs.cache +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\View.exe +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\View.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\MesLoginView.g.cs +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\MessageBoxView.g.cs +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\HandyControl.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\MaterialDesignColors.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\MaterialDesignThemes.Wpf.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\Model.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\Tool.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\SqlSugar.dll +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\Model.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\Tool.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\HandyControl.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\HandyControl.xml +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\MaterialDesignColors.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\MaterialDesignThemes.Wpf.pdb +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\bin\Debug\MaterialDesignThemes.Wpf.xml +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\MesLoginView.baml +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\MessageBoxView.baml +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\View.csproj.Up2Date diff --git a/View/obj/Debug/View.csproj.GenerateResource.cache b/View/obj/Debug/View.csproj.GenerateResource.cache new file mode 100644 index 0000000..e74ac7c Binary files /dev/null and b/View/obj/Debug/View.csproj.GenerateResource.cache differ diff --git a/View/obj/Debug/View.csproj.Up2Date b/View/obj/Debug/View.csproj.Up2Date new file mode 100644 index 0000000..e69de29 diff --git a/View/obj/Debug/View.exe b/View/obj/Debug/View.exe new file mode 100644 index 0000000..9b15620 Binary files /dev/null and b/View/obj/Debug/View.exe differ diff --git a/View/obj/Debug/View.g.resources b/View/obj/Debug/View.g.resources new file mode 100644 index 0000000..2389305 Binary files /dev/null and b/View/obj/Debug/View.g.resources differ diff --git a/View/obj/Debug/View.pdb b/View/obj/Debug/View.pdb new file mode 100644 index 0000000..7a97e3d Binary files /dev/null and b/View/obj/Debug/View.pdb differ diff --git a/View/obj/Debug/View_MarkupCompile.cache b/View/obj/Debug/View_MarkupCompile.cache new file mode 100644 index 0000000..fd73ac3 --- /dev/null +++ b/View/obj/Debug/View_MarkupCompile.cache @@ -0,0 +1,20 @@ +View + + +winexe +C# +.cs +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\ +View +none +false +DEBUG;TRACE +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\App.xaml +21830185612 + +61481381422 +18-312469538 +MesLoginView.xaml;MessageBoxView.xaml; + +False + diff --git a/View/obj/Debug/View_MarkupCompile.i.cache b/View/obj/Debug/View_MarkupCompile.i.cache new file mode 100644 index 0000000..79ea501 --- /dev/null +++ b/View/obj/Debug/View_MarkupCompile.i.cache @@ -0,0 +1,20 @@ +View + + +winexe +C# +.cs +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\obj\Debug\ +View +none +false +DEBUG;TRACE +D:\桌面文件夹\Desktop\中移版本库\金机点检\View\App.xaml +21830185612 + +7-1122928434 +18-312469538 +MesLoginView.xaml;MessageBoxView.xaml; + +True + diff --git a/View/obj/Debug/View_MarkupCompile.i.lref b/View/obj/Debug/View_MarkupCompile.i.lref new file mode 100644 index 0000000..992daa4 --- /dev/null +++ b/View/obj/Debug/View_MarkupCompile.i.lref @@ -0,0 +1,5 @@ + + +FD:\桌面文件夹\Desktop\中移版本库\金机点检\View\MesLoginView.xaml;; +FD:\桌面文件夹\Desktop\中移版本库\金机点检\View\MessageBoxView.xaml;; + diff --git a/View/obj/Debug/View_MarkupCompile.lref b/View/obj/Debug/View_MarkupCompile.lref new file mode 100644 index 0000000..992daa4 --- /dev/null +++ b/View/obj/Debug/View_MarkupCompile.lref @@ -0,0 +1,5 @@ + + +FD:\桌面文件夹\Desktop\中移版本库\金机点检\View\MesLoginView.xaml;; +FD:\桌面文件夹\Desktop\中移版本库\金机点检\View\MessageBoxView.xaml;; + diff --git a/View/packages.config b/View/packages.config new file mode 100644 index 0000000..9dcafec --- /dev/null +++ b/View/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/点检/.vs/点检/FileContentIndex/52d2c2b3-689f-428e-b51d-1d929baa7c3c.vsidx b/点检/.vs/点检/FileContentIndex/52d2c2b3-689f-428e-b51d-1d929baa7c3c.vsidx new file mode 100644 index 0000000..f19b20a Binary files /dev/null and b/点检/.vs/点检/FileContentIndex/52d2c2b3-689f-428e-b51d-1d929baa7c3c.vsidx differ diff --git a/点检/.vs/点检/v17/.suo b/点检/.vs/点检/v17/.suo new file mode 100644 index 0000000..780ded0 Binary files /dev/null and b/点检/.vs/点检/v17/.suo differ diff --git a/点检/.vs/点检/v17/DocumentLayout.backup.json b/点检/.vs/点检/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..327aa98 --- /dev/null +++ b/点检/.vs/点检/v17/DocumentLayout.backup.json @@ -0,0 +1,361 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{CC8994B7-1312-45E6-ABDA-92413692FEB3}|..\\Tool\\Tool.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\tool\\sqlhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EED41D82-0ECD-49C0-B753-4DE90642BE69}|..\\DAL\\DAL.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\dal\\checkdal.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|solutionrelative:mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|d:\\\u684C\u9762\u6587\u4EF6\u5939\\desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", + "RelativeMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|solutionrelative:mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" + }, + { + "AbsoluteMoniker": "D:0:0:{02A200E7-551A-4DD7-B23A-AFAA9DBECF81}|..\\BLL\\BLL.csproj|d:\\\u684C\u9762\u6587\u4EF6\u5939\\desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\bll\\checkbll.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{CC8994B7-1312-45E6-ABDA-92413692FEB3}|..\\Tool\\Tool.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\tool\\confighelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{5A80DE64-FCD5-4D7C-8A1E-4199412D80BD}|..\\Model\\Model.csproj|d:\\\u684C\u9762\u6587\u4EF6\u5939\\desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\model\\settingmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\obj\\Debug\\MainWindow.g.i.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:obj\\Debug\\MainWindow.g.i.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\packages.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}", + "RelativeMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|solutionrelative:packages.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\packages\\HandyControls.3.4.2\\readme.txt||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:packages\\HandyControls.3.4.2\\readme.txt||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\app.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}", + "RelativeMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|solutionrelative:app.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}" + }, + { + "AbsoluteMoniker": "D:0:0:{CC8994B7-1312-45E6-ABDA-92413692FEB3}|..\\Tool\\Tool.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\tool\\loghelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{CC8994B7-1312-45E6-ABDA-92413692FEB3}|..\\Tool\\Tool.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\tool\\filehelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\checkviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|solutionrelative:checkviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{5A80DE64-FCD5-4D7C-8A1E-4199412D80BD}|..\\Model\\Model.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\model\\checkmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{CC8994B7-1312-45E6-ABDA-92413692FEB3}|..\\Tool\\Tool.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\tool\\commonhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{D7E15C96-E37B-4520-B89C-B6D563CAE6B8}|..\\View\\View.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\view\\messageboxview.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{D7E15C96-E37B-4520-B89C-B6D563CAE6B8}|..\\View\\View.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\view\\mesloginview.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EED41D82-0ECD-49C0-B753-4DE90642BE69}|..\\DAL\\DAL.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\dal\\packages.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}" + }, + { + "AbsoluteMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\app.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", + "RelativeMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|solutionrelative:app.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" + }, + { + "AbsoluteMoniker": "D:0:0:{D7E15C96-E37B-4520-B89C-B6D563CAE6B8}|..\\View\\View.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\view\\mesloginview.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 19, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{79664857-03bf-4bca-aa54-ec998b3328f8}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "CheckBLL.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\BLL\\CheckBLL.cs", + "RelativeDocumentMoniker": "..\\BLL\\CheckBLL.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\BLL\\CheckBLL.cs", + "RelativeToolTip": "..\\BLL\\CheckBLL.cs", + "ViewState": "AgIAALYAAAAAAAAAAAAAAL4AAAA6AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-01T03:14:36.763Z" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "MainWindow.xaml.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\MainWindow.xaml.cs", + "RelativeDocumentMoniker": "MainWindow.xaml.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\MainWindow.xaml.cs", + "RelativeToolTip": "MainWindow.xaml.cs", + "ViewState": "AgIAABICAAAAAAAAAAAAADACAAAnAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T09:13:51.46Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 15, + "Title": "CommonHelper.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\CommonHelper.cs", + "RelativeDocumentMoniker": "..\\Tool\\CommonHelper.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\CommonHelper.cs", + "RelativeToolTip": "..\\Tool\\CommonHelper.cs", + "ViewState": "AgIAAGIAAAAAAAAAAAAQwAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-25T07:30:10.742Z" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "SettingModel.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Model\\SettingModel.cs", + "RelativeDocumentMoniker": "..\\Model\\SettingModel.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Model\\SettingModel.cs", + "RelativeToolTip": "..\\Model\\SettingModel.cs", + "ViewState": "AgIAABQAAAAAAAAAAAAjwBsAAAARAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T09:29:29.14Z" + }, + { + "$type": "Document", + "DocumentIndex": 14, + "Title": "CheckModel.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Model\\CheckModel.cs", + "RelativeDocumentMoniker": "..\\Model\\CheckModel.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Model\\CheckModel.cs", + "RelativeToolTip": "..\\Model\\CheckModel.cs", + "ViewState": "AgIAABEAAAAAAAAAAADwvxUAAAAVAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-02T00:54:08.637Z" + }, + { + "$type": "Document", + "DocumentIndex": 17, + "Title": "MesLoginView.xaml.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\View\\MesLoginView.xaml.cs", + "RelativeDocumentMoniker": "..\\View\\MesLoginView.xaml.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\View\\MesLoginView.xaml.cs", + "RelativeToolTip": "..\\View\\MesLoginView.xaml.cs", + "ViewState": "AgIAAHEAAAAAAAAAAAArwH4AAABHAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T09:13:34.075Z" + }, + { + "$type": "Document", + "DocumentIndex": 9, + "Title": "readme.txt", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\packages\\HandyControls.3.4.2\\readme.txt", + "RelativeDocumentMoniker": "packages\\HandyControls.3.4.2\\readme.txt", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\packages\\HandyControls.3.4.2\\readme.txt", + "RelativeToolTip": "packages\\HandyControls.3.4.2\\readme.txt", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003109|", + "WhenOpened": "2024-06-28T09:16:57.447Z" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "packages.config", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\packages.config", + "RelativeDocumentMoniker": "packages.config", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\packages.config", + "RelativeToolTip": "packages.config", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAEAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|", + "WhenOpened": "2024-07-01T02:31:03.561Z" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "MainWindow.g.i.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\obj\\Debug\\MainWindow.g.i.cs", + "RelativeDocumentMoniker": "obj\\Debug\\MainWindow.g.i.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\obj\\Debug\\MainWindow.g.i.cs", + "RelativeToolTip": "obj\\Debug\\MainWindow.g.i.cs", + "ViewState": "AgIAAFEAAAAAAAAAAAApwGQAAAAMAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-02T05:59:15.763Z" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "ConfigHelper.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\ConfigHelper.cs", + "RelativeDocumentMoniker": "..\\Tool\\ConfigHelper.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\ConfigHelper.cs", + "RelativeToolTip": "..\\Tool\\ConfigHelper.cs", + "ViewState": "AgIAABwAAAAAAAAAAAAkwCwAAAAOAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-25T07:30:12.562Z" + }, + { + "$type": "Document", + "DocumentIndex": 13, + "Title": "CheckViewModel.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\CheckViewModel.cs", + "RelativeDocumentMoniker": "CheckViewModel.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\CheckViewModel.cs", + "RelativeToolTip": "CheckViewModel.cs", + "ViewState": "AgIAAAYAAAAAAAAAAAAEwCEAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-01T00:39:20.766Z" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "MainWindow.xaml", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\MainWindow.xaml", + "RelativeDocumentMoniker": "MainWindow.xaml", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\MainWindow.xaml", + "RelativeToolTip": "MainWindow.xaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2024-06-28T09:24:35.067Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 10, + "Title": "App.config", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\App.config", + "RelativeDocumentMoniker": "App.config", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\App.config", + "RelativeToolTip": "App.config", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABQAAAAQAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|", + "WhenOpened": "2024-06-28T09:29:20.331Z" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "CheckDAL.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\DAL\\CheckDAL.cs", + "RelativeDocumentMoniker": "..\\DAL\\CheckDAL.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\DAL\\CheckDAL.cs", + "RelativeToolTip": "..\\DAL\\CheckDAL.cs", + "ViewState": "AgIAANUAAAAAAAAAAAAAANgAAABOAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T09:46:28.206Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 11, + "Title": "LogHelper.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\LogHelper.cs", + "RelativeDocumentMoniker": "..\\Tool\\LogHelper.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\LogHelper.cs", + "RelativeToolTip": "..\\Tool\\LogHelper.cs", + "ViewState": "AgIAAA0AAAAAAAAAAAAWwBAAAABHAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-25T07:30:15.116Z" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "SqlHelper.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\SqlHelper.cs", + "RelativeDocumentMoniker": "..\\Tool\\SqlHelper.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\SqlHelper.cs", + "RelativeToolTip": "..\\Tool\\SqlHelper.cs", + "ViewState": "AgIAADUAAAAAAAAAAAAmwDYAAAAhAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T09:48:14.458Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 12, + "Title": "FileHelper.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\FileHelper.cs", + "RelativeDocumentMoniker": "..\\Tool\\FileHelper.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\FileHelper.cs", + "RelativeToolTip": "..\\Tool\\FileHelper.cs", + "ViewState": "AgIAAAYAAAAAAAAAAAAswAsAAAA1AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-25T07:30:13.88Z" + }, + { + "$type": "Document", + "DocumentIndex": 16, + "Title": "MessageBoxView.xaml.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\View\\MessageBoxView.xaml.cs", + "RelativeDocumentMoniker": "..\\View\\MessageBoxView.xaml.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\View\\MessageBoxView.xaml.cs", + "RelativeToolTip": "..\\View\\MessageBoxView.xaml.cs", + "ViewState": "AgIAAAYAAAAAAAAAAABowAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T10:45:31.671Z" + }, + { + "$type": "Document", + "DocumentIndex": 18, + "Title": "packages.config", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\DAL\\packages.config", + "RelativeDocumentMoniker": "..\\DAL\\packages.config", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\DAL\\packages.config", + "RelativeToolTip": "..\\DAL\\packages.config", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|", + "WhenOpened": "2024-06-28T09:54:56.305Z" + }, + { + "$type": "Document", + "DocumentIndex": 19, + "Title": "App.xaml", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\App.xaml", + "RelativeDocumentMoniker": "App.xaml", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\App.xaml", + "RelativeToolTip": "App.xaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2024-06-28T09:15:39.13Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 20, + "Title": "MesLoginView.xaml", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\View\\MesLoginView.xaml", + "RelativeDocumentMoniker": "..\\View\\MesLoginView.xaml", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\View\\MesLoginView.xaml", + "RelativeToolTip": "..\\View\\MesLoginView.xaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2024-06-28T09:13:36.591Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/点检/.vs/点检/v17/DocumentLayout.json b/点检/.vs/点检/v17/DocumentLayout.json new file mode 100644 index 0000000..4ffd1cb --- /dev/null +++ b/点检/.vs/点检/v17/DocumentLayout.json @@ -0,0 +1,362 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|solutionrelative:mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EED41D82-0ECD-49C0-B753-4DE90642BE69}|..\\DAL\\DAL.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\dal\\checkdal.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{CC8994B7-1312-45E6-ABDA-92413692FEB3}|..\\Tool\\Tool.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\tool\\sqlhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{02A200E7-551A-4DD7-B23A-AFAA9DBECF81}|..\\BLL\\BLL.csproj|d:\\\u684C\u9762\u6587\u4EF6\u5939\\desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\bll\\checkbll.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|d:\\\u684C\u9762\u6587\u4EF6\u5939\\desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", + "RelativeMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|solutionrelative:mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" + }, + { + "AbsoluteMoniker": "D:0:0:{CC8994B7-1312-45E6-ABDA-92413692FEB3}|..\\Tool\\Tool.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\tool\\confighelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{5A80DE64-FCD5-4D7C-8A1E-4199412D80BD}|..\\Model\\Model.csproj|d:\\\u684C\u9762\u6587\u4EF6\u5939\\desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\model\\settingmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\obj\\Debug\\MainWindow.g.i.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:obj\\Debug\\MainWindow.g.i.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\packages.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}", + "RelativeMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|solutionrelative:packages.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\packages\\HandyControls.3.4.2\\readme.txt||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:packages\\HandyControls.3.4.2\\readme.txt||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\app.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}", + "RelativeMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|solutionrelative:app.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}" + }, + { + "AbsoluteMoniker": "D:0:0:{CC8994B7-1312-45E6-ABDA-92413692FEB3}|..\\Tool\\Tool.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\tool\\loghelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{CC8994B7-1312-45E6-ABDA-92413692FEB3}|..\\Tool\\Tool.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\tool\\filehelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\checkviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|solutionrelative:checkviewmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{5A80DE64-FCD5-4D7C-8A1E-4199412D80BD}|..\\Model\\Model.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\model\\checkmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{CC8994B7-1312-45E6-ABDA-92413692FEB3}|..\\Tool\\Tool.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\tool\\commonhelper.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{D7E15C96-E37B-4520-B89C-B6D563CAE6B8}|..\\View\\View.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\view\\messageboxview.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{D7E15C96-E37B-4520-B89C-B6D563CAE6B8}|..\\View\\View.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\view\\mesloginview.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EED41D82-0ECD-49C0-B753-4DE90642BE69}|..\\DAL\\DAL.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\dal\\packages.config||{FA3CD31E-987B-443A-9B81-186104E8DAC1}" + }, + { + "AbsoluteMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\app.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}", + "RelativeMoniker": "D:0:0:{5BAF3B6E-ACA8-40BD-A4C8-EA9886AD3B53}|\u70B9\u68C0.csproj|solutionrelative:app.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" + }, + { + "AbsoluteMoniker": "D:0:0:{D7E15C96-E37B-4520-B89C-B6D563CAE6B8}|..\\View\\View.csproj|D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\view\\mesloginview.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 5, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{79664857-03bf-4bca-aa54-ec998b3328f8}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "CheckBLL.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\BLL\\CheckBLL.cs", + "RelativeDocumentMoniker": "..\\BLL\\CheckBLL.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\BLL\\CheckBLL.cs", + "RelativeToolTip": "..\\BLL\\CheckBLL.cs", + "ViewState": "AgIAAB4AAAAAAAAAAAAAAB0AAAAMAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-01T03:14:36.763Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "MainWindow.xaml.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\MainWindow.xaml.cs", + "RelativeDocumentMoniker": "MainWindow.xaml.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\MainWindow.xaml.cs", + "RelativeToolTip": "MainWindow.xaml.cs", + "ViewState": "AgIAAKkBAAAAAAAAAAAAAMYBAAAoAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T09:13:51.46Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 15, + "Title": "CommonHelper.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\CommonHelper.cs", + "RelativeDocumentMoniker": "..\\Tool\\CommonHelper.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\CommonHelper.cs", + "RelativeToolTip": "..\\Tool\\CommonHelper.cs", + "ViewState": "AgIAAGIAAAAAAAAAAAAQwAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-25T07:30:10.742Z" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "SettingModel.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Model\\SettingModel.cs", + "RelativeDocumentMoniker": "..\\Model\\SettingModel.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Model\\SettingModel.cs", + "RelativeToolTip": "..\\Model\\SettingModel.cs", + "ViewState": "AgIAABQAAAAAAAAAAAAjwBsAAAARAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T09:29:29.14Z" + }, + { + "$type": "Document", + "DocumentIndex": 14, + "Title": "CheckModel.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Model\\CheckModel.cs", + "RelativeDocumentMoniker": "..\\Model\\CheckModel.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Model\\CheckModel.cs", + "RelativeToolTip": "..\\Model\\CheckModel.cs", + "ViewState": "AgIAABEAAAAAAAAAAADwvxUAAAAVAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-02T00:54:08.637Z" + }, + { + "$type": "Document", + "DocumentIndex": 17, + "Title": "MesLoginView.xaml.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\View\\MesLoginView.xaml.cs", + "RelativeDocumentMoniker": "..\\View\\MesLoginView.xaml.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\View\\MesLoginView.xaml.cs", + "RelativeToolTip": "..\\View\\MesLoginView.xaml.cs", + "ViewState": "AgIAAHEAAAAAAAAAAAArwH4AAABHAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T09:13:34.075Z" + }, + { + "$type": "Document", + "DocumentIndex": 9, + "Title": "readme.txt", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\packages\\HandyControls.3.4.2\\readme.txt", + "RelativeDocumentMoniker": "packages\\HandyControls.3.4.2\\readme.txt", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\packages\\HandyControls.3.4.2\\readme.txt", + "RelativeToolTip": "packages\\HandyControls.3.4.2\\readme.txt", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003109|", + "WhenOpened": "2024-06-28T09:16:57.447Z" + }, + { + "$type": "Document", + "DocumentIndex": 8, + "Title": "packages.config", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\packages.config", + "RelativeDocumentMoniker": "packages.config", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\packages.config", + "RelativeToolTip": "packages.config", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAEAAAAJAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|", + "WhenOpened": "2024-07-01T02:31:03.561Z" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "MainWindow.g.i.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\obj\\Debug\\MainWindow.g.i.cs", + "RelativeDocumentMoniker": "obj\\Debug\\MainWindow.g.i.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\obj\\Debug\\MainWindow.g.i.cs", + "RelativeToolTip": "obj\\Debug\\MainWindow.g.i.cs", + "ViewState": "AgIAAFEAAAAAAAAAAAApwGQAAAAMAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-02T05:59:15.763Z" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "ConfigHelper.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\ConfigHelper.cs", + "RelativeDocumentMoniker": "..\\Tool\\ConfigHelper.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\ConfigHelper.cs", + "RelativeToolTip": "..\\Tool\\ConfigHelper.cs", + "ViewState": "AgIAABwAAAAAAAAAAAAkwCwAAAAOAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-25T07:30:12.562Z" + }, + { + "$type": "Document", + "DocumentIndex": 13, + "Title": "CheckViewModel.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\CheckViewModel.cs", + "RelativeDocumentMoniker": "CheckViewModel.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\CheckViewModel.cs", + "RelativeToolTip": "CheckViewModel.cs", + "ViewState": "AgIAAAYAAAAAAAAAAAAEwCEAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-01T00:39:20.766Z" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "MainWindow.xaml", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\MainWindow.xaml", + "RelativeDocumentMoniker": "MainWindow.xaml", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\MainWindow.xaml", + "RelativeToolTip": "MainWindow.xaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2024-06-28T09:24:35.067Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 10, + "Title": "App.config", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\App.config", + "RelativeDocumentMoniker": "App.config", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\App.config", + "RelativeToolTip": "App.config", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABQAAAAQAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|", + "WhenOpened": "2024-06-28T09:29:20.331Z" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "CheckDAL.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\DAL\\CheckDAL.cs", + "RelativeDocumentMoniker": "..\\DAL\\CheckDAL.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\DAL\\CheckDAL.cs", + "RelativeToolTip": "..\\DAL\\CheckDAL.cs", + "ViewState": "AgIAALwAAAAAAAAAAAAjwNQAAAAWAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T09:46:28.206Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 11, + "Title": "LogHelper.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\LogHelper.cs", + "RelativeDocumentMoniker": "..\\Tool\\LogHelper.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\LogHelper.cs", + "RelativeToolTip": "..\\Tool\\LogHelper.cs", + "ViewState": "AgIAAA0AAAAAAAAAAAAWwBAAAABHAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-25T07:30:15.116Z" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "SqlHelper.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\SqlHelper.cs", + "RelativeDocumentMoniker": "..\\Tool\\SqlHelper.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\SqlHelper.cs", + "RelativeToolTip": "..\\Tool\\SqlHelper.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAARAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T09:48:14.458Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 12, + "Title": "FileHelper.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\FileHelper.cs", + "RelativeDocumentMoniker": "..\\Tool\\FileHelper.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\Tool\\FileHelper.cs", + "RelativeToolTip": "..\\Tool\\FileHelper.cs", + "ViewState": "AgIAAAYAAAAAAAAAAAAswAsAAAA1AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-07-25T07:30:13.88Z" + }, + { + "$type": "Document", + "DocumentIndex": 16, + "Title": "MessageBoxView.xaml.cs", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\View\\MessageBoxView.xaml.cs", + "RelativeDocumentMoniker": "..\\View\\MessageBoxView.xaml.cs", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\View\\MessageBoxView.xaml.cs", + "RelativeToolTip": "..\\View\\MessageBoxView.xaml.cs", + "ViewState": "AgIAAAYAAAAAAAAAAABowAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2024-06-28T10:45:31.671Z" + }, + { + "$type": "Document", + "DocumentIndex": 18, + "Title": "packages.config", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\DAL\\packages.config", + "RelativeDocumentMoniker": "..\\DAL\\packages.config", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\DAL\\packages.config", + "RelativeToolTip": "..\\DAL\\packages.config", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000601|", + "WhenOpened": "2024-06-28T09:54:56.305Z" + }, + { + "$type": "Document", + "DocumentIndex": 19, + "Title": "App.xaml", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\App.xaml", + "RelativeDocumentMoniker": "App.xaml", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\\u70B9\u68C0\\App.xaml", + "RelativeToolTip": "App.xaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2024-06-28T09:15:39.13Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 20, + "Title": "MesLoginView.xaml", + "DocumentMoniker": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\View\\MesLoginView.xaml", + "RelativeDocumentMoniker": "..\\View\\MesLoginView.xaml", + "ToolTip": "D:\\\u684C\u9762\u6587\u4EF6\u5939\\Desktop\\\u4E2D\u79FB\u7248\u672C\u5E93\\\u91D1\u673A\u70B9\u68C0\\View\\MesLoginView.xaml", + "RelativeToolTip": "..\\View\\MesLoginView.xaml", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", + "WhenOpened": "2024-06-28T09:13:36.591Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/点检/App.config b/点检/App.config new file mode 100644 index 0000000..eae6b75 --- /dev/null +++ b/点检/App.config @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/点检/App.xaml b/点检/App.xaml new file mode 100644 index 0000000..df9b433 --- /dev/null +++ b/点检/App.xaml @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/点检/App.xaml.cs b/点检/App.xaml.cs new file mode 100644 index 0000000..2ddc9e0 --- /dev/null +++ b/点检/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace 点检 +{ + /// + /// App.xaml 的交互逻辑 + /// + public partial class App : Application + { + } +} diff --git a/点检/CheckViewModel.cs b/点检/CheckViewModel.cs new file mode 100644 index 0000000..9e158ca --- /dev/null +++ b/点检/CheckViewModel.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace 点检 +{ + class CheckViewModel : INotifyPropertyChanged + { + + private string _name; + public string name { get => _name; set { _name = value; RaisePropertyChanged("name"); } } + private string _devcode1; + /// + /// 夹具1 + /// + public string devcode1 { get => _devcode1; set { _devcode1 = value; RaisePropertyChanged("devcode1"); } } + private string _devcode2; + /// + /// 夹具1 + /// + public string devcode2 { get => _devcode2; set { _devcode2 = value; RaisePropertyChanged("devcode2"); } } + private string _devcode1no; + public string devcode1no { get => _devcode1no; set { _devcode1no = value; RaisePropertyChanged("devcode1no"); } } + private string _devcode2no; + public string devcode2no { get => _devcode2no; set { _devcode2no = value; RaisePropertyChanged("devcode2no"); } } + private string _type; + public string type { get => _type; set { _type = value; RaisePropertyChanged("type"); } } + private string _snimei; + public string snimei { get => _snimei; set { _snimei = value; RaisePropertyChanged("snimei"); } } + public string User { get; set; } + + private string _Msg; + public string Msg { get => _Msg; set { _Msg = value; RaisePropertyChanged("Msg"); } } + public event PropertyChangedEventHandler PropertyChanged; + protected virtual void RaisePropertyChanged(string propertyname) + { + this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyname)); + } + } +} diff --git a/点检/MainWindow.xaml b/点检/MainWindow.xaml new file mode 100644 index 0000000..0a0a457 --- /dev/null +++ b/点检/MainWindow.xaml @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +