{"id":121,"date":"2021-01-19T19:11:30","date_gmt":"2021-01-19T19:11:30","guid":{"rendered":"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/?page_id=121"},"modified":"2021-01-19T19:25:15","modified_gmt":"2021-01-19T19:25:15","slug":"data-conversion-streams","status":"publish","type":"page","link":"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/course-topics\/i-o-files-streams\/data-conversion-streams\/","title":{"rendered":"Data Conversion Streams"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a6d4a9d3f4ba\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a6d4a9d3f4ba\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/course-topics\/i-o-files-streams\/data-conversion-streams\/#The_DataInput_Interface\" >The&nbsp;DataInput&nbsp;Interface<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/course-topics\/i-o-files-streams\/data-conversion-streams\/#The_DataInputStream_Class\" >The DataInputStream Class<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/course-topics\/i-o-files-streams\/data-conversion-streams\/#The_DataOutput_Interface\" >The&nbsp;DataOutput&nbsp;Interface<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/course-topics\/i-o-files-streams\/data-conversion-streams\/#The_DataOutputStream_Class\" >The DataOutputStream Class<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/course-topics\/i-o-files-streams\/data-conversion-streams\/#An_Example\" >An Example<\/a><\/li><\/ul><\/nav><\/div>\n\n<p class=\"wp-block-paragraph\">There are two streams that support data conversion:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code><strong>DataInputStream<\/strong><\/code><\/li><li><code><strong>DataOutputStream<\/strong><\/code><\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Each of these streams implements one of two interfaces:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code><strong>DataInput<\/strong><\/code><\/li><li><code><strong>DataOutput<\/strong><\/code><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_DataInput_Interface\"><\/span>The&nbsp;DataInput&nbsp;Interface<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<code><strong>DataInput<\/strong><\/code>&nbsp;interface contains the following methods:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Method<\/th><th>Description<\/th><\/tr><tr><td><code>public boolean readBoolean()<br>throws IOException<\/code><\/td><td>Reads a&nbsp;<code>boolean<\/code>&nbsp;value from the input stream.<\/td><\/tr><tr><td><code>public byte readByte()<br>throws IOException<\/code><\/td><td>Reads a signed 8-bit value from the input stream.<\/td><\/tr><tr><td><code>public char readChar()<br>throws IOException<\/code><\/td><td>Reads a Unicode&nbsp;char&nbsp;value from the input stream.<\/td><\/tr><tr><td><code>public double readDouble()<br>throws IOException<\/code><\/td><td>Reads a&nbsp;<code>double<\/code>&nbsp;value from the input stream.<\/td><\/tr><tr><td><code>public float readFloat()<br>throws IOException<\/code><\/td><td>Reads a&nbsp;<code>float<\/code>&nbsp;value from the input stream.<\/td><\/tr><tr><td><code>public void readFully(byte[] b,<br>int off, int len)<br>throws IOException<\/code><\/td><td>Reads&nbsp;<code>b.length<\/code>&nbsp;bytes into the byte array. This method blocks until all the bytes are read.<\/td><\/tr><tr><td><code>public void readFully(byte[] b)<br>throws IOException<\/code><\/td><td>Reads&nbsp;<code>b.length<\/code>&nbsp;bytes into the byte array. This method blocks until all the bytes are read.<\/td><\/tr><tr><td><code>public int readInt()<br>throws IOException<\/code><\/td><td>Reads an&nbsp;<code>int<\/code>&nbsp;value from the input stream.<\/td><\/tr><tr><td><code>public String readLine()<br>throws IOException<\/code><\/td><td>Reads the next line of text from the input stream.<br><strong>(deprecated)<\/strong><\/td><\/tr><tr><td><code>public long readLong()<br>throws IOException<\/code><\/td><td>Reads a&nbsp;<code>long<\/code>&nbsp;value from the input stream.<\/td><\/tr><tr><td><code>public short readShort()<br>throws IOException<\/code><\/td><td>Reads a 16-bit value from the input stream.<\/td><\/tr><tr><td><code>public int readUnsignedByte() throws IOException<\/code><\/td><td>Reads an unsigned 8-bit value from the input stream.<\/td><\/tr><tr><td><code>public int readUnsignedShort() throws IOException<\/code><\/td><td>Reads an unsigned 16-bit value from the input stream.<\/td><\/tr><tr><td><code>public String readUTF()<br>throws IOException<\/code><\/td><td>Reads in a string that has been encoded using a modified UTF-8 format.<br>For an exact description of this method, see the discussion in Gosling, Joy, and Steele,&nbsp;<em>The Java Language Specification.<\/em><\/td><\/tr><tr><td><code>public int skipBytes(int n)<br>throws IOException<\/code><\/td><td>Skips exactly&nbsp;<code>n<\/code>&nbsp;bytes of input.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em><u>Note:<\/u><\/em><\/strong>&nbsp;All of the above methods throw an&nbsp;<code><strong>EOFException<\/strong><\/code>&nbsp;if the stream reaches its end before reading all the information required for the method.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em><u>Note:<\/u><\/em><\/strong><code> <strong>readLine()<\/strong><\/code>&nbsp;is deprecated in byte streams. This method does not properly convert bytes to characters. Starting with JDK&nbsp;1.1, the preferred way to read lines of text is via the <code><strong>BufferedReader.readLine()<\/strong><\/code> method. Programs that use the <code><strong>DataInputStream<\/strong><\/code> class to read lines can be converted to use the <code><strong>BufferedReader<\/strong><\/code> class by replacing code of the form:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>DataInputStream d =&nbsp;new&nbsp;DataInputStream(in);<\/strong><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">with:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>BufferedReader d = \n   BufferedReader( InputStreamReader(in) );<\/strong><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_DataInputStream_Class\"><\/span>The DataInputStream Class<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way. It implements all the methods required by the&nbsp;<code>DataInput<\/code>&nbsp;interface, plus the following:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Method<\/th><th>Description<\/th><\/tr><tr><td><code>public DataInputStream(InputStream in)<\/code><\/td><td>Creates a new data input stream to read data from the specified input stream.<\/td><\/tr><tr><td><code>public final int read(byte[] b,<br>int off, int len)<br>throws IOException<\/code><\/td><td>Reads up to&nbsp;<code><strong>len<\/strong><\/code>&nbsp;bytes of data from this data input stream into an array of&nbsp;bytes. This method blocks until some input is available.<br>The&nbsp;<strong>read<\/strong>&nbsp;method of <code><strong>DataInputStream<\/strong><\/code> calls the&nbsp;<strong>read<\/strong>&nbsp;method of its underlying input stream with the same arguments and returns whatever value that method returns.<\/td><\/tr><tr><td><code>public final int read(byte[] b) throws IOException<\/code><\/td><td>Reads up to&nbsp;<code><strong>b.length<\/strong><\/code>&nbsp;bytes of data from this data input stream into an array of bytes. This method blocks until some input is available.<br>The&nbsp;read&nbsp;method of <code><strong>DataInputStream<\/strong><\/code> calls the&nbsp;read&nbsp;method of its underlying input stream with the three arguments&nbsp;<code>b<\/code>,&nbsp;<code>0<\/code>, and&nbsp;<code>b.length<\/code>&nbsp;and returns whatever value that method returns.<\/td><\/tr><tr><td><code>public static final String readUTF(DataInput in)<br>throws IOException<\/code><\/td><td>Reads in a string from the specified data input stream. The string has been encoded using a modified UTF-8 format.<br>The first two bytes are read as if by&nbsp;<code><strong>readUnsignedShort<\/strong><\/code>. This value gives the number of following bytes that are in the encoded string, not the length of the resulting string. The following bytes are then interpreted as bytes encoding characters in the UTF-8 format and are converted into characters.<br>This method blocks until all the bytes are read, the end of the stream is detected, or an exception is thrown.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_DataOutput_Interface\"><\/span>The&nbsp;DataOutput&nbsp;Interface<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<code><strong>DataOutput<\/strong><\/code>&nbsp;interface contains the following methods:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Method<\/th><th>Description<\/th><\/tr><tr><td><code>public void write(byte[] b,<br>int off, int len)<br>throws IOException<\/code><\/td><td>Writes&nbsp;<code>len<\/code>&nbsp;bytes from the specified byte array starting at offset&nbsp;<code>off<\/code>&nbsp;to this output stream.<\/td><\/tr><tr><td><code>public void write(byte[] b)<br>throws IOException<\/code><\/td><td>Writes&nbsp;<code>b.length<\/code>&nbsp;bytes from the specified byte array to this output stream.<\/td><\/tr><tr><td><code>public void write(int b)<br>throws IOException<\/code><\/td><td>Writes the specified byte to this data output stream.<\/td><\/tr><tr><td><code>public void writeBoolean(boolean v)<br>throws IOException<\/code><\/td><td>Writes a&nbsp;<code>boolean<\/code>&nbsp;value to this output stream.<\/td><\/tr><tr><td><code>public void writeByte(int v)<br>throws IOException<\/code><\/td><td>Writes an 8-bit value to this output stream.<\/td><\/tr><tr><td><code>public void writeBytes(String s)<br>throws IOException<\/code><\/td><td>Writes a string to this output stream.<\/td><\/tr><tr><td><code>public void writeChar(int v)<br>throws IOException<\/code><\/td><td>Writes a&nbsp;<code>char<\/code>&nbsp;value to this output stream.<\/td><\/tr><tr><td><code>public void writeChars(String s)<br>throws IOException<\/code><\/td><td>Writes a string to this output stream.<\/td><\/tr><tr><td><code>public void writeDouble(double v) throws IOException<\/code><\/td><td>Writes a&nbsp;<code>double<\/code>&nbsp;value to this output stream.<\/td><\/tr><tr><td><code>public void writeFloat(float v)<br>throws IOException<\/code><\/td><td>Writes a&nbsp;<code>float<\/code>&nbsp;value to this output stream.<\/td><\/tr><tr><td><code>public void writeInt(int v)<br>throws IOException<\/code><\/td><td>Writes an&nbsp;<code>int<\/code>&nbsp;value to this output stream.<\/td><\/tr><tr><td><code>public void writeLong(long v)<br>throws IOException<\/code><\/td><td>Writes a&nbsp;<code>long<\/code>&nbsp;value to this output stream.<\/td><\/tr><tr><td><code>public void writeShort(int v)<br>throws IOException<\/code><\/td><td>Writes a 16-bit value to this output stream.<\/td><\/tr><tr><td><code>public void writeUTF(String str)<br>throws IOException<\/code><\/td><td>Writes a Unicode string by encoding it using modified UTF-8 format.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"The_DataOutputStream_Class\"><\/span>The DataOutputStream Class<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A data output stream lets an application write primitive Java data types to an output stream in a portable way. It implements all the methods required by the\u00a0<code><strong>DataOutput<\/strong><\/code>\u00a0interface, plus the following:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Method<\/th><th>Description<\/th><\/tr><tr><td><code>public DataOutputStream(OutputStream out)<\/code><\/td><td>Creates a new data output stream to write data to the specified underlying output stream.<\/td><\/tr><tr><td><code>public void flush()<br>throws IOException<\/code><\/td><td>Flushes this data output stream. This forces any buffered output bytes to be written out to the stream.<br>The\u00a0<code><strong>flush<\/strong><\/code>\u00a0method of\u00a0<code><strong>DataOutputStream<\/strong><\/code>\u00a0calls the\u00a0<code><strong>flush<\/strong><\/code>\u00a0method of its underlying output stream.<\/td><\/tr><tr><td><code>public final int size()<\/code><\/td><td>Returns the number of bytes written to this data output stream.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"An_Example\"><\/span>An Example<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s an example of the use of these data conversion classes. It shows how one could take an instance of a class (in this case,\u00a0<code><strong>Employee<\/strong><\/code>, with a member class\u00a0<code><strong>Address<\/strong><\/code>) write it out to a file, and then read it back in again into a fresh instance of\u00a0<code><strong>Employee<\/strong><\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em><u>Note:<\/u><\/em><\/strong>\u00a0This program shows writing and reading from within the same program, but it is important to realize that the reading could have been done from another program, even one running on a different platform.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\npackage inputOutput;\n\nimport java.io.DataInputStream;\nimport java.io.DataOutputStream;\nimport java.io.BufferedInputStream;\nimport java.io.BufferedOutputStream;\nimport java.io.EOFException;\nimport java.io.FileInputStream;\nimport java.io.FileNotFoundException;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.io.OutputStreamWriter;\nimport java.io.PrintWriter;\n\n\/**\n *  This class demonstrates the ability to write data\n *  out to a file and read it back again, using DataInputStream\n *  and DataOutputStream classes.\n *\n *  @author Bryan J. Higgs\n *\/\npublic class EmployeeDataConverter\n{\n    public static void main(String&#x5B;] args)\n    {\n        \/\/ Create two valued employee records\n        Employee&#x5B;] emps = new Employee&#x5B;2];\n        emps&#x5B;0] = new Employee(&quot;John Smith&quot;,\n                            new Address(&quot;11 Main St.&quot;,\n                                        &quot;Nashua&quot;, \n                                        &quot;NH&quot;, &quot;03060&quot;,\n                                        &quot;USA&quot;),\n                            32,\n                            56000.00,\n                            false);\n        emps&#x5B;1] = new Employee(&quot;Rhonda Schoenberger&quot;,\n                            new Address(&quot;20345 BelAire&quot;,\n                                        &quot;Silicon Gulch&quot;,\n                                        &quot;CA&quot;, &quot;97210&quot;,\n                                        &quot;USA&quot;),\n                            35,\n                            89000.00,\n                            true);\n            \n        try\n        {\n            \/\/ Create a DataOutputStream to output the\n            \/\/ records to a file.\n            DataOutputStream out = new DataOutputStream(\n                                        new BufferedOutputStream(\n                                            new FileOutputStream(\n                                                    &quot;employees.lst&quot;)));\n            for (int emp = 0; emp &lt; emps.length; emp++)\n            {\n                emps&#x5B;emp].outputData(out);\n            }\n            out.close();\n        }\n        catch (IOException e)\n        {\n            e.printStackTrace();\n            return;\n        }\n        \n        try\n        {\n            \/\/ Create a DataInputStream to input the records back\n            \/\/ from the file we just wrote.\n            DataInputStream in = new DataInputStream(\n                                    new BufferedInputStream(\n                                        new FileInputStream(\n                                                &quot;employees.lst&quot;)));\n            PrintWriter writer = new PrintWriter(\n                                    new OutputStreamWriter(\n                                        System.out));\n            try\n            {\n                for (int emp = 0; emp &lt; emps.length; emp++)\n                {\n                    Employee e = new Employee();\n                    e.inputData(in);\n                    writer.println(&quot;---Employee---&quot;);\n                    e.print(writer);\n                    writer.flush();\n                }\n            }\n            catch (EOFException e)\n            {\n                \/\/ End of stream\n            }\n            in.close();\n            writer.close();\n        }\n        catch (FileNotFoundException e)\n        {\n            \/\/ Should never happen\n            e.printStackTrace();\n        }\n        catch (IOException e)\n        {\n            e.printStackTrace();\n        }\n    }\n}\n\nclass Employee\n{\n    Employee()\n    {\n        m_address = new Address();\n    }\n    \n    Employee(String name, Address address, int age,\n             double salary, boolean isManager)\n    {\n        m_name = name;\n        m_address = address;\n        m_age = age;\n        m_salary = salary;\n        m_isManager = isManager;\n    }\n    \n    void print(PrintWriter out)\n    {\n        out.println(&quot;Name: &quot; + m_name);\n        out.println(&quot;Address: &quot;);\n        m_address.print(out);\n        out.println(&quot;Age: &quot; + m_age);\n        out.println(&quot;Salary: &quot; + m_salary);\n        out.println(&quot;Manager: &quot; + m_isManager);\n    }\n    \n    void outputData(DataOutputStream out)\n        throws IOException\n    {\n        out.writeUTF(m_name);\n        m_address.outputData(out);\n        out.writeInt(m_age);\n        out.writeDouble(m_salary);\n        out.writeBoolean(m_isManager);\n    }\n    \n    void inputData(DataInputStream in)\n        throws IOException\n    {\n        m_name = in.readUTF();\n        m_address.inputData(in);\n        m_age = in.readInt();\n        m_salary = in.readDouble();\n        m_isManager = in.readBoolean();\n    }\n    \n    \/\/\/ Private data \/\/\/\n    private String  m_name;\n    private Address m_address;\n    private int     m_age;\n    private double  m_salary;\n    private boolean m_isManager;\n}\n\nclass Address\n{\n    Address()\n    {}\n    \n    Address(String street, String city, String state, \n            String postalCode, String country)\n    {\n        m_street = street;\n        m_city = city;\n        m_state = state;\n        m_postalCode = postalCode;\n        m_country = country;\n    }\n    \n    void print(PrintWriter out)\n    {\n        out.println(m_street);\n        out.println(m_city);\n        out.println(m_state + &quot; &quot; + m_postalCode);\n        out.println(m_country);\n    }\n    \n    void outputData(DataOutputStream out)\n        throws IOException\n    {\n        out.writeUTF(m_street);\n        out.writeUTF(m_city);\n        out.writeUTF(m_state);\n        out.writeUTF(m_postalCode);\n        out.writeUTF(m_country);\n    }\n    \n    void inputData(DataInputStream in)\n        throws IOException\n    {\n        m_street = in.readUTF();\n        m_city = in.readUTF();\n        m_state = in.readUTF();\n        m_postalCode = in.readUTF();\n        m_country = in.readUTF();\n    }\n    \n    \/\/\/ Private data \/\/\/\n    private String  m_street;\n    private String  m_city;\n    private String  m_state;\n    private String  m_postalCode;\n    private String  m_country;\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">This produces a file that contains the following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"676\" height=\"61\" src=\"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/wp-content\/uploads\/2021\/01\/dataCo1.gif\" alt=\"\" class=\"wp-image-128\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">(as displayed by one editor).&nbsp; Clearly, the data stored is not pure text &#8212; which is what we expected.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is what the program outputs:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>---Employee---\nName: John Smith\nAddress: \n11 Main St.\nNashua\nNH 03060\nUSA\nAge: 32\nSalary: 56000.0\nManager: false\n---Employee---\nName: Rhonda Schoenberger\nAddress: \n20345 BelAire\nSilicon Gulch\nCA 97210\nUSA\nAge: 35\nSalary: 89000.0\nManager: true<\/strong><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>There are two streams that support data conversion: DataInputStream DataOutputStream Each of these streams implements one of two interfaces: DataInput DataOutput The&nbsp;DataInput&nbsp;Interface The&nbsp;DataInput&nbsp;interface contains the following methods: Method Description public boolean readBoolean()throws IOException Reads a&nbsp;boolean&nbsp;value from the input stream. public byte readByte()throws IOException Reads a signed 8-bit value from the input stream. public char readChar()throws [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":67,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_eb_attr":"","ocean_front_end_style_editor":"no","ocean_post_layout":"left-sidebar","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"ocs-course-topics-sidebar","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","footnotes":""},"class_list":["post-121","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/wp-json\/wp\/v2\/pages\/121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/wp-json\/wp\/v2\/comments?post=121"}],"version-history":[{"count":4,"href":"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/wp-json\/wp\/v2\/pages\/121\/revisions"}],"predecessor-version":[{"id":129,"href":"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/wp-json\/wp\/v2\/pages\/121\/revisions\/129"}],"up":[{"embeddable":true,"href":"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/wp-json\/wp\/v2\/pages\/67"}],"wp:attachment":[{"href":"https:\/\/bhiggs.x10hosting.com\/HighOctaneJava\/wp-json\/wp\/v2\/media?parent=121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}