Very little is confirmed about exactly who this James P. Barry was, in fact all we know for sure is that he was arrested in the summer of 1887 for sodomy in San Francisco and was released a couple of days later.
It is likely, but not confirmed, that he was James Patrick Barry, born about 1855 in California to Irish immigrant parents. On July 28, 1876 he registered to vote and at that time was living at the corner of Dupont and Francisco Streets on the 2nd floor and working as a bricklayer. In the 1880 census he is living with his mother mother Mary at 406 Seventh Street and two brothers John, age 20, and Richard, age 20. Both he and John are listed as laborers and Richard was still in school. Interestingly, James had been out of work for 11 our of 12 months the year before. He is the only James P. Barry found in San Francisco at around this time.
Sacramento Daily Union (Sacramento, California) - July 16, 1887
Police Court: In the Police Court yesterday …
The case of James P. Barry, for sodomy, was set for examination this morning.
Sacramento Daily Union (Sacramento, California) - July 18, 1887
Police Court: In the police court Saturday …
The case of James P. Barry, accused of sodomy, was stricken from the calendar