< prev index next >

src/java.desktop/windows/classes/sun/awt/windows/WDataTransferer.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 757 
 758     /**
 759      * parseDescription parsing HTML clipboard header as it described in
 760      * comment to convertToHTMLFormat
 761      */
 762     private void parseDescription() throws IOException
 763     {
 764         stBaseURL = null;
 765         stVersion = null;
 766 
 767         // initialization of array offset pointers
 768         // to the same "uninitialized" state.
 769         iHTMLEnd =
 770                 iHTMLStart =
 771                         iFragEnd =
 772                                 iFragStart =
 773                                         iSelEnd =
 774                                                 iSelStart = -1;
 775 
 776         bufferedStream.mark(BYTE_BUFFER_LEN);
 777         String astEntries[] = new String[] {
 778                 //common
 779                 VERSION,
 780                 START_HTML,
 781                 END_HTML,
 782                 START_FRAGMENT,
 783                 END_FRAGMENT,
 784                 //ver 1.0
 785                 START_SELECTION,
 786                 END_SELECTION,
 787                 SOURCE_URL
 788         };
 789         BufferedReader bufferedReader = new BufferedReader(
 790                 new InputStreamReader(
 791                         bufferedStream,
 792                         ENCODING
 793                 ),
 794                 CHAR_BUFFER_LEN
 795         );
 796         long iHeadSize = 0;
 797         long iCRSize = EOLN.length();


   1 /*
   2  * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 757 
 758     /**
 759      * parseDescription parsing HTML clipboard header as it described in
 760      * comment to convertToHTMLFormat
 761      */
 762     private void parseDescription() throws IOException
 763     {
 764         stBaseURL = null;
 765         stVersion = null;
 766 
 767         // initialization of array offset pointers
 768         // to the same "uninitialized" state.
 769         iHTMLEnd =
 770                 iHTMLStart =
 771                         iFragEnd =
 772                                 iFragStart =
 773                                         iSelEnd =
 774                                                 iSelStart = -1;
 775 
 776         bufferedStream.mark(BYTE_BUFFER_LEN);
 777         String[] astEntries = new String[] {
 778                 //common
 779                 VERSION,
 780                 START_HTML,
 781                 END_HTML,
 782                 START_FRAGMENT,
 783                 END_FRAGMENT,
 784                 //ver 1.0
 785                 START_SELECTION,
 786                 END_SELECTION,
 787                 SOURCE_URL
 788         };
 789         BufferedReader bufferedReader = new BufferedReader(
 790                 new InputStreamReader(
 791                         bufferedStream,
 792                         ENCODING
 793                 ),
 794                 CHAR_BUFFER_LEN
 795         );
 796         long iHeadSize = 0;
 797         long iCRSize = EOLN.length();


< prev index next >