/*
I have gone through the list of questions, however none of them answer my
question.
I have used the following code approach to obtain a "pseudo-header"
from any old gif file, hoping that it will hold for any gif file I could write.
Still having done this, my outputted word file has less information in it, not
more.
Does anyone have any help for this code?
*/
//-------------------------------------------
import java.io.*;
import java.nio.*;
import java.util.*;
import java.util.concurrent.*;
import org.apache.poi.poifs.filesystem.*;
import org.apache.poi.poifs.storage.*;
//-------------------------------------------
import org.apache.poi.hwpf.*;
import org.apache.poi.hwpf.model.*;
//import org.apache.poi.hwpf.model.io.*;
import org.apache.poi.hwpf.usermodel.*;
//-------------------------------------------
//import org.apache.poi.hssf.usermodel .*;
//-------------------------------------------
import java.lang.reflect.*;
//-------------------------------------------
//import javax.management.openmbean.*;
//-------------------------------------------
import javax.imageio.stream.*;
//-------------------------------------------
?
?
?
public class MSImageEmbedAttempt {
//Doesn't seem to work. Based on a GIF file.
static byte [] innerPictureHeader()
{
//taken from one gif, the flanders gif.
byte [] innerHeader = {-54, 29, 0, 0, 68, 0, 100, 0, -20, 9, -20, 9, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -96, 5, -96, 5, -25, 3, -25, 3, 0, 0, 0, 0,
0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
15, 0, 4, -16, 102, 0, 0, 0, -78, 4, 10, -16, 8, 0, 0, 0, 1, 4, 0, 0, 0, 10, 0,
0, -77, 0, 11, -16, 66, 0, 0, 0, -127, 0, 0, 0, 0, 0, -126, 0, 0, 0, 0, 0, -125,
0, 0, 0, 0, 0, -124, 0, 0, 0, 0, 0, 4, 65, 1, 0, 0, 0, 6, 1, 0, 0, 0, 0, 63, 1,
0, 0, 0, 0, -127, 1, -1, -1, -1, 0, -125, 1, 0, 0, 0, 0, -65, 1, 16, 0, 16, 0,
-1, 1, 0, 0, 8, 0, 0, 0, 16, -16, 4, 0, 0, 0, 0, 0, 0, -128, 98, 0, 7, -16, 16,
29, 0, 0, 6, 6, -39, 102, -53, -44, 0, 0, 0, 0, 38, 72, 24, 9, 96, 0, 0, 16, 0,
0, -20, 28, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110, 30, -16, -28, 28,
0, 0, -39, 102, -53, -44, 0, 0, 0, 0, 38, 72, 24, 9, 96, 0, 0, 16, -1};
return innerHeader;
}
static byte [] emptyGif()
{
byte [] placeData = {71, 73, 70, 56, 57, 97, 1, 0, 2, 0, -9, 0, 0, 0, 0, 0,
-128, 0, 0, 0, -128, 0, -128, -128, 0, 0, 0, -128, -128, 0, -128, 0, -128,
-128, -128, -128, -128, -64, -64, -64, -1, 0, 0, 0, -1, 0, -1, -1, 0, 0, 0,
-1, -1, 0, -1, 0, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0, 0, 102, 0, 0,
-103, 0, 0, -52, 0, 0, -1, 0, 51, 0, 0, 51, 51, 0, 51, 102, 0, 51, -103,
0, 51, -52, 0, 51, -1, 0, 102, 0, 0, 102, 51, 0, 102, 102, 0, 102, -103,
0, 102, -52, 0, 102, -1, 0, -103, 0, 0, -103, 51, 0, -103, 102, 0, -103,
-103, 0, -103, -52, 0, -103, -1, 0, -52, 0, 0, -52, 51, 0, -52, 102, 0,
-52, -103, 0, -52, -52, 0, -52, -1, 0, -1, 0, 0, -1, 51, 0, -1, 102, 0,
-1, -103, 0, -1, -52, 0, -1, -1, 51, 0, 0, 51, 0, 51, 51, 0, 102, 51,
0, -103, 51, 0, -52, 51, 0, -1, 51, 51, 0, 51, 51, 51, 51, 51, 102,
51, 51, -103, 51, 51, -52, 51, 51, -1, 51, 102, 0, 51, 102, 51, 51,
102, 102, 51, 102, -103, 51, 102, -52, 51, 102, -1, 51, -103, 0, 51,
-103, 51, 51, -103, 102, 51, -103, -103, 51, -103, -52, 51, -103, -1,
51, -52, 0, 51, -52, 51, 51, -52, 102, 51, -52, -103, 51, -52, -52, 51,
-52, -1, 51, -1, 0, 51, -1, 51, 51, -1, 102, 51, -1, -103, 51, -1, -52,
51, -1, -1, 102, 0, 0, 102, 0, 51, 102, 0, 102, 102, 0, -103, 102, 0, -52,
102, 0, -1, 102, 51, 0, 102, 51, 51, 102, 51, 102, 102, 51, -103, 102, 51,
-52, 102, 51, -1, 102, 102, 0, 102, 102, 51, 102, 102, 102, 102, 102, -103,
102, 102, -52, 102, 102, -1, 102, -103, 0, 102, -103, 51, 102, -103, 102, 102,
-103, -103, 102, -103, -52, 102, -103, -1, 102, -52, 0, 102, -52, 51, 102, -52,
102, 102, -52, -103, 102, -52, -52, 102, -52, -1, 102, -1, 0, 102, -1, 51, 102,
-1, 102, 102, -1, -103, 102, -1, -52, 102, -1, -1, -103, 0, 0, -103, 0, 51,
-103,
0, 102, -103, 0, -103, -103, 0, -52, -103, 0, -1, -103, 51, 0, -103, 51, 51,
-103,
51, 102, -103, 51, -103, -103, 51, -52, -103, 51, -1, -103, 102, 0, -103, 102,
51,
-103, 102, 102, -103, 102, -103, -103, 102, -52, -103, 102, -1, -103, -103, 0,
-103,
-103, 51, -103, -103, 102, -103, -103, -103, -103, -103, -52, -103, -103, -1,
-103,
-52, 0, -103, -52, 51, -103, -52, 102, -103, -52, -103, -103, -52, -52, -103,
-52,
-1, -103, -1, 0, -103, -1, 51, -103, -1, 102, -103, -1, -103, -103, -1, -52,
-103,
-1, -1, -52, 0, 0, -52, 0, 51, -52, 0, 102, -52, 0, -103, -52, 0, -52, -52, 0,
-1,
-52, 51, 0, -52, 51, 51, -52, 51, 102, -52, 51, -103, -52, 51, -52, -52, 51, -1,
-52, 102, 0, -52, 102, 51, -52, 102, 102, -52, 102, -103, -52, 102, -52, -52,
102, -1, -52, -103, 0, -52, -103, 51, -52, -103, 102, -52, -103, -103, -52,
-103, -52, -52, -103, -1, -52, -52, 0, -52, -52, 51, -52, -52, 102, -52, -52,
-103, -52, -52, -52, -52, -52, -1, -52, -1, 0, -52, -1, 51, -52, -1, 102, -52,
-1, -103, -52, -1, -52, -52, -1, -1, -1, 0, 0, -1, 0, 51, -1, 0, 102, -1, 0,
-103, -1, 0, -52, -1, 0, -1, -1, 51, 0, -1, 51, 51, -1, 51, 102, -1, 51, -103,
-1, 51, -52, -1, 51, -1, -1, 102, 0, -1, 102, 51, -1, 102, 102, -1, 102, -103,
-1, 102, -52, -1, 102, -1, -1, -103, 0, -1, -103, 51, -1, -103, 102, -1, -103,
-103, -1, -103, -52, -1, -103, -1, -1, -52, 0, -1, -52, 51, -1, -52, 102, -1,
-52, -103, -1, -52, -52, -1, -52, -1, -1, -1, 0, -1, -1, 51, -1, -1, 102, -1,
-1, -103, -1, -1, -52, -1, -1, -1, 33, -7, 4, 1, 0, 0, 16, 0, 44, 0, 0, 0, 0,
1, 0, 2, 0, 0, 8, 5, 0, -1, -3, 11, 8, 0, 59};
return placeData;}
public static byte [] getWordHeader()
{
byte [] header =
{-48,-49,17,-32,-95,-79,26,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,0,3,0,-2,-1,9,0,6,0,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,15,0,0,0,0,0,0,0,0,16,0,0,2,0,0,0,1,0,0,0,-2,-1,-1,-1,0,0,0,0,0,0,0,0,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,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0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,47,
0,0,0,48,0,0,0,49,0,0,0,50,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,57,
0,0,0,58,0,0,0,59,0,0,0,60,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,64,0,0,0,65,0,0,0,66,0,0,0,67,
0,0,0,68,0,0,0,69,0,0,0,70,0,0,0,71,0,0,0,72,0,0,0,73,0,0,0,74,0,0,0,75,0,0,0,76,0,0,0,77,
0,0,0,78,0,0,0,79,0,0,0,80,0,0,0,81,0,0,0,82,0,0,0,83,0,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,
0,0,0,-2,-1,-1,-1,89,0,0,0,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,1,0,-2,-1,3,10,0,0,-1,-1,-1,-1,6,9,2,0,0,0,0,0,-64,0,0,0,0,0,0,70,24,0,0,0,77,
105,99,114,111,115,111,102,116,32,87,111,114,100,45,68,111,107,117,109,101,110,116,0,10,0,0,0,77,83,87,111,114,100,68,111,99,0,16,0,0,
0,87,111,114,100,46,68,111,99,117,109,101,110,116,46,56,0,-12,57,-78,113,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,
0,20,0,10,0,1,0,91,0,15,0,2,0,0,0,0,0,0,0,92,0,0,16,-15,-1,2,0,92,0,0,0,7,0,68,0,101,0,102,0,97,
0,117,0,108,0,116,0,0,0,8,0,0,0,49,36,0,42,36,1,51,0,66,42,0,79,74,0,0,81,74,0,0,67,74,24,0,109,72,9,12,
115,72,9,12,75,72,1,0,80,74,3,0,110,72,4,8,94,74,4,0,97,74,24,0,95,72,57,4,116,72,57,4,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,66,0,65,64,-14,-1,-95,0,66,0,0,0,25,0,65,0,98,0,115,0,97,0,116,0,122,0,45,0,83,
0,116,0,97,0,110,0,100,0,97,0,114,0,100,0,115,0,99,0,104,0,114,0,105,0,102,0,116,0,97,0,114,0,116,0,0,0,0,0,0,
0,0,0,0,0,0,0,70,0,-2,31,1,0,2,1,70,0,0,0,7,0,72,0,101,0,97,0,100,0,105,0,110,0,103,0,0,0,13,0,15,
0,19,-92,-16,0,20,-92,120,0,6,36,1,0,24,0,79,74,2,0,81,74,2,0,67,74,28,0,80,74,3,0,94,74,4,0,97,74,28,0,46,
0,66,16,1,0,2,1,46,0,0,0,9,0,84,0,101,0,120,0,116,0,32,0,98,0,111,0,100,0,121,0,0,0,10,0,16,0,19,-92,0,
0,20,-92,120,0,0,0,32,0,47,16,1,1,18,1,32,0,0,0,4,0,76,0,105,0,115,0,116,0,0,0,2,0,17,0,4,0,94,74,5,
0,64,0,-2,31,1,0,34,1,64,0,0,0,7,0,67,0,97,0,112,0,116,0,105,0,111,0,110,0,0,0,13,0,18,0,19,-92,120,0,20,
-92,120,0,12,36,1,0,18,0,67,74,24,0,54,8,1,94,74,5,0,97,74,24,0,93,8,1,38,0,-2,31,1,0,50,1,38,0,0,0,5,
0,73,0,110,0,100,0,101,0,120,0,0,0,5,0,19,0,12,36,1,0,4,0,94,74,5,0,0,0,0,0,1,0,0,0,4,0,0,14,0,
0,0,0,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,2,8,0,0,5,0,0,0,0,8,0,0,2,8,0,0,6,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,2,16,0,0,0,0,0,0,0,1,0,0,0,80,0,0,8,0,0,0,0,6,0,0,0,
71,22,-112,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
84,0,105,0,109,0,101,0,115,0,32,0,78,0,101,0,119,0,32,0,82,0,111,0,109,0,97,0,110,0,0,0,53,22,-112,1,2,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,0,121,0,109,0,98,0,
111,0,108,0,0,0,51,38,-112,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,65,0,114,0,105,0,97,0,108,0,0,0,79,6,-112,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,117,0,99,0,105,0,100,0,97,0,32,0,83,0,97,0,110,0,115,0,
32,0,85,0,110,0,105,0,99,0,111,0,100,0,101,0,0,0,53,6,-112,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0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0,2,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,41,6,0,0,0,0,0,0,5,0,83,0,117,0,109,0,109,0,97,0,114,0,121,0,73,
0,110,0,102,0,111,0,114,0,109,0,97,0,116,0,105,0,111,0,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,40,0,2,0,5,0,0,0,6,0,0,0,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,-84,0,0,0,0,0,0,0,87,0,111,0,114,0,100,0,68,
0,111,0,99,0,117,0,109,0,101,0,110,0,116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,2,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,36,14,0,0,0,0,0,0,5,
0,68,0,111,0,99,0,117,0,109,0,101,0,110,0,116,0,83,0,117,0,109,0,109,0,97,0,114,0,121,0,73,0,110,0,102,0,111,0,114,
0,109,0,97,0,116,0,105,0,111,0,110,0,0,0,0,0,0,0,0,0,0,0,56,0,2,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,0,0,0,116,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0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1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,9,8,16,0,0,6,5,0,-69,13,-52,7,0,0,0,0,6,0,0,0,-31,0,2,0,-80,4,-63,0,2,0,0,0,-30,
0,0,0,92,0,112,0,4,0,0,67,97,108,99,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,66,
0,2,0,-80,4,97,1,2,0,0,0,-64,1,0,0,61,1,6,0,1,0,2,0,3,0,-100,0,2,0,14,0,-81,1,2,0,0,0,-68,1,2,
0,0,0,61,0,18,0,0,0,0,0,0,64,0,32,56,0,0,0,0,0,1,0,-45,0,64,0,2,0,0,0,-115,0,2,0,0,0,34,0,2,
0,0,0,14,0,2,0,1,0,-73,1,2,0,0,0,-38,0,2,0,0,0,49,0,26,0,-56,0,0,0,-1,127,-112,1,0,0,0,2,0,0,5,
1,65,0,114,0,105,0,97,0,108,0,49,0,26,0,-56,0,0,0,-1,127,-112,1,0,0,0,0,0,0,5,1,65,0,114,0,105,0,97,0,108,
0,49,0,26,0,-56,0,0,0,-1,127,-112,1,0,0,0,0,0,0,5,1,65,0,114,0,105,0,97,0,108,0,49,0,26,0,-56,0,0,0,-1,
127,-112,1,0,0,0,0,0,0,5,1,65,0,114,0,105,0,97,0,108,0,30,4,12,0,-92,0,7,0,0,71,69,78,69,82,65,76,-32,0,20,
0,0,0,-92,0,-11,-1,32,0,0,0,0,0,0,0,0,0,0,0,-64,32,-32,0,20,0,1,0,0,0,-11,-1,32,0,0,-12,0,0,0,0,0,
0,0,0,-64,32,-32,0,20,0,1,0,0,0,-11,-1,32,0,0,-12,0,0,0,0,0,0,0,0,-64,32,-32,0,20,0,2,0,0,0,-11,-1,32,
0,0,-12,0,0,0,0,0,0,0,0,-64,32,-32,0,20,0,2,0,0,0,-11,-1,32,0,0,-12,0,0,0,0,0,0,0,0,-64,32,-32,0,20,
0,0,0,0,0,-11,-1,32,0,0,-12,0,0,0,0,0,0,0,0,-64,32,-32,0,20,0,0,0,0,0,-11,-1,32,0,0,-12,0,0,0,0,0,
0,0,0,-64,32,-32,0,20,0,0,0,0,0,-11,-1,32,0,0,-12,0,0,0,0,0,0,0,0,-64,32,-32,0,20,0,0,0,0,0,-11,-1,32,
0,0,-12,0,0,0,0,0,0,0,0,-64,32,-32,0,20,0,0,0,0,0,-11,-1,32,0,0,-12,0,0,0,0,0,0,0,0,-64,32,-32,0,20,
0,0,0,0,0,-11,-1,32,0,0,-12,0,0,0,0,0,0,0,0,-64,32,-32,0,20,0,0,0,0,0,-11,-1,32,0,0,-12,0,0,0,0,0,
0,0,0,-64,32,-32,0,20,0,0,0,0,0,-11,-1,32,0,0,-12,0,0,0,0,0,0,0,0,-64,32,-32,0,20,0,0,0,0,0,-11,-1,32,
0,0,-12,0,0,0,0,0,0,0,0,-64,32,-32,0,20,0,0,0,0,0,-11,-1,32,0,0,-12,0,0,0,0,0,0,0,0,-64,32,-32,0,20,
0,0,0,-92,0,1,0,32,0,0,0,0,0,0,0,0,0,0,0,-64,32,-32,0,20,0,1,0,43,0,-11,-1,32,0,0,-16,0,0,0,0,0,
0,0,0,-64,32,-32,0,20,0,1,0,41,0,-11,-1,32,0,0,-16,0,0,0,0,0,0,0,0,-64,32,-32,0,20,0,1,0,44,0,-11,-1,32,
0,0,-16,0,0,0,0,0,0,0,0,-64,32,-32,0,20,0,1,0,42,0,-11,-1,32,0,0,-16,0,0,0,0,0,0,0,0,-64,32,-32,0,20,
0,1,0,9,0,-11,-1,32,0,0,-16,0,0,0,0,0,0,0,0,-64,32,-109,2,4,0,0,-128,0,-1,-109,2,4,0,16,-128,3,-1,-109,2,4,
0,17,-128,6,-1,-109,2,4,0,18,-128,4,-1,-109,2,4,0,19,-128,7,-1,-109,2,4,0,20,-128,5,-1,96,1,2,0,1,0,-123,0,14,0,-119,
4,0,0,0,0,6,0,83,104,101,101,116,49,-123,0,14,0,104,6,0,0,0,0,6,0,83,104,101,101,116,50,-123,0,14,0,71,8,0,0,0,
0,6,0,83,104,101,101,116,51,-116,0,4,0,61,0,61,0,-63,1,8,0,-63,1,0,0,84,-115,1,0,-21,0,106,0,15,0,0,-16,98,0,0,
0,0,0,6,-16,40,0,0,0,1,12,0,0,4,0,0,0,3,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,
0,3,0,0,0,1,0,0,0,51,0,11,-16,18,0,0,0,-65,0,8,0,8,0,-127,1,9,0,0,8,-64,1,64,0,0,8,64,0,30,-15,16,
0,0,0,13,0,0,8,12,0,0,8,23,0,0,8,-9,0,0,16,99,8,21,0,99,8,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,
0,0,0,2,10,0,0,0,9,8,16,0,0,6,16,0,-69,13,-52,7,0,0,0,0,6,0,0,0,12,0,2,0,100,0,15,0,2,0,1,0,
17,0,2,0,0,0,16,0,8,0,-4,-87,-15,-46,77,98,80,63,95,0,2,0,1,0,-128,0,8,0,0,0,0,0,0,0,0,0,37,2,4,0,
0,0,1,1,-127,0,2,0,-63,4,42,0,2,0,0,0,43,0,2,0,0,0,-126,0,2,0,1,0,20,0,36,0,33,0,0,38,67,38,34,84,
105,109,101,115,32,78,101,119,32,82,111,109,97,110,44,82,101,103,117,108,97,114,34,38,49,50,38,65,21,0,41,0,38,0,0,38,67,38,34,84,
105,109,101,115,32,78,101,119,32,82,111,109,97,110,44,82,101,103,117,108,97,114,34,38,49,50,80,97,103,101,32,38,80,-125,0,2,0,0,0,-124,
0,2,0,0,0,38,0,8,0,51,51,51,51,51,51,-23,63,39,0,8,0,51,51,51,51,51,51,-23,63,40,0,8,0,-125,45,-40,-126,45,-40,-16,
63,41,0,8,0,-125,45,-40,-126,45,-40,-16,63,-95,0,34,0,9,0,100,0,1,0,1,0,1,0,-126,0,44,1,44,1,51,51,51,51,51,51,-23,
63,51,51,51,51,51,51,-23,63,1,0,85,0,2,0,11,0,125,0,12,0,0,0,0,1,-108,11,15,0,0,0,0,0,0,2,14,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,-20,0,80,0,15,0,2,-16,72,0,0,0,16,0,8,-16,8,0,0,0,1,0,0,0,0,4,0,0,15,
0,3,-16,48,0,0,0,15,0,4,-16,40,0,0,0,1,0,9,-16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,
0,10,-16,8,0,0,0,0,4,0,0,5,0,0,0,62,2,18,0,-74,6,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,29,0,15,
0,3,0,0,0,0,0,0,1,0,0,0,0,0,0,0,103,8,23,0,103,8,0,0,0,0,0,0,0,0,0,0,2,0,1,-1,-1,-1,-1,0,
0,0,0,10,0,0,0,9,8,16,0,0,6,16,0,-69,13,-52,7,0,0,0,0,6,0,0,0,12,0,2,0,100,0,15,0,2,0,1,0,17,
0,2,0,0,0,16,0,8,0,-4,-87,-15,-46,77,98,80,63,95,0,2,0,1,0,-128,0,8,0,0,0,0,0,0,0,0,0,37,2,4,0,0,
0,1,1,-127,0,2,0,-63,4,42,0,2,0,0,0,43,0,2,0,0,0,-126,0,2,0,1,0,20,0,36,0,33,0,0,38,67,38,34,84,105,
109,101,115,32,78,101,119,32,82,111,109,97,110,44,82,101,103,117,108,97,114,34,38,49,50,38,65,21,0,41,0,38,0,0,38,67,38,34,84,105,
109,101,115,32,78,101,119,32,82,111,109,97,110,44,82,101,103,117,108,97,114,34,38,49,50,80,97,103,101,32,38,80,-125,0,2,0,0,0,-124,0,
2,0,0,0,38,0,8,0,51,51,51,51,51,51,-23,63,39,0,8,0,51,51,51,51,51,51,-23,63,40,0,8,0,-125,45,-40,-126,45,-40,-16,63,
41,0,8,0,-125,45,-40,-126,45,-40,-16,63,-95,0,34,0,9,0,100,0,1,0,1,0,1,0,2,0,44,1,44,1,51,51,51,51,51,51,-23,63,
51,51,51,51,51,51,-23,63,1,0,85,0,2,0,11,0,125,0,12,0,0,0,0,1,-108,11,15,0,0,0,0,0,0,2,14,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,-20,0,80,0,15,0,2,-16,72,0,0,0,32,0,8,-16,8,0,0,0,1,0,0,0,0,8,0,0,15,0,
3,-16,48,0,0,0,15,0,4,-16,40,0,0,0,1,0,9,-16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,
10,-16,8,0,0,0,0,8,0,0,5,0,0,0,62,2,18,0,-74,0,0,0,0,0,64,0,0,0,60,0,100,0,0,0,0,0,29,0,15,0,
3,0,0,0,0,0,0,1,0,0,0,0,0,0,0,103,8,23,0,103,8,0,0,0,0,0,0,0,0,0,0,2,0,1,-1,-1,-1,-1,0,0,
0,0,10,0,0,0,9,8,16,0,0,6,16,0,-69,13,-52,7,0,0,0,0,6,0,0,0,12,0,2,0,100,0,15,0,2,0,1,0,17,0,
2,0,0,0,16,0,8,0,-4,-87,-15,-46,77,98,80,63,95,0,2,0,1,0,-128,0,8,0,0,0,0,0,0,0,0,0,37,2,4,0,0,0,
1,1,-127,0,2,0,-63,4,42,0,2,0,0,0,43,0,2,0,0,0,-126,0,2,0,1,0,20,0,36,0,33,0,0,38,67,38,34,84,105,109,
101,115,32,78,101,119,32,82,111,109,97,110,44,82,101,103,117,108,97,114,34,38,49,50,38,65,21,0,41,0,38,0,0,38,67,38,34,84,105,109,
101,115,32,78,101,119,32,82,111,109,97,110,44,82,101,103,117,108,97,114,34,38,49,50,80,97,103,101,32,38,80,-125,0,2,0,0,0,-124,0,2,
0,0,0,38,0,8,0,51,51,51,51,51,51,-23,63,39,0,8,0,51,51,51,51,51,51,-23,63,40,0,8,0,-125,45,-40,-126,45,-40,-16,63,41,
0,8,0,-125,45,-40,-126,45,-40,-16,63,-95,0,34,0,9,0,100,0,1,0,1,0,1,0,2,0,44,1,44,1,51,51,51,51,51,51,-23,63,51,
51,51,51,51,51,-23,63,1,0,85,0,2,0,11,0,125,0,12,0,0,0,0,1,-108,11,15,0,0,0,0,0,0,2,14,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,-20,0,80,0,15,0,2,-16,72,0,0,0,48,0,8,-16,8,0,0,0,1,0,0,0,0,12,0,0,15,0,3,
-16,48,0,0,0,15,0,4,-16,40,0,0,0,1,0,9,-16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,10,
-16,8,0,0,0,0,12,0,0,5,0,0,0,62,2,18,0,-74,0,0,0,0,0,64,0,0,0,60,0,100,0,0,0,0,0,29,0,15,0,3,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,103,8,23,0,103,8,0,0,0,0,0,0,0,0,0,0,2,0,1,-1,-1,-1,-1,0,0,0,
0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,-2,-1,3,10,0,0,-1,
-1,-1,-1,16,8,2,0,0,0,0,0,-64,0,0,0,0,0,0,70,27,0,0,0,77,105,99,114,111,115,111,102,116,32,69,120,99,101,108,32,57,
55,45,84,97,98,101,108,108,101,0,6,0,0,0,66,105,102,102,56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,-1,0,0,1,0,2,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,-32,-123,-97,-14,-7,79,104,16,-85,-111,8,0,43,39,-77,-39,48,0,0,0,124,0,0,0,6,0,0,0,1,
0,0,0,56,0,0,0,9,0,0,0,64,0,0,0,10,0,0,0,76,0,0,0,11,0,0,0,88,0,0,0,12,0,0,0,100,0,0,0,13,
0,0,0,112,0,0,0,2,0,0,0,-23,-3,0,0,30,0,0,0,2,0,0,0,48,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,64,
0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,-128,65,-76,-21,53,75,-53,1,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,-1,0,0,1,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,
0,0,0,2,-43,-51,-43,-100,46,27,16,-109,-105,8,0,43,44,-7,-82,68,0,0,0,5,-43,-51,-43,-100,46,27,16,-109,-105,8,0,43,44,-7,-82,92,
0,0,0,24,0,0,0,1,0,0,0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,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,-2,-1,-1,-1,0,0,0,0,0,0,0,0
};
return bytes;
}
public static void main (String [] args)
{
//Presently designed to append at the end.
//Could easily be changed to insert at end of any Paragraph.
//Could easily be changed to insert at any curosor point (DocumentPosition).
try {
System.out.println("---------------------------------------------------------------------------");
//--------------------------------------------------------------------------------------
//Microsoft Word Document, for editing.
FileInputStream imageInput = new FileInputStream(new File("demo.doc"));
POIFSFileSystem fileSystem = HWPFDocument.verifyAndBuildPOIFS(imageInput);
HWPFDocument document = new HWPFDocument(fileSystem);
imageInput.close();
//--------------------------------------------------------------------------------------
//OS Picture image read, for inseriton.
//--------------------------------------------------------------------------------------
DataInputStream input = new DataInputStream(new
FileInputStream("reverend.gif"));
ConcurrentLinkedQueue<Byte> queue = new ConcurrentLinkedQueue<Byte>();
Byte datum = null;
while(input.available() > 0 )
{
datum = new Byte(input.readByte());
if(datum instanceof Byte)
{ queue.add(datum);}
}
input.close();
byte [] imageBytes = new byte[queue.size()];
for(int i=0;i<imageBytes.length;i++)
{
imageBytes[i] = queue.poll().byteValue();
}
//--------------------------------------------------------------------------------------
//Overall offset calculation, for appending at the very end.
Range overall = document.getOverallRange();
int countRuns = overall.numCharacterRuns();
int numPictures = 0;
PicturesTable pTable = document.getPicturesTable();
CharacterRun [] runs = new CharacterRun[countRuns];
LinkedList<Picture> initialPictures = new LinkedList<Picture>();
for (int i=0;i<runs.length;i++)
{
runs[i] = overall.getCharacterRun(i);
if(pTable.hasPicture(runs[i]))
{
numPictures++;
initialPictures.addFirst(pTable.extractPicture(runs[i],true));
}
}
int byteOffset = 0;
for(int i=0;i<initialPictures.size();i++)
{
byteOffset += initialPictures.removeLast().getRawContent().length;
}
System.out.println("byteOffset: " + byteOffset);
//--------------------------------------------------------------------------------------
//Correct up until here.
//--------------------------------------------------------------------------------------
Picture picture = new Picture(imageBytes);
byte [] pictureData = picture.getContent();
//*******************************************************************************************
appendCharacterRun(document, " 01 " + '\r'); // '\u0001' + '\r', evaluates to
an int value.
//*******************************************************************************************
byte [] dataStream = document.getDataStream();
///?????????????????????????????????
//temp.
//picture =
pTable.extractPicture(document.getOverallRange().getCharacterRun(0),true);
//pictureData = picture.getRawContent();
//System.out.println(Arrays.toString(dataStream));
//System.out.println(Arrays.toString(pictureData));
///?????????????????????????????????
System.out.println("pictureData: " + pictureData.length);
//does document have 2 character runs now? YES
//*******************************************************************************************
byte [] imageWithHeader =
insertArrayIntoArray(pictureData,0,innerPictureHeader());
//*******************************************************************************************
//byteOffset += innerPictureHeader().length;
System.out.println("byteOffset: " + byteOffset);
dataStream = insertArrayIntoArray(dataStream,byteOffset,imageWithHeader);
Field [] fields = document.getClass().getDeclaredFields();
Field field = fields[4];
field.setAccessible(true);
field.set(document,dataStream);
field.setAccessible(false);
//*******************************************************************************************
//commit all final changes and write resultant file.
System.out.println("dataStream: " + dataStream.length); //do an HWPFDocument.
File edited = new File("DocumentResult.doc");
FileOutputStream out = new FileOutputStream(edited);
document.write((OutputStream)out); //assuming edited the correct dataStream.
out.close();
System.out.println("---------------------------------------------------------------------------");
//***************************************************************************************
/*
int index = 5;
if(index <= document.characterLength())
{
DocumentPosition position = new DocumentPosition(document,5);
int endPoint = position.numCharacterRuns();
CharacterRun cursor = position.getCharacterRun(endPoint-1); //index not length.
}
*/
//***************************************************************************************
}
catch (Exception e)
{e.printStackTrace();}
}
static byte [] insertArrayIntoArray(byte [] data,int pointIndex, byte [] update)
{
byte [] solution = null;
LinkedList<Byte> list = new LinkedList<Byte>();
for (int i=0;i<data.length;i++)
{
list.addFirst(new Byte(data[i]));
}
for(int i=0;i<update.length;i++)
{
list.add(pointIndex,new Byte(update[i])); //shifts i to the right, i++; -->
}
Byte [] objectPass = list.toArray(new Byte[0]);
solution = new byte[objectPass.length];
for (int i=0;i<objectPass.length;i++)
{
solution[i] = objectPass[i].byteValue();
}
return solution;}
static Range appendCharacterRun(HWPFDocument document,String text)
{
Range overall = null;
try {
overall = document.getOverallRange();
int countRuns = document.getOverallRange().numCharacterRuns();
CharacterRun run = overall.getCharacterRun(countRuns -1);
ArrayList list = document.getParagraphTable().getParagraphs();
PAPX papX = (PAPX)list.get(0); //any paragraph which is representitive of
document style formatting.
StyleSheet styleSheet = document.getStyleSheet();
ParagraphProperties properties =
(ParagraphProperties)papX.getParagraphProperties(styleSheet);
Method [] methods = overall.getClass().getDeclaredMethods();
Method method = methods[9];
Class [] types = {ParagraphProperties.class,Integer.class,String.class};
//alternatively,
//method = overall.getClass().getDeclaredMethod("insertAfter",types);
//System.out.println("CRs: " + document.getOverallRange().numCharacterRuns());
method.setAccessible(true);
method.invoke(overall,properties,0,text); //+ "\r"
method.setAccessible(false);
//System.out.println("CRs: " + document.getOverallRange().numCharacterRuns());
}
catch (Exception e)
{e.printStackTrace();}
return overall;}
}